Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(5)

Side by Side Diff: src/arm/lithium-codegen-arm.cc

Issue 6312151: Fix an issue in DoMulI and address mjsunit test failure. (Closed) Base URL: http://v8.googlecode.com/svn/branches/bleeding_edge/
Patch Set: Created 9 years, 10 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2011 the V8 project authors. All rights reserved. 1 // Copyright 2011 the V8 project authors. All rights reserved.
2 // Redistribution and use in source and binary forms, with or without 2 // Redistribution and use in source and binary forms, with or without
3 // modification, are permitted provided that the following conditions are 3 // modification, are permitted provided that the following conditions are
4 // met: 4 // met:
5 // 5 //
6 // * Redistributions of source code must retain the above copyright 6 // * Redistributions of source code must retain the above copyright
7 // notice, this list of conditions and the following disclaimer. 7 // notice, this list of conditions and the following disclaimer.
8 // * Redistributions in binary form must reproduce the above 8 // * Redistributions in binary form must reproduce the above
9 // copyright notice, this list of conditions and the following 9 // copyright notice, this list of conditions and the following
10 // disclaimer in the documentation and/or other materials provided 10 // disclaimer in the documentation and/or other materials provided
(...skipping 1156 matching lines...) Expand 10 before | Expand all | Expand 10 after
1167 Register left = ToRegister(instr->InputAt(0)); 1167 Register left = ToRegister(instr->InputAt(0));
1168 Register right = EmitLoadRegister(instr->InputAt(1), scratch); 1168 Register right = EmitLoadRegister(instr->InputAt(1), scratch);
1169 1169
1170 if (instr->hydrogen()->CheckFlag(HValue::kBailoutOnMinusZero) && 1170 if (instr->hydrogen()->CheckFlag(HValue::kBailoutOnMinusZero) &&
1171 !instr->InputAt(1)->IsConstantOperand()) { 1171 !instr->InputAt(1)->IsConstantOperand()) {
1172 __ orr(ToRegister(instr->TempAt(0)), left, right); 1172 __ orr(ToRegister(instr->TempAt(0)), left, right);
1173 } 1173 }
1174 1174
1175 if (instr->hydrogen()->CheckFlag(HValue::kCanOverflow)) { 1175 if (instr->hydrogen()->CheckFlag(HValue::kCanOverflow)) {
1176 // scratch:left = left * right. 1176 // scratch:left = left * right.
1177 __ smull(scratch, left, left, right); 1177 __ smull(left, scratch, left, right);
1178 __ mov(ip, Operand(left, ASR, 31)); 1178 __ mov(ip, Operand(left, ASR, 31));
1179 __ cmp(ip, Operand(scratch)); 1179 __ cmp(ip, Operand(scratch));
1180 DeoptimizeIf(ne, instr->environment()); 1180 DeoptimizeIf(ne, instr->environment());
1181 } else { 1181 } else {
1182 __ mul(left, left, right); 1182 __ mul(left, left, right);
1183 } 1183 }
1184 1184
1185 if (instr->hydrogen()->CheckFlag(HValue::kBailoutOnMinusZero)) { 1185 if (instr->hydrogen()->CheckFlag(HValue::kBailoutOnMinusZero)) {
1186 // Bail out if the result is supposed to be negative zero. 1186 // Bail out if the result is supposed to be negative zero.
1187 Label done; 1187 Label done;
(...skipping 2217 matching lines...) Expand 10 before | Expand all | Expand 10 after
3405 3405
3406 DoubleRegister double_input = ToDoubleRegister(input); 3406 DoubleRegister double_input = ToDoubleRegister(input);
3407 Register result_reg = ToRegister(result); 3407 Register result_reg = ToRegister(result);
3408 SwVfpRegister single_scratch = double_scratch0().low(); 3408 SwVfpRegister single_scratch = double_scratch0().low();
3409 Register scratch1 = scratch0(); 3409 Register scratch1 = scratch0();
3410 Register scratch2 = ToRegister(instr->TempAt(0)); 3410 Register scratch2 = ToRegister(instr->TempAt(0));
3411 3411
3412 VFPRoundingMode rounding_mode = instr->truncating() ? kRoundToMinusInf 3412 VFPRoundingMode rounding_mode = instr->truncating() ? kRoundToMinusInf
3413 : kRoundToNearest; 3413 : kRoundToNearest;
3414 3414
3415
3416 EmitVFPTruncate(rounding_mode, 3415 EmitVFPTruncate(rounding_mode,
3417 single_scratch, 3416 single_scratch,
3418 double_input, 3417 double_input,
3419 scratch1, 3418 scratch1,
3420 scratch2); 3419 scratch2);
3421 // Deoptimize if we had a vfp invalid exception. 3420 // Deoptimize if we had a vfp invalid exception.
3422 DeoptimizeIf(ne, instr->environment()); 3421 DeoptimizeIf(ne, instr->environment());
3423 // Retrieve the result. 3422 // Retrieve the result.
3424 __ vmov(result_reg, single_scratch); 3423 __ vmov(result_reg, single_scratch);
3425 3424
(...skipping 393 matching lines...) Expand 10 before | Expand all | Expand 10 after
3819 3818
3820 3819
3821 void LCodeGen::DoOsrEntry(LOsrEntry* instr) { 3820 void LCodeGen::DoOsrEntry(LOsrEntry* instr) {
3822 Abort("DoOsrEntry unimplemented."); 3821 Abort("DoOsrEntry unimplemented.");
3823 } 3822 }
3824 3823
3825 3824
3826 #undef __ 3825 #undef __
3827 3826
3828 } } // namespace v8::internal 3827 } } // namespace v8::internal
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698