diff options
author | Jack Carter <jack.carter@imgtec.com> | 2013-04-01 21:55:15 +0000 |
---|---|---|
committer | Jack Carter <jack.carter@imgtec.com> | 2013-04-01 21:55:15 +0000 |
commit | 732f4bc7c4baa7546b0942f69562d4fb3f474999 (patch) | |
tree | 50cae07d92622a82527327e98a94a24c57d3db2a /test/MC/Mips/eh-frame.s | |
parent | 08001a5a1565adb8ce18b97537dd75075992d09a (diff) |
Mips direct object exception handling regression
Revision 177141 caused a regression in all but
mips64 little endian. That is because none of the
other Mips targets had test cases checking the
contents of the .eh_frame section. This patch fixes
both the llvm code and adds an assembler test case
to include the current 4 flavors.
The test cases unfortunately rely on llvm-objdump. A
preferable method would be to use a pretty printer output
such as what readelf -wf <elf_file> would give.
I also changed the name of the test case to correct a typo.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@178506 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'test/MC/Mips/eh-frame.s')
-rw-r--r-- | test/MC/Mips/eh-frame.s | 46 |
1 files changed, 46 insertions, 0 deletions
diff --git a/test/MC/Mips/eh-frame.s b/test/MC/Mips/eh-frame.s new file mode 100644 index 0000000000..56278b8b99 --- /dev/null +++ b/test/MC/Mips/eh-frame.s @@ -0,0 +1,46 @@ +// Assembler generated object test. +// This tests .eh_frame descriptors minimally. + +// What we really need is a prettyprinter output check not unlike what +// gnu's readobj generates instead of checking the bits for .eh_frame. + +// RUN: llvm-mc -filetype=obj -mcpu=mips32r2 -triple mipsel-unknown-linux -arch=mipsel %s -o - \ +// RUN: | llvm-objdump -s - | FileCheck -check-prefix=CHECK-LEO32 %s + +// RUN: llvm-mc -filetype=obj -mcpu=mips32r2 -triple mips-unknown-linux -arch=mips %s -o - \ +// RUN: | llvm-objdump -s - | FileCheck -check-prefix=CHECK-BEO32 %s + +// RUN: llvm-mc -filetype=obj -mcpu=mips64r2 -mattr=n64 -arch=mips64el %s -o - \ +// RUN: | llvm-objdump -s - | FileCheck -check-prefix=CHECK-LE64 %s + +// RUN: llvm-mc -filetype=obj -mcpu=mips64r2 -mattr=n64 -arch=mips64 %s -o - \ +// RUN: | llvm-objdump -s - | FileCheck -check-prefix=CHECK-BE64 %s + +// O32 little endian +// CHECK-LEO32: Contents of section .eh_frame: +// CHECK-LEO32-NEXT: 0000 10000000 00000000 017a5200 017c1f01 .........zR..|.. +// CHECK-LEO32-NEXT: 0010 000c1d00 10000000 18000000 00000000 ................ +// CHECK-LEO32-NEXT: 0020 00000000 00000000 ........ + +// O32 big endian +// CHECK-BEO32: Contents of section .eh_frame: +// CHECK-BEO32-NEXT 0000 00000010 00000000 017a5200 017c1f01 .........zR..|.. +// CHECK-BEO32-NEXT 0010 000c1d00 00000010 00000018 00000000 ................ +// CHECK-BEO32-NEXT 0020 00000000 00000000 ........ + +// N64 little endian +// CHECK-LE64: Contents of section .eh_frame: +// CHECK-LE64-NEXT: 0000 10000000 00000000 017a5200 01781f01 .........zR..x.. +// CHECK-LE64-NEXT: 0010 000c1d00 18000000 18000000 00000000 ................ +// CHECK-LE64-NEXT: 0020 00000000 00000000 00000000 00000000 ................ + +// N64 big endian +// CHECK-BE64: Contents of section .eh_frame: +// CHECK-BE64-NEXT: 0000 00000010 00000000 017a5200 01781f01 .........zR..x.. +// CHECK-BE64-NEXT: 0010 000c1d00 00000018 00000018 00000000 ................ +// CHECK-BE64-NEXT: 0020 00000000 00000000 00000000 00000000 ................ + +func: + .cfi_startproc + .cfi_endproc + |