mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
Fixed float ops to deal with being handed an LHS GPR reservation on AMD64.
Fixed nanojit LIR verbosity crashing on AMD64.
This commit is contained in:
parent
ede63892f9
commit
5e828c58d4
@ -1544,12 +1544,16 @@ namespace nanojit
|
||||
}
|
||||
else {
|
||||
if (ref->isCall()) {
|
||||
#if !defined NANOJIT_64BIT
|
||||
if (ref->isop(LIR_callh)) {
|
||||
// we've presumably seen the other half already
|
||||
ref = ref->oprnd1();
|
||||
} else {
|
||||
#endif
|
||||
copyName(ref, _functions[ref->fid()]._name, funccounts.add(ref->fid()));
|
||||
#if !defined NANOJIT_64BIT
|
||||
}
|
||||
#endif
|
||||
} else {
|
||||
NanoAssert(ref->opcode() < sizeof(lirNames) / sizeof(lirNames[0]));
|
||||
copyName(ref, lirNames[ref->opcode()], lircounts.add(ref->opcode()));
|
||||
|
@ -878,8 +878,15 @@ namespace nanojit
|
||||
Register ra;
|
||||
|
||||
// if this is last use of lhs in reg, we can re-use result reg
|
||||
if (rA == 0 || (ra = rA->reg) == UnknownReg)
|
||||
if (rA == 0 || (ra = rA->reg) == UnknownReg) {
|
||||
ra = findSpecificRegFor(lhs, rr);
|
||||
} else if ((rmask(ra) & XmmRegs) == 0) {
|
||||
/* We need this case on AMD64, because it's possible that
|
||||
* an earlier instruction has done a quadword load and reserved a
|
||||
* GPR. If so, ask for a new register.
|
||||
*/
|
||||
ra = findRegFor(lhs, XmmRegs);
|
||||
}
|
||||
// else, rA already has a register assigned.
|
||||
|
||||
static const AVMPLUS_ALIGN16(uint32_t) negateMask[] = {0,0x80000000,0,0};
|
||||
@ -975,8 +982,15 @@ namespace nanojit
|
||||
Register ra;
|
||||
|
||||
// if this is last use of lhs in reg, we can re-use result reg
|
||||
if (rA == 0 || (ra = rA->reg) == UnknownReg)
|
||||
if (rA == 0 || (ra = rA->reg) == UnknownReg) {
|
||||
ra = findSpecificRegFor(lhs, rr);
|
||||
} else if ((rmask(ra) & XmmRegs) == 0) {
|
||||
/* We need this case on AMD64, because it's possible that
|
||||
* an earlier instruction has done a quadword load and reserved a
|
||||
* GPR. If so, ask for a new register.
|
||||
*/
|
||||
ra = findRegFor(lhs, XmmRegs);
|
||||
}
|
||||
// else, rA already has a register assigned.
|
||||
|
||||
if (lhs == rhs)
|
||||
|
@ -1178,7 +1178,7 @@ testNegZero1.name = 'testNegZero1';
|
||||
testNegZero1Helper(1);
|
||||
test(testNegZero1);
|
||||
|
||||
/* No test case, just make sure this doesn't assert. */
|
||||
// No test case, just make sure this doesn't assert.
|
||||
function testNegZero2() {
|
||||
var z = 0;
|
||||
for (let j = 0; j < 5; ++j) { ({p: (-z)}); }
|
||||
|
Loading…
Reference in New Issue
Block a user