Reviewers: Rodolph Perfetta (ARM), ulan,

Description:
A64: a smi can hold any signed integer, so we don't need a deferred tag method
for it

BUG=none
[email protected], [email protected]
LOG=y

Please review this at https://codereview.chromium.org/151363002/

SVN Base: https://v8.googlecode.com/svn/branches/experimental/a64

Affected files (+7, -15 lines):
  M src/a64/lithium-codegen-a64.h
  M src/a64/lithium-codegen-a64.cc


Index: src/a64/lithium-codegen-a64.cc
diff --git a/src/a64/lithium-codegen-a64.cc b/src/a64/lithium-codegen-a64.cc
index c0649f1698a3db51d114dc721ff2137a88e5f1a1..ed2f08f884a873d0e1938ab800de6ea683e5f5d3 100644
--- a/src/a64/lithium-codegen-a64.cc
+++ b/src/a64/lithium-codegen-a64.cc
@@ -4321,11 +4321,10 @@ void LCodeGen::DoNumberTagD(LNumberTagD* instr) {
 }


-void LCodeGen::DoDeferredNumberTagI(LInstruction* instr,
+void LCodeGen::DoDeferredNumberTagU(LInstruction* instr,
                                     LOperand* value,
                                     LOperand* temp1,
-                                    LOperand* temp2,
-                                    IntegerSignedness signedness) {
+                                    LOperand* temp2) {
   Label slow, convert_and_store;
   Register src = ToRegister32(value);
   Register dst = ToRegister(instr->result());
@@ -4363,12 +4362,7 @@ void LCodeGen::DoDeferredNumberTagI(LInstruction* instr,
   // number.
   __ Bind(&convert_and_store);
   DoubleRegister dbl_scratch = double_scratch();
-  if (signedness == SIGNED_INT32) {
-    ASM_UNIMPLEMENTED_BREAK("DeferredNumberTagI - signed int32 case.");
-  } else {
-    ASSERT(signedness == UNSIGNED_INT32);
-    __ Ucvtf(dbl_scratch, src);
-  }
+  __ Ucvtf(dbl_scratch, src);
   __ Str(dbl_scratch, FieldMemOperand(dst, HeapNumber::kValueOffset));
 }

@@ -4379,11 +4373,10 @@ void LCodeGen::DoNumberTagU(LNumberTagU* instr) {
     DeferredNumberTagU(LCodeGen* codegen, LNumberTagU* instr)
         : LDeferredCode(codegen), instr_(instr) { }
     virtual void Generate() {
-      codegen()->DoDeferredNumberTagI(instr_,
+      codegen()->DoDeferredNumberTagU(instr_,
                                       instr_->value(),
                                       instr_->temp1(),
-                                      instr_->temp2(),
-                                      UNSIGNED_INT32);
+                                      instr_->temp2());
     }
     virtual LInstruction* instr() { return instr_; }
    private:
Index: src/a64/lithium-codegen-a64.h
diff --git a/src/a64/lithium-codegen-a64.h b/src/a64/lithium-codegen-a64.h
index 63fec4700c76796a7b571caeded0e4d316469cab..219b1d92d60febb5c35403a8961fbfe640c5c94a 100644
--- a/src/a64/lithium-codegen-a64.h
+++ b/src/a64/lithium-codegen-a64.h
@@ -165,11 +165,10 @@ class LCodeGen BASE_EMBEDDED {
                                Label* allocation_entry);

   enum IntegerSignedness { SIGNED_INT32, UNSIGNED_INT32 };
-  void DoDeferredNumberTagI(LInstruction* instr,
+  void DoDeferredNumberTagU(LInstruction* instr,
                             LOperand* value,
                             LOperand* temp1,
-                            LOperand* temp2,
-                            IntegerSignedness signedness);
+                            LOperand* temp2);
   void DoDeferredTaggedToI(LTaggedToI* instr,
                            LOperand* value,
                            LOperand* temp1,


--
--
v8-dev mailing list
[email protected]
http://groups.google.com/group/v8-dev
--- You received this message because you are subscribed to the Google Groups "v8-dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
For more options, visit https://groups.google.com/groups/opt_out.

Reply via email to