mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2024-08-24 09:29:42 +00:00
* Align targets of indirect jumps to instruction bundle boundaries (in MI layer). * Add masking instructions before indirect jumps (in MC layer). Differential Revision: http://llvm-reviews.chandlerc.com/D2847 git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@202479 91177308-0d34-0410-b5e6-96231b3b80d8
29 lines
614 B
ArmAsm
29 lines
614 B
ArmAsm
# RUN: llvm-mc -filetype=obj -triple=mipsel-unknown-nacl %s \
|
|
# RUN: | llvm-objdump -triple mipsel -disassemble -no-show-raw-insn - \
|
|
# RUN: | FileCheck %s
|
|
|
|
# This test tests that address-masking sandboxing is added when given assembly
|
|
# input.
|
|
|
|
test1:
|
|
.set noreorder
|
|
|
|
jr $a0
|
|
nop
|
|
jr $ra
|
|
nop
|
|
|
|
# CHECK-LABEL: test1:
|
|
|
|
# CHECK: and $4, $4, $14
|
|
# CHECK-NEXT: jr $4
|
|
|
|
# Check that additional nop is inserted, to align mask and jr to the next
|
|
# bundle.
|
|
|
|
# CHECK-NEXT: nop
|
|
# CHECK-NEXT: nop
|
|
|
|
# CHECK: and $ra, $ra, $14
|
|
# CHECK-NEXT: jr $ra
|