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

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

Issue 6573004: ARM: Fix DoubleToI (Closed) Base URL: https://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
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 3367 matching lines...) Expand 10 before | Expand all | Expand 10 after
3378 VFPRoundingMode rounding_mode = instr->truncating() ? kRoundToMinusInf 3378 VFPRoundingMode rounding_mode = instr->truncating() ? kRoundToMinusInf
3379 : kRoundToNearest; 3379 : kRoundToNearest;
3380 3380
3381 EmitVFPTruncate(rounding_mode, 3381 EmitVFPTruncate(rounding_mode,
3382 single_scratch, 3382 single_scratch,
3383 double_input, 3383 double_input,
3384 scratch1, 3384 scratch1,
3385 scratch2); 3385 scratch2);
3386 // Deoptimize if we had a vfp invalid exception. 3386 // Deoptimize if we had a vfp invalid exception.
3387 DeoptimizeIf(ne, instr->environment()); 3387 DeoptimizeIf(ne, instr->environment());
3388
3388 // Retrieve the result. 3389 // Retrieve the result.
3389 __ vmov(result_reg, single_scratch); 3390 __ vmov(result_reg, single_scratch);
3390 3391
3391 if (instr->truncating() && 3392 if (!instr->truncating()) {
Søren Thygesen Gjesse 2011/02/24 09:09:17 Please add a comment here explaining the conversio
3392 instr->hydrogen()->CheckFlag(HValue::kBailoutOnMinusZero)) { 3393 __ vmov(single_scratch, result_reg);
3393 Label done; 3394 __ vcvt_f64_s32(double_scratch0(), single_scratch);
3394 __ cmp(result_reg, Operand(0)); 3395 __ VFPCompareAndSetFlags(double_scratch0(), double_input);
3395 __ b(ne, &done);
3396 // Check for -0.
3397 __ vmov(scratch1, double_input.high());
3398 __ tst(scratch1, Operand(HeapNumber::kSignMask));
3399 DeoptimizeIf(ne, instr->environment()); 3396 DeoptimizeIf(ne, instr->environment());
3397 if (instr->hydrogen()->CheckFlag(HValue::kBailoutOnMinusZero)) {
3398 Label done;
3399 __ cmp(result_reg, Operand(0));
3400 __ b(ne, &done);
3401 // Check for -0.
3402 __ vmov(scratch1, double_input.high());
3403 __ tst(scratch1, Operand(HeapNumber::kSignMask));
3404 DeoptimizeIf(ne, instr->environment());
3400 3405
3401 __ bind(&done); 3406 __ bind(&done);
3407 }
3402 } 3408 }
3403 } 3409 }
3404 3410
3405 3411
3406 void LCodeGen::DoCheckSmi(LCheckSmi* instr) { 3412 void LCodeGen::DoCheckSmi(LCheckSmi* instr) {
3407 LOperand* input = instr->InputAt(0); 3413 LOperand* input = instr->InputAt(0);
3408 ASSERT(input->IsRegister()); 3414 ASSERT(input->IsRegister());
3409 __ tst(ToRegister(input), Operand(kSmiTagMask)); 3415 __ tst(ToRegister(input), Operand(kSmiTagMask));
3410 DeoptimizeIf(instr->condition(), instr->environment()); 3416 DeoptimizeIf(instr->condition(), instr->environment());
3411 } 3417 }
(...skipping 435 matching lines...) Expand 10 before | Expand all | Expand 10 after
3847 ASSERT(!environment->HasBeenRegistered()); 3853 ASSERT(!environment->HasBeenRegistered());
3848 RegisterEnvironmentForDeoptimization(environment); 3854 RegisterEnvironmentForDeoptimization(environment);
3849 ASSERT(osr_pc_offset_ == -1); 3855 ASSERT(osr_pc_offset_ == -1);
3850 osr_pc_offset_ = masm()->pc_offset(); 3856 osr_pc_offset_ = masm()->pc_offset();
3851 } 3857 }
3852 3858
3853 3859
3854 #undef __ 3860 #undef __
3855 3861
3856 } } // namespace v8::internal 3862 } } // namespace v8::internal
OLDNEW
« no previous file with comments | « no previous file | test/mjsunit/regress/regress-1181.js » ('j') | test/mjsunit/regress/regress-1181.js » ('J')

Powered by Google App Engine
This is Rietveld 408576698