summaryrefslogtreecommitdiffstats
path: root/llvm/test/MC
diff options
context:
space:
mode:
authorBenjamin Kramer <benny.kra@googlemail.com>2012-09-07 14:51:35 +0000
committerBenjamin Kramer <benny.kra@googlemail.com>2012-09-07 14:51:35 +0000
commite3d658bb6c0447042f260408de6a12408e7287e4 (patch)
treee3c59889f6492baa9853c336d6a836614283c0cf /llvm/test/MC
parentc337b8244d1e551e578fbcefb63d7dc75809269a (diff)
downloadbcm5719-llvm-e3d658bb6c0447042f260408de6a12408e7287e4.tar.gz
bcm5719-llvm-e3d658bb6c0447042f260408de6a12408e7287e4.zip
PR13754: llvm-mc/x86 crashes on .cfi directives without the % prefix for registers.
gas accepts this and it seems to be common enough to be worth supporting. This doesn't affect the parsing of reg operands outside of .cfi directives. llvm-svn: 163390
Diffstat (limited to 'llvm/test/MC')
-rw-r--r--llvm/test/MC/ELF/cfi-reg.s18
1 files changed, 18 insertions, 0 deletions
diff --git a/llvm/test/MC/ELF/cfi-reg.s b/llvm/test/MC/ELF/cfi-reg.s
new file mode 100644
index 00000000000..fd68d6d5ad0
--- /dev/null
+++ b/llvm/test/MC/ELF/cfi-reg.s
@@ -0,0 +1,18 @@
+// RUN: llvm-mc -triple x86_64-pc-linux-gnu %s -o - | FileCheck %s
+// PR13754
+
+f:
+ .cfi_startproc
+ nop
+ .cfi_offset 6, -16
+ nop
+ .cfi_offset %rsi, -16
+ nop
+ .cfi_offset rbx, -16
+ nop
+ .cfi_endproc
+
+// CHECK: f:
+// CHECK: .cfi_offset %rbp, -16
+// CHECK: .cfi_offset %rsi, -16
+// CHECK: .cfi_offset %rbx, -16
OpenPOWER on IntegriCloud