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

Unified Diff: src/x64/macro-assembler-x64.cc

Issue 293003: Remove unused 'unsafe smi' code on x64. (Closed) Base URL: http://v8.googlecode.com/svn/branches/bleeding_edge/
Patch Set: Created 11 years, 2 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « src/x64/macro-assembler-x64.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/x64/macro-assembler-x64.cc
===================================================================
--- src/x64/macro-assembler-x64.cc (revision 3077)
+++ src/x64/macro-assembler-x64.cc (working copy)
@@ -1249,35 +1249,7 @@
j(NegateCondition(both_smi), on_not_both_smi);
}
-bool MacroAssembler::IsUnsafeSmi(Smi* value) {
- return false;
-}
-
-void MacroAssembler::LoadUnsafeSmi(Register dst, Smi* source) {
- UNIMPLEMENTED();
-}
-
-
-void MacroAssembler::Move(Register dst, Smi* source) {
- if (IsUnsafeSmi(source)) {
- LoadUnsafeSmi(dst, source);
- } else {
- Set(dst, reinterpret_cast<int64_t>(source));
- }
-}
-
-
-void MacroAssembler::Move(const Operand& dst, Smi* source) {
- if (IsUnsafeSmi(source)) {
- LoadUnsafeSmi(kScratchRegister, source);
- movq(dst, kScratchRegister);
- } else {
- Set(dst, reinterpret_cast<int64_t>(source));
- }
-}
-
-
void MacroAssembler::Move(Register dst, Handle<Object> source) {
ASSERT(!source->IsFailure());
if (source->IsSmi()) {
@@ -1332,33 +1304,23 @@
void MacroAssembler::Push(Smi* source) {
- if (IsUnsafeSmi(source)) {
- LoadUnsafeSmi(kScratchRegister, source);
- push(kScratchRegister);
+ intptr_t smi = reinterpret_cast<intptr_t>(source);
+ if (is_int32(smi)) {
+ push(Immediate(static_cast<int32_t>(smi)));
} else {
- intptr_t smi = reinterpret_cast<intptr_t>(source);
- if (is_int32(smi)) {
- push(Immediate(static_cast<int32_t>(smi)));
- } else {
- Set(kScratchRegister, smi);
- push(kScratchRegister);
- }
+ Set(kScratchRegister, smi);
+ push(kScratchRegister);
}
}
void MacroAssembler::Test(const Operand& src, Smi* source) {
- if (IsUnsafeSmi(source)) {
- LoadUnsafeSmi(kScratchRegister, source);
- testq(src, kScratchRegister);
+ intptr_t smi = reinterpret_cast<intptr_t>(source);
+ if (is_int32(smi)) {
+ testl(src, Immediate(static_cast<int32_t>(smi)));
} else {
- intptr_t smi = reinterpret_cast<intptr_t>(source);
- if (is_int32(smi)) {
- testl(src, Immediate(static_cast<int32_t>(smi)));
- } else {
- Move(kScratchRegister, source);
- testq(src, kScratchRegister);
- }
+ Move(kScratchRegister, source);
+ testq(src, kScratchRegister);
}
}
« no previous file with comments | « src/x64/macro-assembler-x64.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698