summaryrefslogtreecommitdiff
path: root/test/MC/X86/gnux32-dwarf-gen.s
diff options
context:
space:
mode:
authorEli Bendersky <eliben@google.com>2013-01-22 18:52:39 +0000
committerEli Bendersky <eliben@google.com>2013-01-22 18:52:39 +0000
commitaaf483ff1775a6b7b0022158c59e73e404d568ef (patch)
treee39d7fbcbba8f11c43729e5bf08645fa77b5a776 /test/MC/X86/gnux32-dwarf-gen.s
parent341c5fbe840cffedc4155a2cf130626d2bba11b5 (diff)
downloadllvm-aaf483ff1775a6b7b0022158c59e73e404d568ef.tar.gz
llvm-aaf483ff1775a6b7b0022158c59e73e404d568ef.tar.bz2
llvm-aaf483ff1775a6b7b0022158c59e73e404d568ef.tar.xz
Add forgotten test case for the x32 commit
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@173181 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'test/MC/X86/gnux32-dwarf-gen.s')
-rw-r--r--test/MC/X86/gnux32-dwarf-gen.s24
1 files changed, 24 insertions, 0 deletions
diff --git a/test/MC/X86/gnux32-dwarf-gen.s b/test/MC/X86/gnux32-dwarf-gen.s
new file mode 100644
index 0000000000..92a001acce
--- /dev/null
+++ b/test/MC/X86/gnux32-dwarf-gen.s
@@ -0,0 +1,24 @@
+# RUN: llvm-mc -g -filetype=obj -triple x86_64-pc-linux-gnu %s -o %t.64
+# RUN: llvm-dwarfdump %t.64 | FileCheck -check-prefix=DEFAULTABI %s
+
+# RUN: llvm-mc -g -filetype=obj -triple x86_64-pc-linux-gnux32 %s -o %t.32
+# RUN: llvm-dwarfdump %t.32 | FileCheck -check-prefix=X32ABI %s
+
+# This test checks the dwarf info section emitted to the output object by the
+# assembler, looking at the difference between the x32 ABI and default x86-64
+# ABI.
+
+# DEFAULTABI: addr_size = 0x08
+# X32ABI: addr_size = 0x04
+
+.globl _bar
+_bar:
+ movl $0, %eax
+L1: leave
+ ret
+_foo:
+_baz:
+ nop
+.data
+_x: .long 1
+