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

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

Issue 6682026: Fix SmiCompare on 64 bit to distinguish between comparisons where... (Closed) Base URL: http://v8.googlecode.com/svn/branches/bleeding_edge/
Patch Set: Created 9 years, 9 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 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 1581 matching lines...) Expand 10 before | Expand all | Expand 10 after
1592 // address is not GC safe. Use the handle version instead. 1592 // address is not GC safe. Use the handle version instead.
1593 ASSERT(rmode > RelocInfo::LAST_GCED_ENUM); 1593 ASSERT(rmode > RelocInfo::LAST_GCED_ENUM);
1594 EnsureSpace ensure_space(this); 1594 EnsureSpace ensure_space(this);
1595 last_pc_ = pc_; 1595 last_pc_ = pc_;
1596 emit_rex_64(dst); 1596 emit_rex_64(dst);
1597 emit(0xB8 | dst.low_bits()); 1597 emit(0xB8 | dst.low_bits());
1598 emitq(reinterpret_cast<uintptr_t>(value), rmode); 1598 emitq(reinterpret_cast<uintptr_t>(value), rmode);
1599 } 1599 }
1600 1600
1601 1601
1602 void Assembler::movq(Register dst, Smi* value) {
1603 movq(dst, reinterpret_cast<int64_t>(value), RelocInfo::NONE);
Lasse Reichstein 2011/03/14 08:51:01 Please consider using LoadSmi instead. It tries to
Erik Corry 2011/03/14 16:26:45 Used LoadSmiConstant
1604 }
1605
1606
1602 void Assembler::movq(Register dst, int64_t value, RelocInfo::Mode rmode) { 1607 void Assembler::movq(Register dst, int64_t value, RelocInfo::Mode rmode) {
1603 // Non-relocatable values might not need a 64-bit representation. 1608 // Non-relocatable values might not need a 64-bit representation.
1604 if (rmode == RelocInfo::NONE) { 1609 if (rmode == RelocInfo::NONE) {
1605 // Sadly, there is no zero or sign extending move for 8-bit immediates. 1610 // Sadly, there is no zero or sign extending move for 8-bit immediates.
1606 if (is_int32(value)) { 1611 if (is_int32(value)) {
1607 movq(dst, Immediate(static_cast<int32_t>(value))); 1612 movq(dst, Immediate(static_cast<int32_t>(value)));
1608 return; 1613 return;
1609 } else if (is_uint32(value)) { 1614 } else if (is_uint32(value)) {
1610 movl(dst, Immediate(static_cast<int32_t>(value))); 1615 movl(dst, Immediate(static_cast<int32_t>(value)));
1611 return; 1616 return;
(...skipping 1541 matching lines...) Expand 10 before | Expand all | Expand 10 after
3153 // specially coded on x64 means that it is a relative 32 bit address, as used 3158 // specially coded on x64 means that it is a relative 32 bit address, as used
3154 // by branch instructions. 3159 // by branch instructions.
3155 return (1 << rmode_) & kApplyMask; 3160 return (1 << rmode_) & kApplyMask;
3156 } 3161 }
3157 3162
3158 3163
3159 3164
3160 } } // namespace v8::internal 3165 } } // namespace v8::internal
3161 3166
3162 #endif // V8_TARGET_ARCH_X64 3167 #endif // V8_TARGET_ARCH_X64
OLDNEW
« no previous file with comments | « src/x64/assembler-x64.h ('k') | src/x64/code-stubs-x64.cc » ('j') | src/x64/code-stubs-x64.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698