Fix arm port of tracking field representations. Based on Rodolph Perfetta's comments

BUG=

Review URL: https://chromiumcodereview.appspot.com/14522003

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@14470 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
This commit is contained in:
verwaest@chromium.org 2013-04-26 19:21:54 +00:00
parent 3af78c0563
commit 4b010329c9
3 changed files with 6 additions and 10 deletions

View File

@ -2120,9 +2120,7 @@ LInstruction* LChunkBuilder::DoStoreContextSlot(HStoreContextSlot* instr) {
LInstruction* LChunkBuilder::DoLoadNamedField(HLoadNamedField* instr) {
LOperand* obj = UseRegisterAtStart(instr->object());
LOperand* temp = instr->representation().IsDouble() ? TempRegister() : NULL;
ASSERT(temp == NULL || FLAG_track_double_fields);
return DefineAsRegister(new(zone()) LLoadNamedField(obj, temp));
return DefineAsRegister(new(zone()) LLoadNamedField(obj));
}

View File

@ -1520,15 +1520,13 @@ class LReturn: public LTemplateInstruction<0, 2, 0> {
};
class LLoadNamedField: public LTemplateInstruction<1, 1, 1> {
class LLoadNamedField: public LTemplateInstruction<1, 1, 0> {
public:
explicit LLoadNamedField(LOperand* object, LOperand* temp) {
explicit LLoadNamedField(LOperand* object) {
inputs_[0] = object;
temps_[0] = temp;
}
LOperand* object() { return inputs_[0]; }
LOperand* temp() { return temps_[0]; }
DECLARE_CONCRETE_INSTRUCTION(LoadNamedField, "load-named-field")
DECLARE_HYDROGEN_ACCESSOR(LoadNamedField)

View File

@ -3085,7 +3085,7 @@ void LCodeGen::DoLoadNamedField(LLoadNamedField* instr) {
ASSERT(!instr->hydrogen()->representation().IsDouble());
}
Register temp = instr->hydrogen()->representation().IsDouble()
? ToRegister(instr->temp()) : ToRegister(instr->result());
? scratch0() : ToRegister(instr->result());
if (instr->hydrogen()->is_in_object()) {
__ ldr(temp, FieldMemOperand(object, instr->hydrogen()->offset()));
} else {
@ -3102,8 +3102,8 @@ void LCodeGen::DoLoadNamedField(LLoadNamedField* instr) {
__ vmov(flt_scratch, temp);
__ vcvt_f64_s32(result, flt_scratch);
__ b(&done);
__ sub(ip, temp, Operand(kHeapObjectTag));
__ vldr(result, ip, HeapNumber::kValueOffset);
__ bind(&load_from_heap_number);
__ vldr(result, FieldMemOperand(temp, HeapNumber::kValueOffset));
__ bind(&done);
}
}