diff options
author | Mike Pall <mike> | 2016-02-09 17:29:23 +0100 |
---|---|---|
committer | Mike Pall <mike> | 2016-02-09 17:29:23 +0100 |
commit | 825dcdc4d1e09c71ffc24565aefbb05a9cb3c2f4 (patch) | |
tree | 4362e197c39cf28f82ffa24df437d40ac2087d91 | |
parent | bfbcd72eb7f3bb85be9c765a174a51998e529297 (diff) | |
download | luajit-825dcdc4d1e09c71ffc24565aefbb05a9cb3c2f4.tar.gz luajit-825dcdc4d1e09c71ffc24565aefbb05a9cb3c2f4.tar.bz2 luajit-825dcdc4d1e09c71ffc24565aefbb05a9cb3c2f4.zip |
Generalize LJ_SOFTFP dependencies in lj_asm.c.
-rw-r--r-- | src/lj_asm.c | 15 | ||||
-rw-r--r-- | src/lj_asm_arm.h | 12 |
2 files changed, 12 insertions, 15 deletions
diff --git a/src/lj_asm.c b/src/lj_asm.c index 9db950a2..67e8d466 100644 --- a/src/lj_asm.c +++ b/src/lj_asm.c | |||
@@ -1609,16 +1609,24 @@ static void asm_ir(ASMState *as, IRIns *ir) | |||
1609 | case IR_ADD: asm_add(as, ir); break; | 1609 | case IR_ADD: asm_add(as, ir); break; |
1610 | case IR_SUB: asm_sub(as, ir); break; | 1610 | case IR_SUB: asm_sub(as, ir); break; |
1611 | case IR_MUL: asm_mul(as, ir); break; | 1611 | case IR_MUL: asm_mul(as, ir); break; |
1612 | case IR_DIV: asm_div(as, ir); break; | ||
1613 | case IR_MOD: asm_mod(as, ir); break; | 1612 | case IR_MOD: asm_mod(as, ir); break; |
1614 | case IR_POW: asm_pow(as, ir); break; | ||
1615 | case IR_NEG: asm_neg(as, ir); break; | 1613 | case IR_NEG: asm_neg(as, ir); break; |
1614 | #if LJ_SOFTFP | ||
1615 | case IR_DIV: case IR_POW: case IR_ABS: | ||
1616 | case IR_ATAN2: case IR_LDEXP: case IR_FPMATH: case IR_TOBIT: | ||
1617 | lua_assert(0); /* Unused for LJ_SOFTFP. */ | ||
1618 | break; | ||
1619 | #else | ||
1620 | case IR_DIV: asm_div(as, ir); break; | ||
1621 | case IR_POW: asm_pow(as, ir); break; | ||
1616 | case IR_ABS: asm_abs(as, ir); break; | 1622 | case IR_ABS: asm_abs(as, ir); break; |
1617 | case IR_ATAN2: asm_atan2(as, ir); break; | 1623 | case IR_ATAN2: asm_atan2(as, ir); break; |
1618 | case IR_LDEXP: asm_ldexp(as, ir); break; | 1624 | case IR_LDEXP: asm_ldexp(as, ir); break; |
1625 | case IR_FPMATH: asm_fpmath(as, ir); break; | ||
1626 | case IR_TOBIT: asm_tobit(as, ir); break; | ||
1627 | #endif | ||
1619 | case IR_MIN: asm_min(as, ir); break; | 1628 | case IR_MIN: asm_min(as, ir); break; |
1620 | case IR_MAX: asm_max(as, ir); break; | 1629 | case IR_MAX: asm_max(as, ir); break; |
1621 | case IR_FPMATH: asm_fpmath(as, ir); break; | ||
1622 | 1630 | ||
1623 | /* Overflow-checking arithmetic ops. */ | 1631 | /* Overflow-checking arithmetic ops. */ |
1624 | case IR_ADDOV: asm_addov(as, ir); break; | 1632 | case IR_ADDOV: asm_addov(as, ir); break; |
@@ -1663,7 +1671,6 @@ static void asm_ir(ASMState *as, IRIns *ir) | |||
1663 | case IR_OBAR: asm_obar(as, ir); break; | 1671 | case IR_OBAR: asm_obar(as, ir); break; |
1664 | 1672 | ||
1665 | /* Type conversions. */ | 1673 | /* Type conversions. */ |
1666 | case IR_TOBIT: asm_tobit(as, ir); break; | ||
1667 | case IR_CONV: asm_conv(as, ir); break; | 1674 | case IR_CONV: asm_conv(as, ir); break; |
1668 | case IR_TOSTR: asm_tostr(as, ir); break; | 1675 | case IR_TOSTR: asm_tostr(as, ir); break; |
1669 | case IR_STRTO: asm_strto(as, ir); break; | 1676 | case IR_STRTO: asm_strto(as, ir); break; |
diff --git a/src/lj_asm_arm.h b/src/lj_asm_arm.h index 81843caf..c129dd4e 100644 --- a/src/lj_asm_arm.h +++ b/src/lj_asm_arm.h | |||
@@ -520,8 +520,6 @@ static void asm_tobit(ASMState *as, IRIns *ir) | |||
520 | emit_dn(as, ARMI_VMOV_R_S, dest, (tmp & 15)); | 520 | emit_dn(as, ARMI_VMOV_R_S, dest, (tmp & 15)); |
521 | emit_dnm(as, ARMI_VADD_D, (tmp & 15), (left & 15), (right & 15)); | 521 | emit_dnm(as, ARMI_VADD_D, (tmp & 15), (left & 15), (right & 15)); |
522 | } | 522 | } |
523 | #else | ||
524 | #define asm_tobit(as, ir) lua_assert(0) | ||
525 | #endif | 523 | #endif |
526 | 524 | ||
527 | static void asm_conv(ASMState *as, IRIns *ir) | 525 | static void asm_conv(ASMState *as, IRIns *ir) |
@@ -1372,8 +1370,6 @@ static void asm_fpmath(ASMState *as, IRIns *ir) | |||
1372 | else | 1370 | else |
1373 | asm_callid(as, ir, IRCALL_lj_vm_floor + ir->op2); | 1371 | asm_callid(as, ir, IRCALL_lj_vm_floor + ir->op2); |
1374 | } | 1372 | } |
1375 | #else | ||
1376 | #define asm_fpmath(as, ir) lua_assert(0) | ||
1377 | #endif | 1373 | #endif |
1378 | 1374 | ||
1379 | static int asm_swapops(ASMState *as, IRRef lref, IRRef rref) | 1375 | static int asm_swapops(ASMState *as, IRRef lref, IRRef rref) |
@@ -1492,13 +1488,7 @@ static void asm_mul(ASMState *as, IRIns *ir) | |||
1492 | #define asm_subov(as, ir) asm_sub(as, ir) | 1488 | #define asm_subov(as, ir) asm_sub(as, ir) |
1493 | #define asm_mulov(as, ir) asm_mul(as, ir) | 1489 | #define asm_mulov(as, ir) asm_mul(as, ir) |
1494 | 1490 | ||
1495 | #if LJ_SOFTFP | 1491 | #if !LJ_SOFTFP |
1496 | #define asm_div(as, ir) lua_assert(0) | ||
1497 | #define asm_pow(as, ir) lua_assert(0) | ||
1498 | #define asm_abs(as, ir) lua_assert(0) | ||
1499 | #define asm_atan2(as, ir) lua_assert(0) | ||
1500 | #define asm_ldexp(as, ir) lua_assert(0) | ||
1501 | #else | ||
1502 | #define asm_div(as, ir) asm_fparith(as, ir, ARMI_VDIV_D) | 1492 | #define asm_div(as, ir) asm_fparith(as, ir, ARMI_VDIV_D) |
1503 | #define asm_pow(as, ir) asm_callid(as, ir, IRCALL_lj_vm_powi) | 1493 | #define asm_pow(as, ir) asm_callid(as, ir, IRCALL_lj_vm_powi) |
1504 | #define asm_abs(as, ir) asm_fpunary(as, ir, ARMI_VABS_D) | 1494 | #define asm_abs(as, ir) asm_fpunary(as, ir, ARMI_VABS_D) |