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

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

Issue 7236028: Merge revision 7629 and 8402 to the 3.2 branch. (Closed) Base URL: http://v8.googlecode.com/svn/branches/3.2/
Patch Set: '' Created 9 years, 6 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/version.cc ('k') | test/mjsunit/math-abs.js » ('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 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 2672 matching lines...) Expand 10 before | Expand all | Expand 10 after
2683 __ subsd(scratch, input_reg); 2683 __ subsd(scratch, input_reg);
2684 __ andpd(input_reg, scratch); 2684 __ andpd(input_reg, scratch);
2685 } else if (r.IsInteger32()) { 2685 } else if (r.IsInteger32()) {
2686 EmitIntegerMathAbs(instr); 2686 EmitIntegerMathAbs(instr);
2687 } else { // Tagged case. 2687 } else { // Tagged case.
2688 DeferredMathAbsTaggedHeapNumber* deferred = 2688 DeferredMathAbsTaggedHeapNumber* deferred =
2689 new DeferredMathAbsTaggedHeapNumber(this, instr); 2689 new DeferredMathAbsTaggedHeapNumber(this, instr);
2690 Register input_reg = ToRegister(instr->InputAt(0)); 2690 Register input_reg = ToRegister(instr->InputAt(0));
2691 // Smi check. 2691 // Smi check.
2692 __ JumpIfNotSmi(input_reg, deferred->entry()); 2692 __ JumpIfNotSmi(input_reg, deferred->entry());
2693 __ SmiToInteger32(input_reg, input_reg);
2693 EmitIntegerMathAbs(instr); 2694 EmitIntegerMathAbs(instr);
2695 __ Integer32ToSmi(input_reg, input_reg);
2694 __ bind(deferred->exit()); 2696 __ bind(deferred->exit());
2695 } 2697 }
2696 } 2698 }
2697 2699
2698 2700
2699 void LCodeGen::DoMathFloor(LUnaryMathOperation* instr) { 2701 void LCodeGen::DoMathFloor(LUnaryMathOperation* instr) {
2700 XMMRegister xmm_scratch = xmm0; 2702 XMMRegister xmm_scratch = xmm0;
2701 Register output_reg = ToRegister(instr->result()); 2703 Register output_reg = ToRegister(instr->result());
2702 XMMRegister input_reg = ToDoubleRegister(instr->InputAt(0)); 2704 XMMRegister input_reg = ToDoubleRegister(instr->InputAt(0));
2703 __ xorpd(xmm_scratch, xmm_scratch); // Zero the register. 2705 __ xorpd(xmm_scratch, xmm_scratch); // Zero the register.
(...skipping 1300 matching lines...) Expand 10 before | Expand all | Expand 10 after
4004 RegisterEnvironmentForDeoptimization(environment); 4006 RegisterEnvironmentForDeoptimization(environment);
4005 ASSERT(osr_pc_offset_ == -1); 4007 ASSERT(osr_pc_offset_ == -1);
4006 osr_pc_offset_ = masm()->pc_offset(); 4008 osr_pc_offset_ = masm()->pc_offset();
4007 } 4009 }
4008 4010
4009 #undef __ 4011 #undef __
4010 4012
4011 } } // namespace v8::internal 4013 } } // namespace v8::internal
4012 4014
4013 #endif // V8_TARGET_ARCH_X64 4015 #endif // V8_TARGET_ARCH_X64
OLDNEW
« no previous file with comments | « src/version.cc ('k') | test/mjsunit/math-abs.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698