Commit 1bdc421a authored by Jacob.Bramley@arm.com's avatar Jacob.Bramley@arm.com

ARM64: Slightly improve MacroAssembler::Allocate.

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
parent 01ef9aef
......@@ -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,
......
......@@ -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());
}
}
......
......@@ -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);
......
......@@ -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));
......
......@@ -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);
......
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