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

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

Issue 12391055: Cleaned up CpuFeature scope handling. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Fixed nits Created 7 years, 9 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 | « src/x64/assembler-x64.cc ('k') | src/x64/macro-assembler-x64.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2013 the V8 project authors. All rights reserved. 1 // Copyright 2013 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 3456 matching lines...) Expand 10 before | Expand all | Expand 10 after
3467 } 3467 }
3468 } 3468 }
3469 3469
3470 3470
3471 void LCodeGen::DoMathFloor(LUnaryMathOperation* instr) { 3471 void LCodeGen::DoMathFloor(LUnaryMathOperation* instr) {
3472 XMMRegister xmm_scratch = xmm0; 3472 XMMRegister xmm_scratch = xmm0;
3473 Register output_reg = ToRegister(instr->result()); 3473 Register output_reg = ToRegister(instr->result());
3474 XMMRegister input_reg = ToDoubleRegister(instr->value()); 3474 XMMRegister input_reg = ToDoubleRegister(instr->value());
3475 3475
3476 if (CpuFeatures::IsSupported(SSE4_1)) { 3476 if (CpuFeatures::IsSupported(SSE4_1)) {
3477 CpuFeatures::Scope scope(SSE4_1); 3477 CpuFeatureScope scope(masm(), SSE4_1);
3478 if (instr->hydrogen()->CheckFlag(HValue::kBailoutOnMinusZero)) { 3478 if (instr->hydrogen()->CheckFlag(HValue::kBailoutOnMinusZero)) {
3479 // Deoptimize if minus zero. 3479 // Deoptimize if minus zero.
3480 __ movq(output_reg, input_reg); 3480 __ movq(output_reg, input_reg);
3481 __ subq(output_reg, Immediate(1)); 3481 __ subq(output_reg, Immediate(1));
3482 DeoptimizeIf(overflow, instr->environment()); 3482 DeoptimizeIf(overflow, instr->environment());
3483 } 3483 }
3484 __ roundsd(xmm_scratch, input_reg, Assembler::kRoundDown); 3484 __ roundsd(xmm_scratch, input_reg, Assembler::kRoundDown);
3485 __ cvttsd2si(output_reg, xmm_scratch); 3485 __ cvttsd2si(output_reg, xmm_scratch);
3486 __ cmpl(output_reg, Immediate(0x80000000)); 3486 __ cmpl(output_reg, Immediate(0x80000000));
3487 DeoptimizeIf(equal, instr->environment()); 3487 DeoptimizeIf(equal, instr->environment());
(...skipping 2346 matching lines...) Expand 10 before | Expand all | Expand 10 after
5834 FixedArray::kHeaderSize - kPointerSize)); 5834 FixedArray::kHeaderSize - kPointerSize));
5835 __ bind(&done); 5835 __ bind(&done);
5836 } 5836 }
5837 5837
5838 5838
5839 #undef __ 5839 #undef __
5840 5840
5841 } } // namespace v8::internal 5841 } } // namespace v8::internal
5842 5842
5843 #endif // V8_TARGET_ARCH_X64 5843 #endif // V8_TARGET_ARCH_X64
OLDNEW
« no previous file with comments | « src/x64/assembler-x64.cc ('k') | src/x64/macro-assembler-x64.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698