Fix wrong parenthesis in stub ARM and MIPS generation code.

I think the problem did not manifest as a bug, since the only
consequence was to generate extra code to return heap number
results in case of the INT32-stub.
Review URL: http://codereview.chromium.org/7192006

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@8321 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
parent 973fca16
......@@ -2561,37 +2561,36 @@ void BinaryOpStub::GenerateInt32Stub(MacroAssembler* masm) {
case Token::MUL:
case Token::DIV:
case Token::MOD: {
// Load both operands and check that they are 32-bit integer.
// Jump to type transition if they are not. The registers r0 and r1 (right
// and left) are preserved for the runtime call.
FloatingPointHelper::Destination destination =
CpuFeatures::IsSupported(VFP3) &&
op_ != Token::MOD ?
FloatingPointHelper::kVFPRegisters :
FloatingPointHelper::kCoreRegisters;
FloatingPointHelper::LoadNumberAsInt32Double(masm,
right,
destination,
d7,
r2,
r3,
heap_number_map,
scratch1,
scratch2,
s0,
&transition);
FloatingPointHelper::LoadNumberAsInt32Double(masm,
left,
destination,
d6,
r4,
r5,
heap_number_map,
scratch1,
scratch2,
s0,
&transition);
// Load both operands and check that they are 32-bit integer.
// Jump to type transition if they are not. The registers r0 and r1 (right
// and left) are preserved for the runtime call.
FloatingPointHelper::Destination destination =
(CpuFeatures::IsSupported(VFP3) && op_ != Token::MOD)
? FloatingPointHelper::kVFPRegisters
: FloatingPointHelper::kCoreRegisters;
FloatingPointHelper::LoadNumberAsInt32Double(masm,
right,
destination,
d7,
r2,
r3,
heap_number_map,
scratch1,
scratch2,
s0,
&transition);
FloatingPointHelper::LoadNumberAsInt32Double(masm,
left,
destination,
d6,
r4,
r5,
heap_number_map,
scratch1,
scratch2,
s0,
&transition);
if (destination == FloatingPointHelper::kVFPRegisters) {
CpuFeatures::Scope scope(VFP3);
......@@ -2655,8 +2654,8 @@ void BinaryOpStub::GenerateInt32Stub(MacroAssembler* masm) {
__ bind(&return_heap_number);
// Return a heap number, or fall through to type transition or runtime
// call if we can't.
if (result_type_ >= (op_ == Token::DIV) ? BinaryOpIC::HEAP_NUMBER
: BinaryOpIC::INT32) {
if (result_type_ >= ((op_ == Token::DIV) ? BinaryOpIC::HEAP_NUMBER
: BinaryOpIC::INT32)) {
// We are using vfp registers so r5 is available.
heap_number_result = r5;
GenerateHeapResultAllocation(masm,
......
......@@ -2690,37 +2690,36 @@ void BinaryOpStub::GenerateInt32Stub(MacroAssembler* masm) {
case Token::MUL:
case Token::DIV:
case Token::MOD: {
// Load both operands and check that they are 32-bit integer.
// Jump to type transition if they are not. The registers a0 and a1 (right
// and left) are preserved for the runtime call.
FloatingPointHelper::Destination destination =
CpuFeatures::IsSupported(FPU) &&
op_ != Token::MOD ?
FloatingPointHelper::kFPURegisters :
FloatingPointHelper::kCoreRegisters;
FloatingPointHelper::LoadNumberAsInt32Double(masm,
right,
destination,
f14,
a2,
a3,
heap_number_map,
scratch1,
scratch2,
f2,
&transition);
FloatingPointHelper::LoadNumberAsInt32Double(masm,
left,
destination,
f12,
t0,
t1,
heap_number_map,
scratch1,
scratch2,
f2,
&transition);
// Load both operands and check that they are 32-bit integer.
// Jump to type transition if they are not. The registers a0 and a1 (right
// and left) are preserved for the runtime call.
FloatingPointHelper::Destination destination =
(CpuFeatures::IsSupported(FPU) && op_ != Token::MOD)
? FloatingPointHelper::kFPURegisters
: FloatingPointHelper::kCoreRegisters;
FloatingPointHelper::LoadNumberAsInt32Double(masm,
right,
destination,
f14,
a2,
a3,
heap_number_map,
scratch1,
scratch2,
f2,
&transition);
FloatingPointHelper::LoadNumberAsInt32Double(masm,
left,
destination,
f12,
t0,
t1,
heap_number_map,
scratch1,
scratch2,
f2,
&transition);
if (destination == FloatingPointHelper::kFPURegisters) {
CpuFeatures::Scope scope(FPU);
......@@ -2790,8 +2789,8 @@ void BinaryOpStub::GenerateInt32Stub(MacroAssembler* masm) {
// DIV just falls through to allocating a heap number.
}
if (result_type_ >= (op_ == Token::DIV) ? BinaryOpIC::HEAP_NUMBER
: BinaryOpIC::INT32) {
if (result_type_ >= ((op_ == Token::DIV) ? BinaryOpIC::HEAP_NUMBER
: BinaryOpIC::INT32)) {
__ bind(&return_heap_number);
// We are using FPU registers so s0 is available.
heap_number_result = s0;
......
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