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

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

Issue 61623004: Add signed/unsigned 8-bit and 16-bit Representations (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Tweaks Created 7 years, 1 month 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
Index: src/x64/macro-assembler-x64.cc
diff --git a/src/x64/macro-assembler-x64.cc b/src/x64/macro-assembler-x64.cc
index a18ff0d274c75e14eac2701a06f5d93e1cf5e8af..3446fcf7c606d8ed0a099b37ddfc31b6889608bd 100644
--- a/src/x64/macro-assembler-x64.cc
+++ b/src/x64/macro-assembler-x64.cc
@@ -950,8 +950,14 @@ void MacroAssembler::Cvtlsi2sd(XMMRegister dst, const Operand& src) {
void MacroAssembler::Load(Register dst, const Operand& src, Representation r) {
ASSERT(!r.IsDouble());
- if (r.IsByte()) {
- movzxbl(dst, src);
+ if (r.IsInteger8()) {
+ movsxbq(dst, src);
+ } else if (r.IsUInteger8()) {
+ movzxbq(dst, src);
Benedikt Meurer 2013/11/07 12:56:05 We can safely use movzxbl() here, as all 32-bit in
danno 2013/11/07 13:19:57 Done.
+ } else if (r.IsInteger16()) {
+ movsxwq(dst, src);
+ } else if (r.IsUInteger16()) {
+ movzxwq(dst, src);
Benedikt Meurer 2013/11/07 12:56:05 Same.
danno 2013/11/07 13:19:57 Done.
} else if (r.IsInteger32()) {
movl(dst, src);
} else {
@@ -962,8 +968,10 @@ void MacroAssembler::Load(Register dst, const Operand& src, Representation r) {
void MacroAssembler::Store(const Operand& dst, Register src, Representation r) {
ASSERT(!r.IsDouble());
- if (r.IsByte()) {
+ if (r.IsInteger8() || r.IsUInteger8()) {
movb(dst, src);
+ } else if (r.IsInteger16() || r.IsUInteger16()) {
+ movw(dst, src);
Yang 2013/11/07 09:32:43 Can we introduce ASSERTs for is_byte_register() fo
danno 2013/11/07 13:19:57 This isn't an issue on x64, but I added checks on
danno 2013/11/07 13:35:31 Actually, this isn't necessary here. And in ia32,
} else if (r.IsInteger32()) {
movl(dst, src);
} else {

Powered by Google App Engine
This is Rietveld 408576698