Reviewers: fschneider,
Description:
Remove a generated mov and jmp.
Remove a move and jump from the fast-path code in the speculative
backend. Ultimately, this code belongs to the bailout and not the
fast path.
Please review this at http://codereview.chromium.org/601074
Affected files:
M src/arm/fast-codegen-arm.cc
M src/ia32/fast-codegen-ia32.cc
M src/x64/fast-codegen-x64.cc
Index: src/arm/fast-codegen-arm.cc
diff --git a/src/arm/fast-codegen-arm.cc b/src/arm/fast-codegen-arm.cc
index
1029609f1a89baf9233c2cec583a7b9f43e6b112..a07b0d2dcbe0b7fc6244f3604e36313695c39a6b
100644
--- a/src/arm/fast-codegen-arm.cc
+++ b/src/arm/fast-codegen-arm.cc
@@ -156,13 +156,9 @@ void FastCodeGenerator::EmitBitOr() {
} else {
// Preserve the destination operand in a scratch register in case of
// bailout.
- Label done;
__ mov(scratch0(), destination());
__ orr(destination(), accumulator1(), Operand(accumulator0()));
- __ BranchOnSmi(destination(), &done);
- __ mov(destination(), scratch0());
- __ jmp(bailout());
- __ bind(&done);
+ __ BranchOnNotSmi(destination(), bailout());
}
// If we didn't bailout, the result (in fact, both inputs too) is known
to
Index: src/ia32/fast-codegen-ia32.cc
diff --git a/src/ia32/fast-codegen-ia32.cc b/src/ia32/fast-codegen-ia32.cc
index
39c77eeade0fa419cf083ac161d6ed181773d162..9bab75aa613146cca05e3d4284be64d3a468b17d
100644
--- a/src/ia32/fast-codegen-ia32.cc
+++ b/src/ia32/fast-codegen-ia32.cc
@@ -165,14 +165,10 @@ void FastCodeGenerator::EmitBitOr() {
} else {
// Preserve the destination operand in a scratch register in case of
// bailout.
- Label done;
__ mov(scratch0(), destination());
__ or_(destination(), Operand(other_accumulator(destination())));
__ test(destination(), Immediate(kSmiTagMask));
- __ j(zero, &done, taken);
- __ mov(destination(), scratch0());
- __ jmp(bailout());
- __ bind(&done);
+ __ j(not_zero, bailout(), not_taken);
}
// If we didn't bailout, the result (in fact, both inputs too) is known
to
Index: src/x64/fast-codegen-x64.cc
diff --git a/src/x64/fast-codegen-x64.cc b/src/x64/fast-codegen-x64.cc
index
fe61ff73f5b92ba6471397e4d02134c3f67f0d57..1af7685544991170055d9fd1c5146283930d7b70
100644
--- a/src/x64/fast-codegen-x64.cc
+++ b/src/x64/fast-codegen-x64.cc
@@ -165,13 +165,9 @@ void FastCodeGenerator::EmitBitOr() {
} else {
// Preserve the destination operand in a scratch register in case of
// bailout.
- Label done;
__ movq(scratch0(), destination());
__ or_(destination(), other_accumulator(destination()));
- __ JumpIfSmi(destination(), &done);
- __ movq(destination(), scratch0());
- __ jmp(bailout());
- __ bind(&done);
+ __ JumpIfNotSmi(destination(), bailout());
}
--
v8-dev mailing list
[email protected]
http://groups.google.com/group/v8-dev