summaryrefslogtreecommitdiffstats
path: root/compiler/utils
diff options
context:
space:
mode:
authorNicolas Geoffray <ngeoffray@google.com>2014-10-07 14:54:48 +0100
committerNicolas Geoffray <ngeoffray@google.com>2014-10-07 14:54:48 +0100
commitb6e7206ad7a426adda9cfd649a4ef969607d79d6 (patch)
tree77d1b0434b64ba5d8569fe70b7c2711ea6ce2f70 /compiler/utils
parent41abdb6ec97978df7c6d79abce4efb664c994ce8 (diff)
downloadart-b6e7206ad7a426adda9cfd649a4ef969607d79d6.zip
art-b6e7206ad7a426adda9cfd649a4ef969607d79d6.tar.gz
art-b6e7206ad7a426adda9cfd649a4ef969607d79d6.tar.bz2
Fix movw on x86/x86_64 to accept any 16bits immediate.
Change-Id: I282eece0cd497431f207cec61852b4585ed3655c
Diffstat (limited to 'compiler/utils')
-rw-r--r--compiler/utils/x86/assembler_x86.cc2
-rw-r--r--compiler/utils/x86_64/assembler_x86_64.cc2
2 files changed, 2 insertions, 2 deletions
diff --git a/compiler/utils/x86/assembler_x86.cc b/compiler/utils/x86/assembler_x86.cc
index a2cbd8b..4c7c4e9 100644
--- a/compiler/utils/x86/assembler_x86.cc
+++ b/compiler/utils/x86/assembler_x86.cc
@@ -248,7 +248,7 @@ void X86Assembler::movw(const Address& dst, const Immediate& imm) {
EmitOperandSizeOverride();
EmitUint8(0xC7);
EmitOperand(0, dst);
- CHECK(imm.is_int16());
+ CHECK(imm.is_uint16() || imm.is_int16());
EmitUint8(imm.value() & 0xFF);
EmitUint8(imm.value() >> 8);
}
diff --git a/compiler/utils/x86_64/assembler_x86_64.cc b/compiler/utils/x86_64/assembler_x86_64.cc
index ade7a13..17339ae 100644
--- a/compiler/utils/x86_64/assembler_x86_64.cc
+++ b/compiler/utils/x86_64/assembler_x86_64.cc
@@ -298,7 +298,7 @@ void X86_64Assembler::movw(const Address& dst, const Immediate& imm) {
EmitOptionalRex32(dst);
EmitUint8(0xC7);
EmitOperand(Register::RAX, dst);
- CHECK(imm.is_int16());
+ CHECK(imm.is_uint16() || imm.is_int16());
EmitUint8(imm.value() & 0xFF);
EmitUint8(imm.value() >> 8);
}