2013-05-04 03:51:09 +08:00
|
|
|
|
2014-03-25 02:16:09 +08:00
|
|
|
# RUN: llvm-mc -triple powerpc64-unknown-unknown --show-encoding %s | FileCheck -check-prefix=CHECK-BE %s
|
|
|
|
# RUN: llvm-mc -triple powerpc64le-unknown-unknown --show-encoding %s | FileCheck -check-prefix=CHECK-LE %s
|
2013-05-04 03:51:09 +08:00
|
|
|
|
|
|
|
# Cache management instruction
|
|
|
|
|
2014-03-25 02:16:09 +08:00
|
|
|
# CHECK-BE: icbi 2, 3 # encoding: [0x7c,0x02,0x1f,0xac]
|
|
|
|
# CHECK-LE: icbi 2, 3 # encoding: [0xac,0x1f,0x02,0x7c]
|
|
|
|
icbi 2, 3
|
|
|
|
|
2014-08-24 07:21:04 +08:00
|
|
|
# CHECK-BE: icbt 0, 5, 31 # encoding: [0x7c,0x05,0xf8,0x2c]
|
|
|
|
# CHECK-LE: icbt 0, 5, 31 # encoding: [0x2c,0xf8,0x05,0x7c]
|
|
|
|
icbt 0, 5, 31
|
|
|
|
|
2015-04-24 06:47:57 +08:00
|
|
|
# CHECK-BE: dcbt 2, 3, 10 # encoding: [0x7d,0x42,0x1a,0x2c]
|
|
|
|
# CHECK-LE: dcbt 2, 3, 10 # encoding: [0x2c,0x1a,0x42,0x7d]
|
|
|
|
dcbt 2, 3, 10
|
|
|
|
# CHECK-BE: dcbt 2, 3, 10 # encoding: [0x7d,0x42,0x1a,0x2c]
|
|
|
|
# CHECK-LE: dcbt 2, 3, 10 # encoding: [0x2c,0x1a,0x42,0x7d]
|
|
|
|
dcbtct 2, 3, 10
|
|
|
|
# CHECK-BE: dcbt 2, 3, 10 # encoding: [0x7d,0x42,0x1a,0x2c]
|
|
|
|
# CHECK-LE: dcbt 2, 3, 10 # encoding: [0x2c,0x1a,0x42,0x7d]
|
|
|
|
dcbtds 2, 3, 10
|
2014-03-25 02:16:09 +08:00
|
|
|
# CHECK-BE: dcbt 2, 3 # encoding: [0x7c,0x02,0x1a,0x2c]
|
|
|
|
# CHECK-LE: dcbt 2, 3 # encoding: [0x2c,0x1a,0x02,0x7c]
|
|
|
|
dcbt 2, 3
|
2015-04-24 06:47:57 +08:00
|
|
|
# CHECK-BE: dcbt 2, 3 # encoding: [0x7c,0x02,0x1a,0x2c]
|
|
|
|
# CHECK-LE: dcbt 2, 3 # encoding: [0x2c,0x1a,0x02,0x7c]
|
|
|
|
dcbt 2, 3, 0
|
|
|
|
# CHECK-BE: dcbtt 2, 3 # encoding: [0x7e,0x02,0x1a,0x2c]
|
|
|
|
# CHECK-LE: dcbtt 2, 3 # encoding: [0x2c,0x1a,0x02,0x7e]
|
|
|
|
dcbtt 2, 3
|
|
|
|
# CHECK-BE: dcbtt 2, 3 # encoding: [0x7e,0x02,0x1a,0x2c]
|
|
|
|
# CHECK-LE: dcbtt 2, 3 # encoding: [0x2c,0x1a,0x02,0x7e]
|
|
|
|
dcbt 2, 3, 16
|
|
|
|
# CHECK-BE: dcbtst 2, 3, 10 # encoding: [0x7d,0x42,0x19,0xec]
|
|
|
|
# CHECK-LE: dcbtst 2, 3, 10 # encoding: [0xec,0x19,0x42,0x7d]
|
|
|
|
dcbtst 2, 3, 10
|
|
|
|
# CHECK-BE: dcbtst 2, 3, 10 # encoding: [0x7d,0x42,0x19,0xec]
|
|
|
|
# CHECK-LE: dcbtst 2, 3, 10 # encoding: [0xec,0x19,0x42,0x7d]
|
|
|
|
dcbtstct 2, 3, 10
|
|
|
|
# CHECK-BE: dcbtst 2, 3, 10 # encoding: [0x7d,0x42,0x19,0xec]
|
|
|
|
# CHECK-LE: dcbtst 2, 3, 10 # encoding: [0xec,0x19,0x42,0x7d]
|
|
|
|
dcbtstds 2, 3, 10
|
2014-03-25 02:16:09 +08:00
|
|
|
# CHECK-BE: dcbtst 2, 3 # encoding: [0x7c,0x02,0x19,0xec]
|
|
|
|
# CHECK-LE: dcbtst 2, 3 # encoding: [0xec,0x19,0x02,0x7c]
|
|
|
|
dcbtst 2, 3
|
2015-04-24 06:47:57 +08:00
|
|
|
# CHECK-BE: dcbtst 2, 3 # encoding: [0x7c,0x02,0x19,0xec]
|
|
|
|
# CHECK-LE: dcbtst 2, 3 # encoding: [0xec,0x19,0x02,0x7c]
|
|
|
|
dcbtst 2, 3, 0
|
|
|
|
# CHECK-BE: dcbtstt 2, 3 # encoding: [0x7e,0x02,0x19,0xec]
|
|
|
|
# CHECK-LE: dcbtstt 2, 3 # encoding: [0xec,0x19,0x02,0x7e]
|
|
|
|
dcbtstt 2, 3
|
|
|
|
# CHECK-BE: dcbtstt 2, 3 # encoding: [0x7e,0x02,0x19,0xec]
|
|
|
|
# CHECK-LE: dcbtstt 2, 3 # encoding: [0xec,0x19,0x02,0x7e]
|
|
|
|
dcbtst 2, 3, 16
|
2014-03-25 02:16:09 +08:00
|
|
|
# CHECK-BE: dcbz 2, 3 # encoding: [0x7c,0x02,0x1f,0xec]
|
|
|
|
# CHECK-LE: dcbz 2, 3 # encoding: [0xec,0x1f,0x02,0x7c]
|
|
|
|
dcbz 2, 3
|
|
|
|
# CHECK-BE: dcbst 2, 3 # encoding: [0x7c,0x02,0x18,0x6c]
|
|
|
|
# CHECK-LE: dcbst 2, 3 # encoding: [0x6c,0x18,0x02,0x7c]
|
|
|
|
dcbst 2, 3
|
|
|
|
# FIXME: dcbf 2, 3, 1
|
2013-05-04 03:51:09 +08:00
|
|
|
|
|
|
|
# Synchronization instructions
|
|
|
|
|
2014-03-25 02:16:09 +08:00
|
|
|
# CHECK-BE: isync # encoding: [0x4c,0x00,0x01,0x2c]
|
|
|
|
# CHECK-LE: isync # encoding: [0x2c,0x01,0x00,0x4c]
|
|
|
|
isync
|
|
|
|
|
|
|
|
# FIXME: stbcx. 2, 3, 4
|
|
|
|
# FIXME: sthcx. 2, 3, 4
|
|
|
|
# CHECK-BE: stwcx. 2, 3, 4 # encoding: [0x7c,0x43,0x21,0x2d]
|
|
|
|
# CHECK-LE: stwcx. 2, 3, 4 # encoding: [0x2d,0x21,0x43,0x7c]
|
|
|
|
stwcx. 2, 3, 4
|
|
|
|
# CHECK-BE: stdcx. 2, 3, 4 # encoding: [0x7c,0x43,0x21,0xad]
|
|
|
|
# CHECK-LE: stdcx. 2, 3, 4 # encoding: [0xad,0x21,0x43,0x7c]
|
|
|
|
stdcx. 2, 3, 4
|
|
|
|
|
2015-04-24 02:30:38 +08:00
|
|
|
# CHECK-BE: ptesync # encoding: [0x7c,0x40,0x04,0xac]
|
|
|
|
# CHECK-LE: ptesync # encoding: [0xac,0x04,0x40,0x7c]
|
2014-03-25 02:16:09 +08:00
|
|
|
sync 2
|
|
|
|
# CHECK-BE: eieio # encoding: [0x7c,0x00,0x06,0xac]
|
|
|
|
# CHECK-LE: eieio # encoding: [0xac,0x06,0x00,0x7c]
|
|
|
|
eieio
|
2015-04-24 02:30:38 +08:00
|
|
|
# CHECK-BE: waitimpl # encoding: [0x7c,0x40,0x00,0x7c]
|
|
|
|
# CHECK-LE: waitimpl # encoding: [0x7c,0x00,0x40,0x7c]
|
2014-03-25 02:16:09 +08:00
|
|
|
wait 2
|
2014-07-30 07:16:31 +08:00
|
|
|
# CHECK-BE: mbar 1 # encoding: [0x7c,0x20,0x06,0xac]
|
|
|
|
# CHECK-LE: mbar 1 # encoding: [0xac,0x06,0x20,0x7c]
|
|
|
|
mbar 1
|
2015-04-24 02:30:38 +08:00
|
|
|
# CHECK-BE: mbar # encoding: [0x7c,0x00,0x06,0xac]
|
2014-07-30 07:31:27 +08:00
|
|
|
mbar
|
2013-05-04 03:51:09 +08:00
|
|
|
|
|
|
|
# Extended mnemonics
|
|
|
|
|
2014-03-25 02:16:09 +08:00
|
|
|
# CHECK-BE: dcbf 2, 3 # encoding: [0x7c,0x02,0x18,0xac]
|
|
|
|
# CHECK-LE: dcbf 2, 3 # encoding: [0xac,0x18,0x02,0x7c]
|
|
|
|
dcbf 2, 3
|
|
|
|
# FIXME: dcbfl 2, 3
|
|
|
|
|
2015-03-11 04:51:07 +08:00
|
|
|
# CHECK-BE: lbarx 2, 3, 4 # encoding: [0x7c,0x43,0x20,0x68]
|
|
|
|
# CHECK-LE: lbarx 2, 3, 4 # encoding: [0x68,0x20,0x43,0x7c]
|
|
|
|
lbarx 2, 3, 4
|
|
|
|
|
|
|
|
# CHECK-BE: lharx 2, 3, 4 # encoding: [0x7c,0x43,0x20,0xe8]
|
|
|
|
# CHECK-LE: lharx 2, 3, 4 # encoding: [0xe8,0x20,0x43,0x7c]
|
|
|
|
lharx 2, 3, 4
|
|
|
|
|
2014-03-25 02:16:09 +08:00
|
|
|
# CHECK-BE: lwarx 2, 3, 4 # encoding: [0x7c,0x43,0x20,0x28]
|
|
|
|
# CHECK-LE: lwarx 2, 3, 4 # encoding: [0x28,0x20,0x43,0x7c]
|
|
|
|
lwarx 2, 3, 4
|
2015-03-11 04:51:07 +08:00
|
|
|
|
2014-03-25 02:16:09 +08:00
|
|
|
# CHECK-BE: ldarx 2, 3, 4 # encoding: [0x7c,0x43,0x20,0xa8]
|
|
|
|
# CHECK-LE: ldarx 2, 3, 4 # encoding: [0xa8,0x20,0x43,0x7c]
|
|
|
|
ldarx 2, 3, 4
|
|
|
|
|
2015-03-11 04:51:07 +08:00
|
|
|
# CHECK-BE: lbarx 2, 3, 4, 1 # encoding: [0x7c,0x43,0x20,0x69]
|
|
|
|
# CHECK-LE: lbarx 2, 3, 4, 1 # encoding: [0x69,0x20,0x43,0x7c]
|
|
|
|
lbarx 2, 3, 4, 1
|
|
|
|
|
|
|
|
# CHECK-BE: lharx 2, 3, 4, 1 # encoding: [0x7c,0x43,0x20,0xe9]
|
|
|
|
# CHECK-LE: lharx 2, 3, 4, 1 # encoding: [0xe9,0x20,0x43,0x7c]
|
|
|
|
lharx 2, 3, 4, 1
|
|
|
|
|
|
|
|
# CHECK-BE: lwarx 2, 3, 4, 1 # encoding: [0x7c,0x43,0x20,0x29]
|
|
|
|
# CHECK-LE: lwarx 2, 3, 4, 1 # encoding: [0x29,0x20,0x43,0x7c]
|
|
|
|
lwarx 2, 3, 4, 1
|
|
|
|
|
|
|
|
# CHECK-BE: ldarx 2, 3, 4, 1 # encoding: [0x7c,0x43,0x20,0xa9]
|
|
|
|
# CHECK-LE: ldarx 2, 3, 4, 1 # encoding: [0xa9,0x20,0x43,0x7c]
|
|
|
|
ldarx 2, 3, 4, 1
|
|
|
|
|
2014-03-25 02:16:09 +08:00
|
|
|
# CHECK-BE: sync 0 # encoding: [0x7c,0x00,0x04,0xac]
|
|
|
|
# CHECK-LE: sync 0 # encoding: [0xac,0x04,0x00,0x7c]
|
|
|
|
sync
|
|
|
|
# CHECK-BE: sync 0 # encoding: [0x7c,0x00,0x04,0xac]
|
|
|
|
# CHECK-LE: sync 0 # encoding: [0xac,0x04,0x00,0x7c]
|
|
|
|
msync
|
2015-04-24 02:30:38 +08:00
|
|
|
# CHECK-BE: lwsync # encoding: [0x7c,0x20,0x04,0xac]
|
|
|
|
# CHECK-LE: lwsync # encoding: [0xac,0x04,0x20,0x7c]
|
2014-03-25 02:16:09 +08:00
|
|
|
lwsync
|
2015-04-24 02:30:38 +08:00
|
|
|
# CHECK-BE: ptesync # encoding: [0x7c,0x40,0x04,0xac]
|
|
|
|
# CHECK-LE: ptesync # encoding: [0xac,0x04,0x40,0x7c]
|
2014-03-25 02:16:09 +08:00
|
|
|
ptesync
|
|
|
|
|
2015-04-24 02:30:38 +08:00
|
|
|
# CHECK-BE: wait # encoding: [0x7c,0x00,0x00,0x7c]
|
|
|
|
# CHECK-LE: wait # encoding: [0x7c,0x00,0x00,0x7c]
|
2014-03-25 02:16:09 +08:00
|
|
|
wait
|
2015-04-24 02:30:38 +08:00
|
|
|
# CHECK-BE: waitrsv # encoding: [0x7c,0x20,0x00,0x7c]
|
|
|
|
# CHECK-LE: waitrsv # encoding: [0x7c,0x00,0x20,0x7c]
|
2014-03-25 02:16:09 +08:00
|
|
|
waitrsv
|
2015-04-24 02:30:38 +08:00
|
|
|
# CHECK-BE: waitimpl # encoding: [0x7c,0x40,0x00,0x7c]
|
|
|
|
# CHECK-LE: waitimpl # encoding: [0x7c,0x00,0x40,0x7c]
|
2014-03-25 02:16:09 +08:00
|
|
|
waitimpl
|
2013-05-04 03:51:09 +08:00
|
|
|
|
2013-07-08 23:20:38 +08:00
|
|
|
# Time base instructions
|
|
|
|
|
2014-03-25 02:16:09 +08:00
|
|
|
# CHECK-BE: mftb 2, 123 # encoding: [0x7c,0x5b,0x1a,0xe6]
|
|
|
|
# CHECK-LE: mftb 2, 123 # encoding: [0xe6,0x1a,0x5b,0x7c]
|
|
|
|
mftb 2, 123
|
|
|
|
# CHECK-BE: mftb 2, 268 # encoding: [0x7c,0x4c,0x42,0xe6]
|
|
|
|
# CHECK-LE: mftb 2, 268 # encoding: [0xe6,0x42,0x4c,0x7c]
|
|
|
|
mftb 2
|
2014-08-05 04:28:34 +08:00
|
|
|
# CHECK-BE: mftb 2, 268 # encoding: [0x7c,0x4c,0x42,0xe6]
|
|
|
|
# CHECK-LE: mftb 2, 268 # encoding: [0xe6,0x42,0x4c,0x7c]
|
|
|
|
mftbl 2
|
2015-04-24 02:30:38 +08:00
|
|
|
# CHECK-BE: mftbu 2 # encoding: [0x7c,0x4d,0x42,0xe6]
|
|
|
|
# CHECK-LE: mftbu 2 # encoding: [0xe6,0x42,0x4d,0x7c]
|
2014-03-25 02:16:09 +08:00
|
|
|
mftbu 2
|
2013-07-08 23:20:38 +08:00
|
|
|
|
2015-04-24 02:30:38 +08:00
|
|
|
# CHECK-BE: mttbl 3 # encoding: [0x7c,0x7c,0x43,0xa6]
|
|
|
|
# CHECK-LE: mttbl 3 # encoding: [0xa6,0x43,0x7c,0x7c]
|
2014-08-07 21:06:23 +08:00
|
|
|
mttbl 3
|
2015-04-24 02:30:38 +08:00
|
|
|
# CHECK-BE: mttbu 3 # encoding: [0x7c,0x7d,0x43,0xa6]
|
|
|
|
# CHECK-LE: mttbu 3 # encoding: [0xa6,0x43,0x7d,0x7c]
|
2014-08-07 21:06:23 +08:00
|
|
|
mttbu 3
|