Revision: 14941
Author: [email protected]
Date: Tue Jun 4 13:11:16 2013
Log: MIPS : Collect type feedback for power-of-2 right operands in
BinaryOps.
Port r14928 (a2e0e18)
Original commit message:
Improved --trace-ic output for unary/binary ops a bit on the way. Moved
int32_t/uint32_t conversion helpers around.
BUG=
Review URL: https://codereview.chromium.org/16361004
Patch from Balazs Kilvady <[email protected]>.
http://code.google.com/p/v8/source/detail?r=14941
Modified:
/branches/bleeding_edge/src/mips/code-stubs-mips.cc
=======================================
--- /branches/bleeding_edge/src/mips/code-stubs-mips.cc Mon Jun 3 07:46:23
2013
+++ /branches/bleeding_edge/src/mips/code-stubs-mips.cc Tue Jun 4 13:11:16
2013
@@ -2277,7 +2277,16 @@
void BinaryOpStub::GenerateSmiStub(MacroAssembler* masm) {
- Label not_smis, call_runtime;
+ Label right_arg_changed, call_runtime;
+
+ if (op_ == Token::MOD && has_fixed_right_arg_) {
+ // It is guaranteed that the value will fit into a Smi, because if it
+ // didn't, we wouldn't be here, see BinaryOp_Patch.
+ __ Branch(&right_arg_changed,
+ ne,
+ a0,
+ Operand(Smi::FromInt(fixed_right_arg_value())));
+ }
if (result_type_ == BinaryOpIC::UNINITIALIZED ||
result_type_ == BinaryOpIC::SMI) {
@@ -2294,6 +2303,7 @@
// Code falls through if the result is not returned as either a smi or
heap
// number.
+ __ bind(&right_arg_changed);
GenerateTypeTransition(masm);
__ bind(&call_runtime);
@@ -2494,6 +2504,11 @@
// to type transition.
} else {
+ if (has_fixed_right_arg_) {
+ __ Move(f16, fixed_right_arg_value());
+ __ BranchF(&transition, NULL, ne, f14, f16);
+ }
+
// We preserved a0 and a1 to be able to call runtime.
// Save the left value on the stack.
__ Push(t1, t0);
--
--
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.