[llvm] r269977 - [x86] add test for immediate comment formatting
Sanjay Patel via llvm-commits
llvm-commits at lists.llvm.org
Wed May 18 13:26:32 PDT 2016
Author: spatel
Date: Wed May 18 15:26:32 2016
New Revision: 269977
URL: http://llvm.org/viewvc/llvm-project?rev=269977&view=rev
Log:
[x86] add test for immediate comment formatting
Added:
llvm/trunk/test/MC/X86/imm-comments.s
Added: llvm/trunk/test/MC/X86/imm-comments.s
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/MC/X86/imm-comments.s?rev=269977&view=auto
==============================================================================
--- llvm/trunk/test/MC/X86/imm-comments.s (added)
+++ llvm/trunk/test/MC/X86/imm-comments.s Wed May 18 15:26:32 2016
@@ -0,0 +1,26 @@
+# RUN: llvm-mc %s -triple=x86_64-unknown-unknown | FileCheck %s
+
+movb $127, %al
+movb $-128, %al
+
+movw $32767, %ax
+movw $-32768, %ax
+
+movl $2147483647, %eax
+movl $-2147483648, %eax
+
+movabsq $9223372036854775807, %rax
+movabsq $-9223372036854775808, %rax
+
+# CHECK: movb $127, %al
+# CHECK: movb $-128, %al
+
+# CHECK: movw $32767, %ax # imm = 0x7FFF
+# CHECK: movw $-32768, %ax # imm = 0xFFFFFFFFFFFF8000
+
+# CHECK: movl $2147483647, %eax # imm = 0x7FFFFFFF
+# CHECK: movl $-2147483648, %eax # imm = 0xFFFFFFFF80000000
+
+# CHECK: movabsq $9223372036854775807, %rax # imm = 0x7FFFFFFFFFFFFFFF
+# CHECK: movabsq $-9223372036854775808, %rax # imm = 0x8000000000000000
+
More information about the llvm-commits
mailing list