зеркало из https://github.com/mozilla/pjs.git
Bug 697014 - Javascript test case testTypedArrays.js failed on sparc with typed array and TI. r=bhackett1024.
This commit is contained in:
Родитель
87bb510d42
Коммит
80c732cf9a
|
@ -42,7 +42,7 @@
|
|||
#ifndef MacroAssemblerSparc_h
|
||||
#define MacroAssemblerSparc_h
|
||||
|
||||
#include <wtf/Platform.h>
|
||||
#include <assembler/wtf/Platform.h>
|
||||
|
||||
#if ENABLE_ASSEMBLER && WTF_CPU_SPARC
|
||||
|
||||
|
|
|
@ -42,7 +42,7 @@
|
|||
#ifndef SparcAssembler_h
|
||||
#define SparcAssembler_h
|
||||
|
||||
#include <wtf/Platform.h>
|
||||
#include <assembler/wtf/Platform.h>
|
||||
|
||||
// Some debug code uses s(n)printf for instruction logging.
|
||||
#include <stdio.h>
|
||||
|
@ -50,7 +50,7 @@
|
|||
#if ENABLE_ASSEMBLER && WTF_CPU_SPARC
|
||||
|
||||
#include "AssemblerBufferWithConstantPool.h"
|
||||
#include <wtf/Assertions.h>
|
||||
#include <assembler/wtf/Assertions.h>
|
||||
|
||||
#include "methodjit/Logging.h"
|
||||
#define IPFX " %s"
|
||||
|
|
|
@ -812,7 +812,7 @@ TypedArray::obj_setSpecialAttributes(JSContext *cx, JSObject *obj, SpecialId sid
|
|||
/* static */ int
|
||||
TypedArray::lengthOffset()
|
||||
{
|
||||
return JSObject::getFixedSlotOffset(FIELD_LENGTH) + offsetof(jsval_layout, s.payload);
|
||||
return JSObject::getFixedSlotOffset(FIELD_LENGTH);
|
||||
}
|
||||
|
||||
/* static */ int
|
||||
|
|
|
@ -1387,7 +1387,8 @@ mjit::Compiler::jsop_setelem_typed(int atype)
|
|||
objReg = frame.copyDataIntoReg(obj);
|
||||
|
||||
// Bounds check.
|
||||
Jump lengthGuard = masm.guardArrayExtent(TypedArray::lengthOffset(),
|
||||
int lengthOffset = TypedArray::lengthOffset() + offsetof(jsval_layout, s.payload);
|
||||
Jump lengthGuard = masm.guardArrayExtent(lengthOffset,
|
||||
objReg, key, Assembler::BelowOrEqual);
|
||||
stubcc.linkExit(lengthGuard, Uses(3));
|
||||
|
||||
|
@ -1913,7 +1914,8 @@ mjit::Compiler::jsop_getelem_typed(int atype)
|
|||
objReg = frame.copyDataIntoReg(obj);
|
||||
|
||||
// Bounds check.
|
||||
Jump lengthGuard = masm.guardArrayExtent(TypedArray::lengthOffset(),
|
||||
int lengthOffset = TypedArray::lengthOffset() + offsetof(jsval_layout, s.payload);
|
||||
Jump lengthGuard = masm.guardArrayExtent(lengthOffset,
|
||||
objReg, key, Assembler::BelowOrEqual);
|
||||
stubcc.linkExit(lengthGuard, Uses(2));
|
||||
|
||||
|
|
|
@ -1327,7 +1327,7 @@ LoopState::restoreInvariants(jsbytecode *pc, Assembler &masm,
|
|||
if (entry.kind == InvariantEntry::DENSE_ARRAY_BOUNDS_CHECK)
|
||||
masm.load32(Address(T0, offsetof(JSObject, initializedLength)), T0);
|
||||
else
|
||||
masm.load32(Address(T0, TypedArray::lengthOffset()), T0);
|
||||
masm.loadPayload(Address(T0, TypedArray::lengthOffset()), T0);
|
||||
|
||||
int32 constant = entry.u.check.constant;
|
||||
|
||||
|
@ -1418,7 +1418,7 @@ LoopState::restoreInvariants(jsbytecode *pc, Assembler &masm,
|
|||
Address address = frame.addressOf(frame.getTemporary(entry.u.array.temporary));
|
||||
|
||||
if (entry.kind == InvariantEntry::TYPED_ARRAY_LENGTH) {
|
||||
masm.load32(Address(T0, TypedArray::lengthOffset()), T0);
|
||||
masm.loadPayload(Address(T0, TypedArray::lengthOffset()), T0);
|
||||
masm.storeValueFromComponents(ImmType(JSVAL_TYPE_INT32), T0, address);
|
||||
} else {
|
||||
masm.loadPtr(Address(T0, js::TypedArray::dataOffset()), T0);
|
||||
|
|
|
@ -2777,7 +2777,7 @@ GetElementIC::attachTypedArray(VMFrame &f, JSObject *obj, const Value &v, jsid i
|
|||
|
||||
// Bounds check.
|
||||
Jump outOfBounds;
|
||||
Address typedArrayLength(objReg, TypedArray::lengthOffset());
|
||||
Address typedArrayLength = masm.payloadOf(Address(objReg, TypedArray::lengthOffset()));
|
||||
if (idRemat.isConstant()) {
|
||||
JS_ASSERT(idRemat.value().toInt32() == v.toInt32());
|
||||
outOfBounds = masm.branch32(Assembler::BelowOrEqual, typedArrayLength, Imm32(v.toInt32()));
|
||||
|
@ -3125,7 +3125,7 @@ SetElementIC::attachTypedArray(VMFrame &f, JSObject *obj, int32 key)
|
|||
|
||||
// Bounds check.
|
||||
Jump outOfBounds;
|
||||
Address typedArrayLength(objReg, TypedArray::lengthOffset());
|
||||
Address typedArrayLength = masm.payloadOf(Address(objReg, TypedArray::lengthOffset()));
|
||||
if (hasConstantKey)
|
||||
outOfBounds = masm.branch32(Assembler::BelowOrEqual, typedArrayLength, Imm32(keyValue));
|
||||
else
|
||||
|
|
Загрузка…
Ссылка в новой задаче