ARM64: fix DoDeferredTaggedToI

BUG=

R=ulan@chromium.org

Review URL: https://codereview.chromium.org/211063004

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@20272 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
parent ccef98ec
...@@ -1106,8 +1106,7 @@ LInstruction* LChunkBuilder::DoChange(HChange* instr) { ...@@ -1106,8 +1106,7 @@ LInstruction* LChunkBuilder::DoChange(HChange* instr) {
} else { } else {
LOperand* value = UseRegister(instr->value()); LOperand* value = UseRegister(instr->value());
LOperand* temp1 = TempRegister(); LOperand* temp1 = TempRegister();
LOperand* temp2 = LOperand* temp2 = instr->CanTruncateToInt32() ? NULL : FixedTemp(d24);
instr->CanTruncateToInt32() ? TempRegister() : FixedTemp(d24);
res = DefineAsRegister(new(zone()) LTaggedToI(value, temp1, temp2)); res = DefineAsRegister(new(zone()) LTaggedToI(value, temp1, temp2));
res = AssignEnvironment(res); res = AssignEnvironment(res);
} }
......
...@@ -5522,7 +5522,6 @@ void LCodeGen::DoDeferredTaggedToI(LTaggedToI* instr, ...@@ -5522,7 +5522,6 @@ void LCodeGen::DoDeferredTaggedToI(LTaggedToI* instr,
if (instr->truncating()) { if (instr->truncating()) {
Register output = ToRegister(instr->result()); Register output = ToRegister(instr->result());
Register scratch2 = ToRegister(temp2);
Label check_bools; Label check_bools;
// If it's not a heap number, jump to undefined check. // If it's not a heap number, jump to undefined check.
...@@ -5535,11 +5534,11 @@ void LCodeGen::DoDeferredTaggedToI(LTaggedToI* instr, ...@@ -5535,11 +5534,11 @@ void LCodeGen::DoDeferredTaggedToI(LTaggedToI* instr,
__ Bind(&check_bools); __ Bind(&check_bools);
Register true_root = output; Register true_root = output;
Register false_root = scratch2; Register false_root = scratch1;
__ LoadTrueFalseRoots(true_root, false_root); __ LoadTrueFalseRoots(true_root, false_root);
__ Cmp(scratch1, true_root); __ Cmp(input, true_root);
__ Cset(output, eq); __ Cset(output, eq);
__ Ccmp(scratch1, false_root, ZFlag, ne); __ Ccmp(input, false_root, ZFlag, ne);
__ B(eq, &done); __ B(eq, &done);
// Output contains zero, undefined is converted to zero for truncating // Output contains zero, undefined is converted to zero for truncating
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment