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

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

Issue 15932011: Don't explicitly pass requested representations to constants; implement ConstantS (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Created 7 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
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 1547 matching lines...) Expand 10 before | Expand all | Expand 10 after
1558 } 1558 }
1559 } 1559 }
1560 1560
1561 1561
1562 void LCodeGen::DoConstantI(LConstantI* instr) { 1562 void LCodeGen::DoConstantI(LConstantI* instr) {
1563 ASSERT(instr->result()->IsRegister()); 1563 ASSERT(instr->result()->IsRegister());
1564 __ Set(ToRegister(instr->result()), instr->value()); 1564 __ Set(ToRegister(instr->result()), instr->value());
1565 } 1565 }
1566 1566
1567 1567
1568 void LCodeGen::DoConstantS(LConstantS* instr) {
1569 ASSERT(instr->result()->IsRegister());
1570 __ Move(ToRegister(instr->result()), instr->value());
1571 }
1572
1573
1568 void LCodeGen::DoConstantD(LConstantD* instr) { 1574 void LCodeGen::DoConstantD(LConstantD* instr) {
1569 ASSERT(instr->result()->IsDoubleRegister()); 1575 ASSERT(instr->result()->IsDoubleRegister());
1570 XMMRegister res = ToDoubleRegister(instr->result()); 1576 XMMRegister res = ToDoubleRegister(instr->result());
1571 double v = instr->value(); 1577 double v = instr->value();
1572 uint64_t int_val = BitCast<uint64_t, double>(v); 1578 uint64_t int_val = BitCast<uint64_t, double>(v);
1573 // Use xor to produce +0.0 in a fast and compact way, but avoid to 1579 // Use xor to produce +0.0 in a fast and compact way, but avoid to
1574 // do so if the constant is -0.0. 1580 // do so if the constant is -0.0.
1575 if (int_val == 0) { 1581 if (int_val == 0) {
1576 __ xorps(res, res); 1582 __ xorps(res, res);
1577 } else { 1583 } else {
(...skipping 4111 matching lines...) Expand 10 before | Expand all | Expand 10 after
5689 FixedArray::kHeaderSize - kPointerSize)); 5695 FixedArray::kHeaderSize - kPointerSize));
5690 __ bind(&done); 5696 __ bind(&done);
5691 } 5697 }
5692 5698
5693 5699
5694 #undef __ 5700 #undef __
5695 5701
5696 } } // namespace v8::internal 5702 } } // namespace v8::internal
5697 5703
5698 #endif // V8_TARGET_ARCH_X64 5704 #endif // V8_TARGET_ARCH_X64
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698