[PATCH] [llvm-mc] add call disassembly unit tests to 32 and 64-bit

Matthew Barney m4b.github.io at gmail.com
Thu May 7 12:45:12 PDT 2015


Hi dougk,

Added unit tests for disassembling call in 32 and 64-bit mode.

REPOSITORY
  rL LLVM

http://reviews.llvm.org/D9572

Files:
  test/MC/Disassembler/X86/x86-32.txt
  test/MC/Disassembler/X86/x86-64.txt

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,12 @@
 # CHECK: calll -1234
 0xe8 0x2e 0xfb 0xff 0xff
 
+# CHECK: callw -1
+0x66 0xe8 0xff 0xff
+
+# CHECK: callw 32767
+0x66 0xe8 0xff 0x7f
+
 # 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 -32769
+0xe8 0xff 0x7f 0xff 0xff
+
+# CHECK: callq 32767
+0xe8 0xff 0x7f 0x00 0x00

EMAIL PREFERENCES
  http://reviews.llvm.org/settings/panel/emailpreferences/
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D9572.25216.patch
Type: text/x-patch
Size: 765 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20150507/2762b69a/attachment.bin>


More information about the llvm-commits mailing list