2014-03-04 17:54:09 +08:00
|
|
|
# RUN: llvm-mc -show-encoding -mcpu=mips32 -triple mips-unknown-unknown %s | FileCheck %s
|
2013-02-21 10:09:31 +08:00
|
|
|
#
|
2013-04-26 07:31:35 +08:00
|
|
|
# CHECK: .text
|
|
|
|
# CHECK: $BB0_2:
|
2014-01-07 07:27:31 +08:00
|
|
|
# CHECK: .abicalls
|
2012-09-07 08:48:02 +08:00
|
|
|
$BB0_2:
|
2013-10-05 06:52:31 +08:00
|
|
|
.ent directives_test
|
2014-01-07 07:27:31 +08:00
|
|
|
.abicalls
|
2013-02-21 07:11:17 +08:00
|
|
|
.frame $sp,0,$ra
|
|
|
|
.mask 0x00000000,0
|
|
|
|
.fmask 0x00000000,0
|
2014-03-20 00:20:19 +08:00
|
|
|
|
|
|
|
# CHECK: .set noreorder
|
2013-04-26 07:31:35 +08:00
|
|
|
# CHECK: b 1332 # encoding: [0x10,0x00,0x01,0x4d]
|
2014-03-20 00:20:19 +08:00
|
|
|
# CHECK-NOT: nop
|
2013-04-26 07:31:35 +08:00
|
|
|
# CHECK: j 1328 # encoding: [0x08,0x00,0x01,0x4c]
|
2014-03-20 00:20:19 +08:00
|
|
|
# CHECK-NOT: nop
|
2013-04-26 07:31:35 +08:00
|
|
|
# CHECK: jal 1328 # encoding: [0x0c,0x00,0x01,0x4c]
|
2014-03-20 00:20:19 +08:00
|
|
|
# CHECK-NOT: nop
|
2015-05-14 21:42:10 +08:00
|
|
|
# CHECK: .set nomacro
|
2013-04-26 07:31:35 +08:00
|
|
|
|
2013-02-21 07:11:17 +08:00
|
|
|
.set noreorder
|
2013-04-26 07:31:35 +08:00
|
|
|
b 1332
|
|
|
|
j 1328
|
|
|
|
jal 1328
|
2013-02-21 07:11:17 +08:00
|
|
|
.set nomacro
|
|
|
|
.set noat
|
2012-09-07 08:48:02 +08:00
|
|
|
$JTI0_0:
|
2013-02-21 07:11:17 +08:00
|
|
|
.gpword ($BB0_2)
|
2013-11-13 21:18:04 +08:00
|
|
|
|
2013-02-21 07:11:17 +08:00
|
|
|
.word 0x77fffffc
|
2013-01-25 09:31:34 +08:00
|
|
|
# CHECK: $JTI0_0:
|
2013-11-06 19:27:05 +08:00
|
|
|
# CHECK: .gpword ($BB0_2)
|
2013-11-13 21:18:04 +08:00
|
|
|
# CHECK: .4byte 2013265916
|
2013-02-21 07:11:17 +08:00
|
|
|
.set at=$12
|
|
|
|
.set macro
|
2015-05-14 21:42:10 +08:00
|
|
|
# CHECK: .set macro
|
2014-03-10 21:21:10 +08:00
|
|
|
# CHECK: .set reorder
|
2013-04-26 07:31:35 +08:00
|
|
|
# CHECK: b 1332 # encoding: [0x10,0x00,0x01,0x4d]
|
|
|
|
# CHECK: nop # encoding: [0x00,0x00,0x00,0x00]
|
|
|
|
# CHECK: j 1328 # encoding: [0x08,0x00,0x01,0x4c]
|
|
|
|
# CHECK: nop # encoding: [0x00,0x00,0x00,0x00]
|
|
|
|
# CHECK: jal 1328 # encoding: [0x0c,0x00,0x01,0x4c]
|
|
|
|
# CHECK: nop # encoding: [0x00,0x00,0x00,0x00]
|
2013-02-21 07:11:17 +08:00
|
|
|
.set reorder
|
2013-12-09 19:03:25 +08:00
|
|
|
$BB0_4:
|
2013-04-26 07:31:35 +08:00
|
|
|
b 1332
|
|
|
|
j 1328
|
|
|
|
jal 1328
|
2013-02-21 07:11:17 +08:00
|
|
|
.set at=$a0
|
2013-03-22 05:44:16 +08:00
|
|
|
.set STORE_MASK,$t7
|
|
|
|
.set FPU_MASK,$f7
|
2013-12-09 19:03:25 +08:00
|
|
|
.set $tmp7, $BB0_4-$BB0_2
|
2013-06-20 19:21:49 +08:00
|
|
|
.set f6,$f6
|
2013-07-10 18:18:10 +08:00
|
|
|
# CHECK: abs.s $f6, $f7 # encoding: [0x46,0x00,0x39,0x85]
|
2014-05-23 21:35:24 +08:00
|
|
|
# CHECK: lui $1, %hi($tmp7) # encoding: [0x3c,0x01,A,A]
|
2016-05-03 21:35:44 +08:00
|
|
|
# CHECK: # fixup A - offset: 0, value: %hi($tmp7), kind: fixup_Mips_HI16
|
2013-06-20 19:21:49 +08:00
|
|
|
abs.s f6,FPU_MASK
|
2013-12-09 19:03:25 +08:00
|
|
|
lui $1, %hi($tmp7)
|
2014-03-04 17:54:09 +08:00
|
|
|
|
|
|
|
# CHECK: .set mips32r2
|
|
|
|
# CHECK: ldxc1 $f0, $zero($5) # encoding: [0x4c,0xa0,0x00,0x01]
|
|
|
|
# CHECK: luxc1 $f0, $6($5) # encoding: [0x4c,0xa6,0x00,0x05]
|
|
|
|
# CHECK: lwxc1 $f6, $2($5) # encoding: [0x4c,0xa2,0x01,0x80]
|
|
|
|
.set mips32r2
|
|
|
|
ldxc1 $f0, $zero($5)
|
|
|
|
luxc1 $f0, $6($5)
|
|
|
|
lwxc1 $f6, $2($5)
|
2014-03-05 19:05:09 +08:00
|
|
|
|
2014-03-26 23:14:32 +08:00
|
|
|
# CHECK: .set mips64
|
|
|
|
# CHECK: dadd $3, $3, $3
|
|
|
|
.set mips64
|
|
|
|
dadd $3, $3, $3 # encoding: [0x00,0x62,0x18,0x2c]
|
|
|
|
|
2014-03-26 22:52:22 +08:00
|
|
|
# CHECK: .set mips64r2
|
|
|
|
# CHECK: drotr $9, $6, 30 # encoding: [0x00,0x26,0x4f,0xba]
|
|
|
|
.set mips64r2
|
|
|
|
drotr $9, $6, 30
|
|
|
|
|
2014-03-05 19:05:09 +08:00
|
|
|
# CHECK: .set dsp
|
|
|
|
# CHECK: lbux $7, $10($11) # encoding: [0x7d,0x6a,0x39,0x8a]
|
|
|
|
# CHECK: lhx $5, $6($7) # encoding: [0x7c,0xe6,0x29,0x0a]
|
|
|
|
.set dsp
|
|
|
|
lbux $7, $10($11)
|
|
|
|
lhx $5, $6($7)
|
2017-10-06 01:40:32 +08:00
|
|
|
|
|
|
|
# CHECK: .set dspr2
|
|
|
|
# CHECK: append $7, $10, 2 # encoding: [0x7d,0x47,0x10,0x31]
|
|
|
|
# CHECK: balign $5, $6, 3 # encoding: [0x7c,0xc5,0x1c,0x31]
|
|
|
|
.set dspr2
|
|
|
|
append $7, $10, 2
|
|
|
|
balign $5, $6, 3
|