Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(39)

Unified Diff: src/a64/lithium-codegen-a64.cc

Issue 160423002: A64 support for DoubleToIStub (truncating). (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Add test cases Created 6 years, 10 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « src/a64/lithium-a64.cc ('k') | src/a64/macro-assembler-a64.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/a64/lithium-codegen-a64.cc
diff --git a/src/a64/lithium-codegen-a64.cc b/src/a64/lithium-codegen-a64.cc
index 4c35763ab79eb08d9a7aef55675698f0b835775f..ac6a69ab6f3858adadb4590f83043ce55a188bbe 100644
--- a/src/a64/lithium-codegen-a64.cc
+++ b/src/a64/lithium-codegen-a64.cc
@@ -5307,8 +5307,7 @@ void LCodeGen::DoDeferredTaggedToI(LTaggedToI* instr,
__ JumpIfNotRoot(scratch1, Heap::kHeapNumberMapRootIndex, &check_bools);
// A heap number: load value and convert to int32 using truncating function.
- __ Ldr(dbl_scratch1, FieldMemOperand(input, HeapNumber::kValueOffset));
- __ ECMA262ToInt32(output, dbl_scratch1, scratch1, scratch2);
+ __ TruncateHeapNumberToI(output, input);
__ B(&done);
__ Bind(&check_bools);
@@ -5495,12 +5494,10 @@ void LCodeGen::DoTrapAllocationMemento(LTrapAllocationMemento* instr) {
void LCodeGen::DoTruncateDoubleToIntOrSmi(LTruncateDoubleToIntOrSmi* instr) {
DoubleRegister input = ToDoubleRegister(instr->value());
Register result = ToRegister(instr->result());
- __ ECMA262ToInt32(result, input,
- ToRegister(instr->temp1()),
- ToRegister(instr->temp2()),
- instr->tag_result()
- ? MacroAssembler::SMI
- : MacroAssembler::INT32_IN_W);
+ __ TruncateDoubleToI(result, input);
+ if (instr->tag_result()) {
+ __ SmiTag(result, result);
+ }
}
« no previous file with comments | « src/a64/lithium-a64.cc ('k') | src/a64/macro-assembler-a64.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698