1
0
mirror of https://github.com/RPCS3/llvm-mirror.git synced 2024-11-24 03:33:20 +01:00
llvm-mirror/test/MC/Mips/macro-sge.s
Simon Atanasyan ad727b0901 [mips] Implement sge/sgeu pseudo instructions
The `sge/sgeu Dst, Src1, Src2/Imm` pseudo instructions set register
`Dst` to 1 if register `Src1` is greater than or equal `Src2/Imm` and
to 0 otherwise.

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

llvm-svn: 365476
2019-07-09 12:55:55 +00:00

44 lines
2.1 KiB
ArmAsm

# RUN: llvm-mc -arch=mips -show-encoding -mcpu=mips1 < %s | FileCheck %s
# RUN: llvm-mc -arch=mips -show-encoding -mcpu=mips64 < %s | FileCheck %s
sge $4, $5
# CHECK: slt $4, $4, $5 # encoding: [0x00,0x85,0x20,0x2a]
# CHECK: xori $4, $4, 1 # encoding: [0x38,0x84,0x00,0x01]
sge $4, $5, $6
# CHECK: slt $4, $5, $6 # encoding: [0x00,0xa6,0x20,0x2a]
# CHECK: xori $4, $4, 1 # encoding: [0x38,0x84,0x00,0x01]
sge $4, 16
# CHECK: slti $4, $4, 16 # encoding: [0x28,0x84,0x00,0x10]
# CHECK: xori $4, $4, 1 # encoding: [0x38,0x84,0x00,0x01]
sge $4, $5, 16
# CHECK: slti $4, $5, 16 # encoding: [0x28,0xa4,0x00,0x10]
# CHECK: xori $4, $4, 1 # encoding: [0x38,0x84,0x00,0x01]
sge $4, $5, 0x10000
# CHECK: lui $4, 1 # encoding: [0x3c,0x04,0x00,0x01]
# CHECK: slt $4, $5, $4 # encoding: [0x00,0xa4,0x20,0x2a]
# CHECK: xori $4, $4, 1 # encoding: [0x38,0x84,0x00,0x01]
sgeu $4, $5
# CHECK: sltu $4, $4, $5 # encoding: [0x00,0x85,0x20,0x2b]
# CHECK: xori $4, $4, 1 # encoding: [0x38,0x84,0x00,0x01]
sgeu $4, $5, $6
# CHECK: sltu $4, $5, $6 # encoding: [0x00,0xa6,0x20,0x2b]
# CHECK: xori $4, $4, 1 # encoding: [0x38,0x84,0x00,0x01]
sgeu $4, 16
# CHECK: sltiu $4, $4, 16 # encoding: [0x2c,0x84,0x00,0x10]
# CHECK: xori $4, $4, 1 # encoding: [0x38,0x84,0x00,0x01]
sgeu $4, $5, 16
# CHECK: sltiu $4, $5, 16 # encoding: [0x2c,0xa4,0x00,0x10]
# CHECK: xori $4, $4, 1 # encoding: [0x38,0x84,0x00,0x01]
sgeu $4, $5, 0x10000
# CHECK: lui $4, 1 # encoding: [0x3c,0x04,0x00,0x01]
# CHECK: sltu $4, $5, $4 # encoding: [0x00,0xa4,0x20,0x2b]
# CHECK: xori $4, $4, 1 # encoding: [0x38,0x84,0x00,0x01]
sge $4, 0x10000
# CHECK: lui $1, 1 # encoding: [0x3c,0x01,0x00,0x01]
# CHECK: slt $4, $4, $1 # encoding: [0x00,0x81,0x20,0x2a]
# CHECK: xori $4, $4, 1 # encoding: [0x38,0x84,0x00,0x01]
sgeu $4, 0x10000
# CHECK: lui $1, 1 # encoding: [0x3c,0x01,0x00,0x01]
# CHECK: sltu $4, $4, $1 # encoding: [0x00,0x81,0x20,0x2b]
# CHECK: xori $4, $4, 1 # encoding: [0x38,0x84,0x00,0x01]