mirror of
https://github.com/LuaJIT/LuaJIT.git
synced 2025-02-07 23:24:09 +00:00
Merge branch 'master' into v2.1
This commit is contained in:
commit
39acdb8b7f
@ -75,6 +75,29 @@
|
|||||||
|.endif
|
|.endif
|
||||||
|.endmacro
|
|.endmacro
|
||||||
|
|
|
|
||||||
|
|.macro clrso, reg
|
||||||
|
|.if PPE
|
||||||
|
| li reg, 0
|
||||||
|
| mtxer reg
|
||||||
|
|.else
|
||||||
|
| mcrxr cr0
|
||||||
|
|.endif
|
||||||
|
|.endmacro
|
||||||
|
|
|
||||||
|
|.macro checkov, reg, noov
|
||||||
|
|.if PPE
|
||||||
|
| mfxer reg
|
||||||
|
| add reg, reg, reg
|
||||||
|
| cmpwi reg, 0
|
||||||
|
| li reg, 0
|
||||||
|
| mtxer reg
|
||||||
|
| bgey noov
|
||||||
|
|.else
|
||||||
|
| mcrxr cr0
|
||||||
|
| bley noov
|
||||||
|
|.endif
|
||||||
|
|.endmacro
|
||||||
|
|
|
||||||
|//-----------------------------------------------------------------------
|
|//-----------------------------------------------------------------------
|
||||||
|
|
|
|
||||||
|// Fixed register assignments for the interpreter.
|
|// Fixed register assignments for the interpreter.
|
||||||
@ -2590,7 +2613,7 @@ static void build_subroutines(BuildCtx *ctx)
|
|||||||
| stw CARG2, DISPATCH_GL(vmstate)(DISPATCH)
|
| stw CARG2, DISPATCH_GL(vmstate)(DISPATCH)
|
||||||
| savex_ 0,1,2,3
|
| savex_ 0,1,2,3
|
||||||
| stw CARG1, 0(sp) // Store extended stack chain.
|
| stw CARG1, 0(sp) // Store extended stack chain.
|
||||||
| mcrxr cr0 // Clear SO flag.
|
| clrso TMP1
|
||||||
| savex_ 4,5,6,7
|
| savex_ 4,5,6,7
|
||||||
| addi CARG2, sp, 16+32*8+32*4 // Recompute original value of sp.
|
| addi CARG2, sp, 16+32*8+32*4 // Recompute original value of sp.
|
||||||
| savex_ 8,9,10,11
|
| savex_ 8,9,10,11
|
||||||
@ -2724,7 +2747,7 @@ static void build_subroutines(BuildCtx *ctx)
|
|||||||
| cmpwi CARG2, 0
|
| cmpwi CARG2, 0
|
||||||
| li CARG1, 0
|
| li CARG1, 0
|
||||||
| beqlr
|
| beqlr
|
||||||
| mcrxr cr0 // Clear SO for -2147483648 % -1 and return 0.
|
| clrso TMP0 // Clear SO for -2147483648 % -1 and return 0.
|
||||||
| blr
|
| blr
|
||||||
|
|
|
|
||||||
|//-----------------------------------------------------------------------
|
|//-----------------------------------------------------------------------
|
||||||
@ -3350,7 +3373,7 @@ static void build_ins(BuildCtx *ctx, BCOp op, int defop)
|
|||||||
|4:
|
|4:
|
||||||
|.if not GPR64
|
|.if not GPR64
|
||||||
| // Potential overflow.
|
| // Potential overflow.
|
||||||
| mcrxr cr0; bley <1 // Ignore unrelated overflow.
|
| checkov TMP1, <1 // Ignore unrelated overflow.
|
||||||
|.endif
|
|.endif
|
||||||
| lus TMP1, 0x41e0 // 2^31.
|
| lus TMP1, 0x41e0 // 2^31.
|
||||||
| li TMP0, 0
|
| li TMP0, 0
|
||||||
@ -3535,7 +3558,7 @@ static void build_ins(BuildCtx *ctx, BCOp op, int defop)
|
|||||||
|2:
|
|2:
|
||||||
| ins_next2
|
| ins_next2
|
||||||
|4: // Overflow.
|
|4: // Overflow.
|
||||||
| mcrxr cr0; bley <1 // Ignore unrelated overflow.
|
| checkov TMP0, <1 // Ignore unrelated overflow.
|
||||||
| ins_arithfallback b
|
| ins_arithfallback b
|
||||||
|5: // FP variant.
|
|5: // FP variant.
|
||||||
||if (vk == 1) {
|
||if (vk == 1) {
|
||||||
@ -4790,7 +4813,7 @@ static void build_ins(BuildCtx *ctx, BCOp op, int defop)
|
|||||||
| b <1
|
| b <1
|
||||||
if (vk) {
|
if (vk) {
|
||||||
|6: // Potential overflow.
|
|6: // Potential overflow.
|
||||||
| mcrxr cr0; bley <4 // Ignore unrelated overflow.
|
| checkov TMP0, <4 // Ignore unrelated overflow.
|
||||||
| b <2
|
| b <2
|
||||||
}
|
}
|
||||||
|.endif
|
|.endif
|
||||||
@ -4930,7 +4953,7 @@ static void build_ins(BuildCtx *ctx, BCOp op, int defop)
|
|||||||
| // Traces on PPC don't store the trace number, so use 0.
|
| // Traces on PPC don't store the trace number, so use 0.
|
||||||
| stw ZERO, DISPATCH_GL(vmstate)(DISPATCH)
|
| stw ZERO, DISPATCH_GL(vmstate)(DISPATCH)
|
||||||
| lwzx TRACE:TMP2, TMP1, RD
|
| lwzx TRACE:TMP2, TMP1, RD
|
||||||
| mcrxr cr0 // Clear SO flag.
|
| clrso TMP1
|
||||||
| lp TMP2, TRACE:TMP2->mcode
|
| lp TMP2, TRACE:TMP2->mcode
|
||||||
| stw BASE, DISPATCH_GL(jit_base)(DISPATCH)
|
| stw BASE, DISPATCH_GL(jit_base)(DISPATCH)
|
||||||
| mtctr TMP2
|
| mtctr TMP2
|
||||||
|
Loading…
Reference in New Issue
Block a user