1
0
mirror of https://github.com/RPCS3/llvm-mirror.git synced 2025-02-01 13:11:39 +01:00
llvm-mirror/test/MC/Mips/set-nomacro.s
Toma Tabacu 141f41f8f0 [mips] [IAS] Add support for BNE and BEQ with an immediate operand.
Summary:
For some branches, GAS accepts an immediate instead of the 2nd register operand.
We only implement this for BNE and BEQ for now. Other branch instructions can be added later, if needed.

Reviewers: dsanders

Reviewed By: dsanders

Subscribers: seanbruno, emaste, llvm-commits

Differential Revision: http://reviews.llvm.org/D9666

llvm-svn: 239396
2015-06-09 10:34:31 +00:00

61 lines
2.0 KiB
ArmAsm

# RUN: llvm-mc %s -arch=mips -mcpu=mips32 2>&1 | FileCheck %s
# CHECK-NOT: warning: macro instruction expanded into multiple instructions
.set macro
li $8, -16
li $8, 16
li $8, 161616
la $8, 16
la $8, 161616
la $8, 16($9)
la $8, 161616($9)
la $8, symbol
jal $25
jal $4, $25
bne $2, 0, 1332
bne $2, 1, 1332
beq $2, 0, 1332
beq $2, 1, 1332
add $4, $5, $6
.set noreorder
.set nomacro
li $8, -16
# CHECK-NOT: [[@LINE-1]]:3: warning: macro instruction expanded into multiple instructions
li $8, 16
# CHECK-NOT: [[@LINE-1]]:3: warning: macro instruction expanded into multiple instructions
li $8, 161616
# CHECK: [[@LINE-1]]:3: warning: macro instruction expanded into multiple instructions
la $8, 16
# CHECK-NOT: [[@LINE-1]]:3: warning: macro instruction expanded into multiple instructions
la $8, 161616
# CHECK: [[@LINE-1]]:3: warning: macro instruction expanded into multiple instructions
la $8, 16($9)
# CHECK-NOT: [[@LINE-1]]:3: warning: macro instruction expanded into multiple instructions
la $8, 161616($9)
# CHECK: [[@LINE-1]]:3: warning: macro instruction expanded into multiple instructions
la $8, symbol
# CHECK: [[@LINE-1]]:3: warning: macro instruction expanded into multiple instructions
jal $25
# CHECK-NOT: [[@LINE-1]]:3: warning: macro instruction expanded into multiple instructions
jal $4, $25
# CHECK-NOT: [[@LINE-1]]:3: warning: macro instruction expanded into multiple instructions
bne $2, 0, 1332
# CHECK-NOT: [[@LINE-1]]:3: warning: macro instruction expanded into multiple instructions
bne $2, 1, 1332
# CHECK: [[@LINE-1]]:3: warning: macro instruction expanded into multiple instructions
beq $2, 0, 1332
# CHECK-NOT: [[@LINE-1]]:3: warning: macro instruction expanded into multiple instructions
beq $2, 1, 1332
# CHECK: [[@LINE-1]]:3: warning: macro instruction expanded into multiple instructions
add $4, $5, $6
# CHECK-NOT: [[@LINE-1]]:3: warning: macro instruction expanded into multiple instructions