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

Side by Side Diff: src/x64/macro-assembler-x64.cc

Issue 233013004: Version 3.25.28.12 (merged r20544, r20645, r20664, r20553) (Closed) Base URL: https://v8.googlecode.com/svn/branches/3.25
Patch Set: Created 6 years, 8 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/lithium-x64.cc ('k') | test/cctest/test-disasm-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 2012 the V8 project authors. All rights reserved. 1 // Copyright 2012 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 3194 matching lines...) Expand 10 before | Expand all | Expand 10 after
3205 if (input_reg.is(result_reg)) { 3205 if (input_reg.is(result_reg)) {
3206 subp(rsp, Immediate(kDoubleSize)); 3206 subp(rsp, Immediate(kDoubleSize));
3207 movsd(MemOperand(rsp, 0), xmm0); 3207 movsd(MemOperand(rsp, 0), xmm0);
3208 SlowTruncateToI(result_reg, rsp, 0); 3208 SlowTruncateToI(result_reg, rsp, 0);
3209 addp(rsp, Immediate(kDoubleSize)); 3209 addp(rsp, Immediate(kDoubleSize));
3210 } else { 3210 } else {
3211 SlowTruncateToI(result_reg, input_reg); 3211 SlowTruncateToI(result_reg, input_reg);
3212 } 3212 }
3213 3213
3214 bind(&done); 3214 bind(&done);
3215 // Keep our invariant that the upper 32 bits are zero.
3216 movl(result_reg, result_reg);
3215 } 3217 }
3216 3218
3217 3219
3218 void MacroAssembler::TruncateDoubleToI(Register result_reg, 3220 void MacroAssembler::TruncateDoubleToI(Register result_reg,
3219 XMMRegister input_reg) { 3221 XMMRegister input_reg) {
3220 Label done; 3222 Label done;
3221 cvttsd2siq(result_reg, input_reg); 3223 cvttsd2siq(result_reg, input_reg);
3222 cmpq(result_reg, Immediate(1)); 3224 cmpq(result_reg, Immediate(1));
3223 j(no_overflow, &done, Label::kNear); 3225 j(no_overflow, &done, Label::kNear);
3224 3226
3225 subp(rsp, Immediate(kDoubleSize)); 3227 subp(rsp, Immediate(kDoubleSize));
3226 movsd(MemOperand(rsp, 0), input_reg); 3228 movsd(MemOperand(rsp, 0), input_reg);
3227 SlowTruncateToI(result_reg, rsp, 0); 3229 SlowTruncateToI(result_reg, rsp, 0);
3228 addp(rsp, Immediate(kDoubleSize)); 3230 addp(rsp, Immediate(kDoubleSize));
3229 3231
3230 bind(&done); 3232 bind(&done);
3233 // Keep our invariant that the upper 32 bits are zero.
3234 movl(result_reg, result_reg);
3231 } 3235 }
3232 3236
3233 3237
3234 void MacroAssembler::DoubleToI(Register result_reg, 3238 void MacroAssembler::DoubleToI(Register result_reg,
3235 XMMRegister input_reg, 3239 XMMRegister input_reg,
3236 XMMRegister scratch, 3240 XMMRegister scratch,
3237 MinusZeroMode minus_zero_mode, 3241 MinusZeroMode minus_zero_mode,
3238 Label* conversion_failed, 3242 Label* conversion_failed,
3239 Label::Distance dst) { 3243 Label::Distance dst) {
3240 cvttsd2si(result_reg, input_reg); 3244 cvttsd2si(result_reg, input_reg);
(...skipping 1844 matching lines...) Expand 10 before | Expand all | Expand 10 after
5085 if (ms.shift() > 0) sarl(rdx, Immediate(ms.shift())); 5089 if (ms.shift() > 0) sarl(rdx, Immediate(ms.shift()));
5086 movl(rax, dividend); 5090 movl(rax, dividend);
5087 shrl(rax, Immediate(31)); 5091 shrl(rax, Immediate(31));
5088 addl(rdx, rax); 5092 addl(rdx, rax);
5089 } 5093 }
5090 5094
5091 5095
5092 } } // namespace v8::internal 5096 } } // namespace v8::internal
5093 5097
5094 #endif // V8_TARGET_ARCH_X64 5098 #endif // V8_TARGET_ARCH_X64
OLDNEW
« no previous file with comments | « src/x64/lithium-x64.cc ('k') | test/cctest/test-disasm-x64.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698