summaryrefslogtreecommitdiffstats
path: root/llvm/test/MC/Mips
diff options
context:
space:
mode:
authorSimon Atanasyan <simon@atanasyan.com>2018-10-09 11:29:51 +0000
committerSimon Atanasyan <simon@atanasyan.com>2018-10-09 11:29:51 +0000
commit4d6f42532804dcc0c943723fce15ce747c15661c (patch)
tree207683f1dd58373d17e701a887e2ee96c9df1296 /llvm/test/MC/Mips
parentd465318c6d6faff43885378bdd7fc2b938b3dcbb (diff)
downloadbcm5719-llvm-4d6f42532804dcc0c943723fce15ce747c15661c.tar.gz
bcm5719-llvm-4d6f42532804dcc0c943723fce15ce747c15661c.zip
[mips] Fix FDE/CFI encoding in case of N32 ABI
For O32 and N32 ABI FDE/CFI encoding should be `DW_EH_PE_sdata4` and only N64 ABI uses `DW_EH_PE_sdata8`. To cover all cases this patch check code pointer size and setup a correct FDE/CFI encoding type. Differential revision: https://reviews.llvm.org/D52876 llvm-svn: 344040
Diffstat (limited to 'llvm/test/MC/Mips')
-rw-r--r--llvm/test/MC/Mips/cfi-encoding.s23
1 files changed, 23 insertions, 0 deletions
diff --git a/llvm/test/MC/Mips/cfi-encoding.s b/llvm/test/MC/Mips/cfi-encoding.s
new file mode 100644
index 00000000000..fe098076830
--- /dev/null
+++ b/llvm/test/MC/Mips/cfi-encoding.s
@@ -0,0 +1,23 @@
+# RUN: llvm-mc -filetype=obj -triple mips--gnu -g %s \
+# RUN: | llvm-objdump -s -section=.eh_frame - | FileCheck --check-prefix=O32 %s
+# RUN: llvm-mc -filetype=obj -triple mips64--gnuabin32 -g %s \
+# RUN: | llvm-objdump -s -section=.eh_frame - | FileCheck --check-prefix=N32 %s
+# RUN: llvm-mc -filetype=obj -triple mips64--gnuabi64 -g %s \
+# RUN: | llvm-objdump -s -section=.eh_frame - | FileCheck --check-prefix=N64 %s
+
+# O32: 0000 00000010 00000000 017a5200 017c1f01
+# O32: 0010 0b0c1d00 00000010 00000018 00000000
+# O32: 0020 00000004 00000000
+
+# N32: 0000 00000010 00000000 017a5200 017c1f01
+# N32: 0010 0b0c1d00 00000010 00000018 00000000
+# N32: 0020 00000004 00000000
+
+# N64: 0000 00000010 00000000 017a5200 01781f01
+# N64: 0010 0c0c1d00 00000018 00000018 00000000
+# N64: 0020 00000000 00000000 00000004 00000000
+
+foo:
+ .cfi_startproc
+ nop
+ .cfi_endproc
OpenPOWER on IntegriCloud