aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorMike Pall <mike>2015-05-04 06:36:16 +0200
committerMike Pall <mike>2015-05-04 06:36:16 +0200
commit9622d6b8b291644278a7d830556ebf6d670d24ca (patch)
tree55a321cb67b5bb5c439572adb2939693d23b2c61 /src
parent11106aa83374c95f88679452e997229ecedefdcc (diff)
downloadluajit-9622d6b8b291644278a7d830556ebf6d670d24ca.tar.gz
luajit-9622d6b8b291644278a7d830556ebf6d670d24ca.tar.bz2
luajit-9622d6b8b291644278a7d830556ebf6d670d24ca.zip
x86/x64: Fix argument check for bit shifts.
Diffstat (limited to 'src')
-rw-r--r--src/vm_x86.dasc10
1 files changed, 7 insertions, 3 deletions
diff --git a/src/vm_x86.dasc b/src/vm_x86.dasc
index 4544a3be..6cdb8cbd 100644
--- a/src/vm_x86.dasc
+++ b/src/vm_x86.dasc
@@ -2564,8 +2564,8 @@ static void build_subroutines(BuildCtx *ctx)
2564 | 2564 |
2565 |.define TOBIT_BIAS, 0x59c00000 // 2^52 + 2^51 (float, not double!). 2565 |.define TOBIT_BIAS, 0x59c00000 // 2^52 + 2^51 (float, not double!).
2566 | 2566 |
2567 |.macro .ffunc_bit, name, kind 2567 |.macro .ffunc_bit, name, kind, fdef
2568 | .ffunc_1 name 2568 | fdef name
2569 |.if kind == 2 2569 |.if kind == 2
2570 |.if SSE 2570 |.if SSE
2571 | sseconst_tobit xmm1, RBa 2571 | sseconst_tobit xmm1, RBa
@@ -2608,6 +2608,10 @@ static void build_subroutines(BuildCtx *ctx)
2608 |2: 2608 |2:
2609 |.endmacro 2609 |.endmacro
2610 | 2610 |
2611 |.macro .ffunc_bit, name, kind
2612 | .ffunc_bit name, kind, .ffunc_1
2613 |.endmacro
2614 |
2611 |.ffunc_bit bit_tobit, 0 2615 |.ffunc_bit bit_tobit, 0
2612 |.if DUALNUM or SSE 2616 |.if DUALNUM or SSE
2613 |.if not SSE 2617 |.if not SSE
@@ -2681,7 +2685,7 @@ static void build_subroutines(BuildCtx *ctx)
2681 | 2685 |
2682 |.macro .ffunc_bit_sh, name, ins 2686 |.macro .ffunc_bit_sh, name, ins
2683 |.if DUALNUM 2687 |.if DUALNUM
2684 | .ffunc_bit name, 1 2688 | .ffunc_bit name, 1, .ffunc_2
2685 | // Note: no inline conversion from number for 2nd argument! 2689 | // Note: no inline conversion from number for 2nd argument!
2686 | cmp dword [BASE+12], LJ_TISNUM; jne ->fff_fallback 2690 | cmp dword [BASE+12], LJ_TISNUM; jne ->fff_fallback
2687 | mov RA, dword [BASE+8] 2691 | mov RA, dword [BASE+8]