llvm-mirror/test/MC/Mips/j-macro-insn.s
Simon Dardis 49cc1d1c05 [mips] Correct microMIP's jump and add unconditional branch pseudo
Correct the definition of 'j' as being unavailable for microMIPS32R6 and
provide the 'b' assembly idiom for codegen purposes for microMIPS32r3.

Provide the necessary 'br' pattern for microMIPS32R6 as it now longer
incorrectly uses the 'j' instruction.

Reviewers: atanasyan

Differential Revision: https://reviews.llvm.org/D39741

llvm-svn: 317801
2017-11-09 16:02:18 +00:00

18 lines
686 B
ArmAsm

# RUN: llvm-mc -arch=mips -show-inst %s | FileCheck --check-prefix=STATIC %s
# RUN: llvm-mc -arch=mips -position-independent -show-inst %s | FileCheck --check-prefix=PIC %s
# RUN: llvm-mc -arch=mips -mattr=+micromips -show-inst %s | FileCheck --check-prefix=STATIC-MM %s
# RUN: llvm-mc -arch=mips -mattr=+micromips -position-independent -show-inst %s | FileCheck --check-prefix=PIC-MM %s
.text
j foo
nop
foo:
nop
b foo
# PIC: b foo # <MCInst #{{[0-9]+}} BEQ
# STATIC: j foo # <MCInst #{{[0-9]+}} J
# PIC-MM: b foo # <MCInst #{{[0-9]+}} BEQ_MM
# STATIC-MM: j foo # <MCInst #{{[0-9]+}} J_MM