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

Side by Side Diff: src/x64/lithium-gap-resolver-x64.cc

Issue 100843002: x64: save a bit code size (Closed) Base URL: git://github.com/v8/v8.git@master
Patch Set: Created 7 years 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
« 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 180 matching lines...) Expand 10 before | Expand all | Expand 10 after
191 __ movq(dst, kScratchRegister); 191 __ movq(dst, kScratchRegister);
192 } 192 }
193 193
194 } else if (source->IsConstantOperand()) { 194 } else if (source->IsConstantOperand()) {
195 LConstantOperand* constant_source = LConstantOperand::cast(source); 195 LConstantOperand* constant_source = LConstantOperand::cast(source);
196 if (destination->IsRegister()) { 196 if (destination->IsRegister()) {
197 Register dst = cgen_->ToRegister(destination); 197 Register dst = cgen_->ToRegister(destination);
198 if (cgen_->IsSmiConstant(constant_source)) { 198 if (cgen_->IsSmiConstant(constant_source)) {
199 __ Move(dst, cgen_->ToSmi(constant_source)); 199 __ Move(dst, cgen_->ToSmi(constant_source));
200 } else if (cgen_->IsInteger32Constant(constant_source)) { 200 } else if (cgen_->IsInteger32Constant(constant_source)) {
201 __ movl(dst, Immediate(cgen_->ToInteger32(constant_source))); 201 __ Set(dst, cgen_->ToInteger32(constant_source));
202 } else { 202 } else {
203 __ Move(dst, cgen_->ToHandle(constant_source)); 203 __ Move(dst, cgen_->ToHandle(constant_source));
204 } 204 }
205 } else if (destination->IsDoubleRegister()) { 205 } else if (destination->IsDoubleRegister()) {
206 double v = cgen_->ToDouble(constant_source); 206 double v = cgen_->ToDouble(constant_source);
207 uint64_t int_val = BitCast<uint64_t, double>(v); 207 uint64_t int_val = BitCast<uint64_t, double>(v);
208 XMMRegister dst = cgen_->ToDoubleRegister(destination); 208 XMMRegister dst = cgen_->ToDoubleRegister(destination);
209 if (int_val == 0) { 209 if (int_val == 0) {
210 __ xorps(dst, dst); 210 __ xorps(dst, dst);
211 } else { 211 } else {
(...skipping 115 matching lines...) Expand 10 before | Expand all | Expand 10 after
327 moves_[i].set_source(source); 327 moves_[i].set_source(source);
328 } 328 }
329 } 329 }
330 } 330 }
331 331
332 #undef __ 332 #undef __
333 333
334 } } // namespace v8::internal 334 } } // namespace v8::internal
335 335
336 #endif // V8_TARGET_ARCH_X64 336 #endif // V8_TARGET_ARCH_X64
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