ARM64: Slightly improve MacroAssembler::Allocate.
authorJacob.Bramley@arm.com <Jacob.Bramley@arm.com@ce2b1a6d-e550-0410-aec6-3dcde31c8c00>
Thu, 24 Apr 2014 14:55:28 +0000 (14:55 +0000)
committerJacob.Bramley@arm.com <Jacob.Bramley@arm.com@ce2b1a6d-e550-0410-aec6-3dcde31c8c00>
Thu, 24 Apr 2014 14:55:28 +0000 (14:55 +0000)
BUG=
R=ulan@chromium.org

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@20946 ce2b1a6d-e550-0410-aec6-3dcde31c8c00

src/arm64/constants-arm64.h
src/arm64/lithium-codegen-arm64.cc
src/arm64/lithium-codegen-arm64.h
src/arm64/macro-assembler-arm64.cc
src/arm64/macro-assembler-arm64.h

index 8866e23cf1bdafbefc743d9ac2fdc9a62c136396..f856a1b433dc7a95ac4275f06d346e5a90807ad7 100644 (file)
@@ -262,8 +262,8 @@ const int ImmPCRel_mask = ImmPCRelLo_mask | ImmPCRelHi_mask;
 enum Condition {
   eq = 0,
   ne = 1,
-  hs = 2,
-  lo = 3,
+  hs = 2, cs = hs,
+  lo = 3, cc = lo,
   mi = 4,
   pl = 5,
   vs = 6,
index 3f0e814d3d3e5d844a1eb5f256dd87c7a99e17f3..8f5b811820e04e45f1c88a9963a61c2532f94a24 100644 (file)
@@ -1778,23 +1778,23 @@ void LCodeGen::DoBitS(LBitS* instr) {
 
 
 void LCodeGen::DoBoundsCheck(LBoundsCheck *instr) {
-  Condition cc = instr->hydrogen()->allow_equality() ? hi : hs;
+  Condition cond = instr->hydrogen()->allow_equality() ? hi : hs;
   ASSERT(instr->hydrogen()->index()->representation().IsInteger32());
   ASSERT(instr->hydrogen()->length()->representation().IsInteger32());
   if (instr->index()->IsConstantOperand()) {
     Operand index = ToOperand32I(instr->index());
     Register length = ToRegister32(instr->length());
     __ Cmp(length, index);
-    cc = ReverseConditionForCmp(cc);
+    cond = ReverseConditionForCmp(cond);
   } else {
     Register index = ToRegister32(instr->index());
     Operand length = ToOperand32I(instr->length());
     __ Cmp(index, length);
   }
   if (FLAG_debug_code && instr->hydrogen()->skip_check()) {
-    __ Assert(InvertCondition(cc), kEliminatedBoundsCheckFailed);
+    __ Assert(InvertCondition(cond), kEliminatedBoundsCheckFailed);
   } else {
-    DeoptimizeIf(cc, instr->environment());
+    DeoptimizeIf(cond, instr->environment());
   }
 }
 
index 79d6b503d14cd0227e2b26ab620ccd704928c3b2..d6fe74f1740c5005ffe6a1352787944f835908f2 100644 (file)
@@ -228,7 +228,7 @@ class LCodeGen: public LCodeGenBase {
       Deoptimizer::BailoutType* override_bailout_type = NULL);
   void Deoptimize(LEnvironment* environment,
                   Deoptimizer::BailoutType* override_bailout_type = NULL);
-  void DeoptimizeIf(Condition cc, LEnvironment* environment);
+  void DeoptimizeIf(Condition cond, LEnvironment* environment);
   void DeoptimizeIfZero(Register rt, LEnvironment* environment);
   void DeoptimizeIfNotZero(Register rt, LEnvironment* environment);
   void DeoptimizeIfNegative(Register rt, LEnvironment* environment);
index c0efe9f7ad36fd35d4d4014327ae2964731bb2bb..303a3789646aa60fa17fe90687975f9b0b842105 100644 (file)
@@ -1537,9 +1537,9 @@ void MacroAssembler::Throw(BailoutReason reason) {
 }
 
 
-void MacroAssembler::ThrowIf(Condition cc, BailoutReason reason) {
+void MacroAssembler::ThrowIf(Condition cond, BailoutReason reason) {
   Label ok;
-  B(InvertCondition(cc), &ok);
+  B(InvertCondition(cond), &ok);
   Throw(reason);
   Bind(&ok);
 }
@@ -3311,8 +3311,7 @@ void MacroAssembler::Allocate(int object_size,
 
   // Calculate new top and bail out if new space is exhausted.
   Adds(scratch3, result, object_size);
-  B(vs, gc_required);
-  Cmp(scratch3, allocation_limit);
+  Ccmp(scratch3, allocation_limit, CFlag, cc);
   B(hi, gc_required);
   Str(scratch3, MemOperand(top_address));
 
@@ -3393,8 +3392,7 @@ void MacroAssembler::Allocate(Register object_size,
     Check(eq, kUnalignedAllocationInNewSpace);
   }
 
-  B(vs, gc_required);
-  Cmp(scratch3, allocation_limit);
+  Ccmp(scratch3, allocation_limit, CFlag, cc);
   B(hi, gc_required);
   Str(scratch3, MemOperand(top_address));
 
index 904cf50f176543857d89e530df540aae486627ca..c1f82a722176e4ee4830f21fe20dc1040767632c 100644 (file)
@@ -1068,7 +1068,7 @@ class MacroAssembler : public Assembler {
   void Throw(BailoutReason reason);
 
   // Throw a message string as an exception if a condition is not true.
-  void ThrowIf(Condition cc, BailoutReason reason);
+  void ThrowIf(Condition cond, BailoutReason reason);
 
   // Throw a message string as an exception if the value is a smi.
   void ThrowIfSmi(const Register& value, BailoutReason reason);