mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
Bug 909401 - Fix MacroAssembler::tagValue on x86/ARM to not assert if the input register is the same as the output type register. r=nbp
This commit is contained in:
parent
d27b75e764
commit
34ce868e22
26
js/src/jit-test/tests/ion/bug909401.js
Normal file
26
js/src/jit-test/tests/ion/bug909401.js
Normal file
@ -0,0 +1,26 @@
|
||||
var TZ_PST = -8;
|
||||
var TZ_DIFF = GetTimezoneOffset();
|
||||
var PST_DIFF = TZ_DIFF - TZ_PST;
|
||||
function GetTimezoneOffset() {}
|
||||
function adjustResultArray(ResultArray) {
|
||||
var t = ResultArray[TIME] - PST_DIFF;
|
||||
ResultArray[UTC_YEAR] = YearFromTime(t);
|
||||
}
|
||||
function TimeInYear( y ) {}
|
||||
function YearFromTime( t ) {
|
||||
var sign = ( t < 0 ) ? -1 : 1;
|
||||
var year = ( sign < 0 ) ? 1969 : 1970;
|
||||
for ( var timeToTimeZero = t; ; ) {
|
||||
timeToTimeZero -= sign * TimeInYear(year)
|
||||
break;
|
||||
}
|
||||
return ( year );
|
||||
}
|
||||
gczeal(4);
|
||||
evaluate("\
|
||||
var TIME = 0;\
|
||||
var UTC_YEAR = 1;\
|
||||
adjustResultArray([]);\
|
||||
adjustResultArray([946684800000-1]);\
|
||||
adjustResultArray([]);\
|
||||
", { noScriptRval : true });
|
@ -2860,10 +2860,10 @@ MacroAssemblerARMCompat::loadValue(Address src, ValueOperand val)
|
||||
void
|
||||
MacroAssemblerARMCompat::tagValue(JSValueType type, Register payload, ValueOperand dest)
|
||||
{
|
||||
JS_ASSERT(payload != dest.typeReg());
|
||||
ma_mov(ImmType(type), dest.typeReg());
|
||||
JS_ASSERT(dest.typeReg() != dest.payloadReg());
|
||||
if (payload != dest.payloadReg())
|
||||
ma_mov(payload, dest.payloadReg());
|
||||
ma_mov(ImmType(type), dest.typeReg());
|
||||
}
|
||||
|
||||
void
|
||||
|
@ -175,10 +175,10 @@ class MacroAssemblerX86 : public MacroAssemblerX86Shared
|
||||
loadValue(Operand(src), val);
|
||||
}
|
||||
void tagValue(JSValueType type, Register payload, ValueOperand dest) {
|
||||
JS_ASSERT(payload != dest.typeReg());
|
||||
movl(ImmType(type), dest.typeReg());
|
||||
JS_ASSERT(dest.typeReg() != dest.payloadReg());
|
||||
if (payload != dest.payloadReg())
|
||||
movl(payload, dest.payloadReg());
|
||||
movl(ImmType(type), dest.typeReg());
|
||||
}
|
||||
void pushValue(ValueOperand val) {
|
||||
push(val.typeReg());
|
||||
|
Loading…
Reference in New Issue
Block a user