aboutsummaryrefslogtreecommitdiff
path: root/src/buildvm_x86.dasc
diff options
context:
space:
mode:
Diffstat (limited to 'src/buildvm_x86.dasc')
-rw-r--r--src/buildvm_x86.dasc47
1 files changed, 17 insertions, 30 deletions
diff --git a/src/buildvm_x86.dasc b/src/buildvm_x86.dasc
index 69195cf6..7b4c13a9 100644
--- a/src/buildvm_x86.dasc
+++ b/src/buildvm_x86.dasc
@@ -3901,39 +3901,32 @@ static void build_ins(BuildCtx *ctx, BCOp op, int defop, int cmov, int sse)
3901 3901
3902 case BC_TNEW: 3902 case BC_TNEW:
3903 | ins_AD // RA = dst, RD = hbits|asize 3903 | ins_AD // RA = dst, RD = hbits|asize
3904 |.if X64 3904 | mov L:RB, SAVE_L
3905 | mov L:CARG1d, SAVE_L 3905 | mov L:RB->base, BASE
3906 | mov L:CARG1d->base, BASE // Caveat: CARG2d/CARG3d may be BASE. 3906 | mov RA, [DISPATCH+DISPATCH_GL(gc.total)]
3907 | cmp RA, [DISPATCH+DISPATCH_GL(gc.threshold)]
3908 | mov SAVE_PC, PC
3909 | jae >5
3907 |1: 3910 |1:
3911 |.if X64
3908 | mov CARG3d, RD 3912 | mov CARG3d, RD
3909 | and RD, 0x7ff 3913 | and RD, 0x7ff
3910 | shr CARG3d, 11 3914 | shr CARG3d, 11
3911 | cmp RD, 0x7ff
3912 | je >3
3913 |2:
3914 | mov CARG2d, RD
3915 | mov RD, [DISPATCH+DISPATCH_GL(gc.total)]
3916 | mov L:RB, L:CARG1d
3917 | cmp RD, [DISPATCH+DISPATCH_GL(gc.threshold)]
3918 | mov SAVE_PC, PC
3919 | jae >5
3920 |.else 3915 |.else
3921 | mov RB, RD 3916 | mov RA, RD
3922 | and RD, 0x7ff 3917 | and RD, 0x7ff
3923 | shr RB, 11 3918 | shr RA, 11
3919 | mov ARG3, RA
3920 |.endif
3924 | cmp RD, 0x7ff 3921 | cmp RD, 0x7ff
3925 | je >3 3922 | je >3
3926 |2: 3923 |2:
3927 | mov ARG3, RB 3924 |.if X64
3928 | mov L:RB, SAVE_L 3925 | mov L:CARG1d, L:RB
3929 | mov ARG2, RD 3926 | mov CARG2d, RD
3930 | mov SAVE_PC, PC 3927 |.else
3931 | mov RD, [DISPATCH+DISPATCH_GL(gc.total)]
3932 | mov ARG1, L:RB 3928 | mov ARG1, L:RB
3933 | cmp RD, [DISPATCH+DISPATCH_GL(gc.threshold)] 3929 | mov ARG2, RD
3934 | mov L:RB->base, BASE
3935 | jae >5
3936 |1:
3937 |.endif 3930 |.endif
3938 | call extern lj_tab_new // (lua_State *L, int32_t asize, uint32_t hbits) 3931 | call extern lj_tab_new // (lua_State *L, int32_t asize, uint32_t hbits)
3939 | // Table * returned in eax (RC). 3932 | // Table * returned in eax (RC).
@@ -3946,16 +3939,10 @@ static void build_ins(BuildCtx *ctx, BCOp op, int defop, int cmov, int sse)
3946 | mov RD, 0x801 3939 | mov RD, 0x801
3947 | jmp <2 3940 | jmp <2
3948 |5: 3941 |5:
3949 |.if X64
3950 | call extern lj_gc_step_fixtop@4 // (lua_State *L)
3951 | movzx RD, PC_RD
3952 | mov L:CARG1d, L:RB
3953 | jmp <1
3954 |.else
3955 | mov L:FCARG1, L:RB 3942 | mov L:FCARG1, L:RB
3956 | call extern lj_gc_step_fixtop@4 // (lua_State *L) 3943 | call extern lj_gc_step_fixtop@4 // (lua_State *L)
3944 | movzx RD, PC_RD
3957 | jmp <1 3945 | jmp <1
3958 |.endif
3959 break; 3946 break;
3960 case BC_TDUP: 3947 case BC_TDUP:
3961 | ins_AND // RA = dst, RD = table const (~) (holding template table) 3948 | ins_AND // RA = dst, RD = table const (~) (holding template table)