Skip to content

Commit 9622d6b

Browse files
author
Mike Pall
committed
x86/x64: Fix argument check for bit shifts.
1 parent 11106aa commit 9622d6b

File tree

1 file changed

+7
-3
lines changed

1 file changed

+7
-3
lines changed

src/vm_x86.dasc

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2564,8 +2564,8 @@ static void build_subroutines(BuildCtx *ctx)
25642564
|
25652565
|.define TOBIT_BIAS, 0x59c00000 // 2^52 + 2^51 (float, not double!).
25662566
|
2567-
|.macro .ffunc_bit, name, kind
2568-
| .ffunc_1 name
2567+
|.macro .ffunc_bit, name, kind, fdef
2568+
| fdef name
25692569
|.if kind == 2
25702570
|.if SSE
25712571
| sseconst_tobit xmm1, RBa
@@ -2608,6 +2608,10 @@ static void build_subroutines(BuildCtx *ctx)
26082608
|2:
26092609
|.endmacro
26102610
|
2611+
|.macro .ffunc_bit, name, kind
2612+
| .ffunc_bit name, kind, .ffunc_1
2613+
|.endmacro
2614+
|
26112615
|.ffunc_bit bit_tobit, 0
26122616
|.if DUALNUM or SSE
26132617
|.if not SSE
@@ -2681,7 +2685,7 @@ static void build_subroutines(BuildCtx *ctx)
26812685
|
26822686
|.macro .ffunc_bit_sh, name, ins
26832687
|.if DUALNUM
2684-
| .ffunc_bit name, 1
2688+
| .ffunc_bit name, 1, .ffunc_2
26852689
| // Note: no inline conversion from number for 2nd argument!
26862690
| cmp dword [BASE+12], LJ_TISNUM; jne ->fff_fallback
26872691
| mov RA, dword [BASE+8]

0 commit comments

Comments
 (0)