mirror of
https://github.com/RPCS3/llvm-mirror.git
synced 2024-11-24 11:42:57 +01:00
b2d3b0af04
We use both -long-option and --long-option in tests. Switch to --long-option for consistency. In the "llvm-readelf" mode, -long-option is discouraged as it conflicts with grouped short options and it is not accepted by GNU readelf. While updating the tests, change llvm-readobj -s to llvm-readobj -S to reduce confusion ("s" is --section-headers in llvm-readobj but --symbols in llvm-readelf). llvm-svn: 359649
94 lines
2.3 KiB
ArmAsm
94 lines
2.3 KiB
ArmAsm
@ Integrated test for ARM unwind directive parser and assembler.
|
|
|
|
@ This is a simplified real world test case generated from this C++ code
|
|
@ (with and without -fomit-frame-pointer)
|
|
@
|
|
@ extern void print(int, int, int, int, int);
|
|
@ extern void print(double, double, double, double, double);
|
|
@
|
|
@ void test(int a, int b, int c, int d, int e,
|
|
@ double m, double n, double p, double q, double r) {
|
|
@ try {
|
|
@ print(a, b, c, d, e);
|
|
@ } catch (...) {
|
|
@ print(m, n, p, q, r);
|
|
@ }
|
|
@ }
|
|
@
|
|
@ This test case should check the unwind opcode to adjust the opcode and
|
|
@ restore the general-purpose and VFP registers.
|
|
|
|
|
|
@ RUN: llvm-mc %s -triple=armv7-unknown-linux-gnueabi -filetype=obj -o - \
|
|
@ RUN: | llvm-readobj -S --sd | FileCheck %s
|
|
|
|
|
|
@-------------------------------------------------------------------------------
|
|
@ Assembly without frame pointer elimination
|
|
@-------------------------------------------------------------------------------
|
|
.syntax unified
|
|
.section .TEST1
|
|
.globl func1
|
|
.align 2
|
|
.type func1,%function
|
|
func1:
|
|
.fnstart
|
|
.save {r4, r11, lr}
|
|
push {r4, r11, lr}
|
|
.setfp r11, sp, #4
|
|
add r11, sp, #4
|
|
.vsave {d8, d9, d10, d11, d12}
|
|
vpush {d8, d9, d10, d11, d12}
|
|
.pad #28
|
|
sub sp, sp, #28
|
|
sub sp, r11, #44
|
|
vpop {d8, d9, d10, d11, d12}
|
|
pop {r4, r11, pc}
|
|
.Ltmp1:
|
|
.size func1, .Ltmp1-func1
|
|
.globl __gxx_personality_v0
|
|
.personality __gxx_personality_v0
|
|
.handlerdata
|
|
.fnend
|
|
|
|
@ CHECK: Section {
|
|
@ CHECK: Name: .ARM.extab.TEST1
|
|
@ CHECK: SectionData (
|
|
@ CHECK: 0000: 00000000 C94A9B01 B0818484 |.....J......|
|
|
@ CHECK: )
|
|
@ CHECK: }
|
|
|
|
|
|
|
|
@-------------------------------------------------------------------------------
|
|
@ Assembly with frame pointer elimination
|
|
@-------------------------------------------------------------------------------
|
|
.section .TEST2
|
|
.globl func2
|
|
.align 2
|
|
.type func2,%function
|
|
func2:
|
|
.fnstart
|
|
.save {r4, lr}
|
|
push {r4, lr}
|
|
.vsave {d8, d9, d10, d11, d12}
|
|
vpush {d8, d9, d10, d11, d12}
|
|
.pad #24
|
|
sub sp, sp, #24
|
|
add sp, sp, #24
|
|
vpop {d8, d9, d10, d11, d12}
|
|
pop {r4, pc}
|
|
.Ltmp2:
|
|
.size func2, .Ltmp2-func2
|
|
.globl __gxx_personality_v0
|
|
.personality __gxx_personality_v0
|
|
.handlerdata
|
|
.fnend
|
|
|
|
@ CHECK: Section {
|
|
@ CHECK: Name: .ARM.extab.TEST2
|
|
@ CHECK: SectionData (
|
|
@ CHECK: 0000: 00000000 84C90501 B0B0B0A8 |............|
|
|
@ CHECK: )
|
|
@ CHECK: }
|