mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2024-11-02 22:04:55 +00:00
e502a6aad3
This implements the unwind_raw directive for the ARM IAS. The unwind_raw directive takes the form of a stack offset value followed by one or more bytes representing the opcodes to be emitted. The opcode emitted will interpreted as if it were assembled by the opcode assembler via the standard unwinding directives. Thanks to Logan Chien for an extra test! git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@199707 91177308-0d34-0410-b5e6-96231b3b80d8
74 lines
1.4 KiB
ArmAsm
74 lines
1.4 KiB
ArmAsm
@ RUN: not llvm-mc -triple armv7-linux-eabi -filetype asm -o /dev/null 2>&1 %s \
|
|
@ RUN: | FileCheck %s
|
|
|
|
.syntax unified
|
|
|
|
.type require_fnstart,%function
|
|
require_fnstart:
|
|
.unwind_raw 0, 0
|
|
|
|
@ CHECK: error: .fnstart must precede .unwind_raw directive
|
|
@ CHECK: .unwind_raw 0, 0
|
|
@ CHECK: ^
|
|
|
|
.type check_arguments,%function
|
|
check_arguments:
|
|
.fnstart
|
|
.unwind_raw
|
|
.fnend
|
|
|
|
@ CHECK: error: expected expression
|
|
@ CHECK: .unwind_raw
|
|
@ CHECK: ^
|
|
|
|
.type check_stack_offset,%function
|
|
check_stack_offset:
|
|
.fnstart
|
|
.unwind_raw ., 0
|
|
.fnend
|
|
|
|
@ CHECK: error: offset must be a constant
|
|
@ CHECK: .unwind_raw ., 0
|
|
@ CHECK: ^
|
|
|
|
.type comma_check,%function
|
|
comma_check:
|
|
.fnstart
|
|
.unwind_raw 0
|
|
.fnend
|
|
|
|
@ CHECK: error: expected comma
|
|
@ CHECK: .unwind_raw 0
|
|
@ CHECK: ^
|
|
|
|
.type require_opcode,%function
|
|
require_opcode:
|
|
.fnstart
|
|
.unwind_raw 0,
|
|
.fnend
|
|
|
|
@ CHECK: error: expected opcode expression
|
|
@ CHECK: .unwind_raw 0,
|
|
@ CHECK: ^
|
|
|
|
.type require_opcode_constant,%function
|
|
require_opcode_constant:
|
|
.fnstart
|
|
.unwind_raw 0, .
|
|
.fnend
|
|
|
|
@ CHECK: error: opcode value must be a constant
|
|
@ CHECK: .unwind_raw 0, .
|
|
@ CHECK: ^
|
|
|
|
.type check_opcode_range,%function
|
|
check_opcode_range:
|
|
.fnstart
|
|
.unwind_raw 0, 0x100
|
|
.fnend
|
|
|
|
@ CHECK: error: invalid opcode
|
|
@ CHECK: .unwind_raw 0, 0x100
|
|
@ CHECK: ^
|
|
|