[PATCH] [llvm-mc] Fix bad sign extension on callw immediate
Matthew Barney
m4b.github.io at gmail.com
Thu May 7 15:15:46 PDT 2015
added unit tests for 16, 32, and 64 bit CALL disassembly.
REPOSITORY
rL LLVM
http://reviews.llvm.org/D9514
Files:
test/MC/Disassembler/X86/x86-16.txt
test/MC/Disassembler/X86/x86-32.txt
test/MC/Disassembler/X86/x86-64.txt
Index: test/MC/Disassembler/X86/x86-16.txt
===================================================================
--- test/MC/Disassembler/X86/x86-16.txt
+++ test/MC/Disassembler/X86/x86-16.txt
@@ -786,3 +786,5 @@
# CHECK: lretl
0x66 0xcb
+# CHECK: callw -1
+0xe8 0xff 0xff
Index: test/MC/Disassembler/X86/x86-32.txt
===================================================================
--- test/MC/Disassembler/X86/x86-32.txt
+++ test/MC/Disassembler/X86/x86-32.txt
@@ -54,6 +54,9 @@
# CHECK: calll -1234
0xe8 0x2e 0xfb 0xff 0xff
+# CHECK: callw -1
+0x66 0xe8 0xff 0xff
+
# CHECK: lfence
0x0f 0xae 0xe8
Index: test/MC/Disassembler/X86/x86-64.txt
===================================================================
--- test/MC/Disassembler/X86/x86-64.txt
+++ test/MC/Disassembler/X86/x86-64.txt
@@ -301,3 +301,9 @@
# CHECK: movq %rax, 1515870810
0x67, 0x48 0xa3 0x5a 0x5a 0x5a 0x5a
+
+# CHECK: callq 32767
+0xe8 0xff 0x7f 0x00 0x00
+
+# CHECK: callq -32769
+0xe8 0xff 0x7f 0xff 0xff
EMAIL PREFERENCES
http://reviews.llvm.org/settings/panel/emailpreferences/
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D9514.25251.patch
Type: text/x-patch
Size: 994 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20150507/a01866a4/attachment.bin>
More information about the llvm-commits
mailing list