Merge branch 'master' into v2.1

This commit is contained in:
Mike Pall 2014-04-17 10:32:23 +02:00
commit 39acdb8b7f

View File

@ -75,6 +75,29 @@
|.endif
|.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.
@ -2590,7 +2613,7 @@ static void build_subroutines(BuildCtx *ctx)
| stw CARG2, DISPATCH_GL(vmstate)(DISPATCH)
| savex_ 0,1,2,3
| stw CARG1, 0(sp) // Store extended stack chain.
| mcrxr cr0 // Clear SO flag.
| clrso TMP1
| savex_ 4,5,6,7
| addi CARG2, sp, 16+32*8+32*4 // Recompute original value of sp.
| savex_ 8,9,10,11
@ -2724,7 +2747,7 @@ static void build_subroutines(BuildCtx *ctx)
| cmpwi CARG2, 0
| li CARG1, 0
| beqlr
| mcrxr cr0 // Clear SO for -2147483648 % -1 and return 0.
| clrso TMP0 // Clear SO for -2147483648 % -1 and return 0.
| blr
|
|//-----------------------------------------------------------------------
@ -3350,7 +3373,7 @@ static void build_ins(BuildCtx *ctx, BCOp op, int defop)
|4:
|.if not GPR64
| // Potential overflow.
| mcrxr cr0; bley <1 // Ignore unrelated overflow.
| checkov TMP1, <1 // Ignore unrelated overflow.
|.endif
| lus TMP1, 0x41e0 // 2^31.
| li TMP0, 0
@ -3535,7 +3558,7 @@ static void build_ins(BuildCtx *ctx, BCOp op, int defop)
|2:
| ins_next2
|4: // Overflow.
| mcrxr cr0; bley <1 // Ignore unrelated overflow.
| checkov TMP0, <1 // Ignore unrelated overflow.
| ins_arithfallback b
|5: // FP variant.
||if (vk == 1) {
@ -4790,7 +4813,7 @@ static void build_ins(BuildCtx *ctx, BCOp op, int defop)
| b <1
if (vk) {
|6: // Potential overflow.
| mcrxr cr0; bley <4 // Ignore unrelated overflow.
| checkov TMP0, <4 // Ignore unrelated overflow.
| b <2
}
|.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.
| stw ZERO, DISPATCH_GL(vmstate)(DISPATCH)
| lwzx TRACE:TMP2, TMP1, RD
| mcrxr cr0 // Clear SO flag.
| clrso TMP1
| lp TMP2, TRACE:TMP2->mcode
| stw BASE, DISPATCH_GL(jit_base)(DISPATCH)
| mtctr TMP2