1 2 # RUN: llvm-mc -triple powerpc64-unknown-unknown --show-encoding %s | FileCheck %s 3 4 # Floating-point facility 5 6 # Floating-point load instructions 7 8 # CHECK: lfs 2, 128(4) # encoding: [0xc0,0x44,0x00,0x80] 9 lfs 2, 128(4) 10 # CHECK: lfsx 2, 3, 4 # encoding: [0x7c,0x43,0x24,0x2e] 11 lfsx 2, 3, 4 12 # CHECK: lfsu 2, 128(4) # encoding: [0xc4,0x44,0x00,0x80] 13 lfsu 2, 128(4) 14 # CHECK: lfsux 2, 3, 4 # encoding: [0x7c,0x43,0x24,0x6e] 15 lfsux 2, 3, 4 16 # CHECK: lfd 2, 128(4) # encoding: [0xc8,0x44,0x00,0x80] 17 lfd 2, 128(4) 18 # CHECK: lfdx 2, 3, 4 # encoding: [0x7c,0x43,0x24,0xae] 19 lfdx 2, 3, 4 20 # CHECK: lfdu 2, 128(4) # encoding: [0xcc,0x44,0x00,0x80] 21 lfdu 2, 128(4) 22 # CHECK: lfdux 2, 3, 4 # encoding: [0x7c,0x43,0x24,0xee] 23 lfdux 2, 3, 4 24 # CHECK: lfiwax 2, 3, 4 # encoding: [0x7c,0x43,0x26,0xae] 25 lfiwax 2, 3, 4 26 # CHECK: lfiwzx 2, 3, 4 # encoding: [0x7c,0x43,0x26,0xee] 27 lfiwzx 2, 3, 4 28 29 # Floating-point store instructions 30 31 # CHECK: stfs 2, 128(4) # encoding: [0xd0,0x44,0x00,0x80] 32 stfs 2, 128(4) 33 # CHECK: stfsx 2, 3, 4 # encoding: [0x7c,0x43,0x25,0x2e] 34 stfsx 2, 3, 4 35 # CHECK: stfsu 2, 128(4) # encoding: [0xd4,0x44,0x00,0x80] 36 stfsu 2, 128(4) 37 # CHECK: stfsux 2, 3, 4 # encoding: [0x7c,0x43,0x25,0x6e] 38 stfsux 2, 3, 4 39 # CHECK: stfd 2, 128(4) # encoding: [0xd8,0x44,0x00,0x80] 40 stfd 2, 128(4) 41 # CHECK: stfdx 2, 3, 4 # encoding: [0x7c,0x43,0x25,0xae] 42 stfdx 2, 3, 4 43 # CHECK: stfdu 2, 128(4) # encoding: [0xdc,0x44,0x00,0x80] 44 stfdu 2, 128(4) 45 # CHECK: stfdux 2, 3, 4 # encoding: [0x7c,0x43,0x25,0xee] 46 stfdux 2, 3, 4 47 # CHECK: stfiwx 2, 3, 4 # encoding: [0x7c,0x43,0x27,0xae] 48 stfiwx 2, 3, 4 49 50 # Floating-point move instructions 51 52 # CHECK: fmr 2, 3 # encoding: [0xfc,0x40,0x18,0x90] 53 fmr 2, 3 54 # CHECK: fmr. 2, 3 # encoding: [0xfc,0x40,0x18,0x91] 55 fmr. 2, 3 56 # CHECK: fneg 2, 3 # encoding: [0xfc,0x40,0x18,0x50] 57 fneg 2, 3 58 # CHECK: fneg. 2, 3 # encoding: [0xfc,0x40,0x18,0x51] 59 fneg. 2, 3 60 # CHECK: fabs 2, 3 # encoding: [0xfc,0x40,0x1a,0x10] 61 fabs 2, 3 62 # CHECK: fabs. 2, 3 # encoding: [0xfc,0x40,0x1a,0x11] 63 fabs. 2, 3 64 # CHECK: fnabs 2, 3 # encoding: [0xfc,0x40,0x19,0x10] 65 fnabs 2, 3 66 # CHECK: fnabs. 2, 3 # encoding: [0xfc,0x40,0x19,0x11] 67 fnabs. 2, 3 68 # FIXME: fcpsgn 2, 3 69 # FIXME: fcpsgn. 2, 3 70 71 # Floating-point arithmetic instructions 72 73 # CHECK: fadd 2, 3, 4 # encoding: [0xfc,0x43,0x20,0x2a] 74 fadd 2, 3, 4 75 # CHECK: fadd. 2, 3, 4 # encoding: [0xfc,0x43,0x20,0x2b] 76 fadd. 2, 3, 4 77 # CHECK: fadds 2, 3, 4 # encoding: [0xec,0x43,0x20,0x2a] 78 fadds 2, 3, 4 79 # CHECK: fadds. 2, 3, 4 # encoding: [0xec,0x43,0x20,0x2b] 80 fadds. 2, 3, 4 81 # CHECK: fsub 2, 3, 4 # encoding: [0xfc,0x43,0x20,0x28] 82 fsub 2, 3, 4 83 # CHECK: fsub. 2, 3, 4 # encoding: [0xfc,0x43,0x20,0x29] 84 fsub. 2, 3, 4 85 # CHECK: fsubs 2, 3, 4 # encoding: [0xec,0x43,0x20,0x28] 86 fsubs 2, 3, 4 87 # CHECK: fsubs. 2, 3, 4 # encoding: [0xec,0x43,0x20,0x29] 88 fsubs. 2, 3, 4 89 90 # CHECK: fmul 2, 3, 4 # encoding: [0xfc,0x43,0x01,0x32] 91 fmul 2, 3, 4 92 # CHECK: fmul. 2, 3, 4 # encoding: [0xfc,0x43,0x01,0x33] 93 fmul. 2, 3, 4 94 # CHECK: fmuls 2, 3, 4 # encoding: [0xec,0x43,0x01,0x32] 95 fmuls 2, 3, 4 96 # CHECK: fmuls. 2, 3, 4 # encoding: [0xec,0x43,0x01,0x33] 97 fmuls. 2, 3, 4 98 # CHECK: fdiv 2, 3, 4 # encoding: [0xfc,0x43,0x20,0x24] 99 fdiv 2, 3, 4 100 # CHECK: fdiv. 2, 3, 4 # encoding: [0xfc,0x43,0x20,0x25] 101 fdiv. 2, 3, 4 102 # CHECK: fdivs 2, 3, 4 # encoding: [0xec,0x43,0x20,0x24] 103 fdivs 2, 3, 4 104 # CHECK: fdivs. 2, 3, 4 # encoding: [0xec,0x43,0x20,0x25] 105 fdivs. 2, 3, 4 106 # CHECK: fsqrt 2, 3 # encoding: [0xfc,0x40,0x18,0x2c] 107 fsqrt 2, 3 108 # CHECK: fsqrt. 2, 3 # encoding: [0xfc,0x40,0x18,0x2d] 109 fsqrt. 2, 3 110 # CHECK: fsqrts 2, 3 # encoding: [0xec,0x40,0x18,0x2c] 111 fsqrts 2, 3 112 # CHECK: fsqrts. 2, 3 # encoding: [0xec,0x40,0x18,0x2d] 113 fsqrts. 2, 3 114 115 # CHECK: fre 2, 3 # encoding: [0xfc,0x40,0x18,0x30] 116 fre 2, 3 117 # CHECK: fre. 2, 3 # encoding: [0xfc,0x40,0x18,0x31] 118 fre. 2, 3 119 # CHECK: fres 2, 3 # encoding: [0xec,0x40,0x18,0x30] 120 fres 2, 3 121 # CHECK: fres. 2, 3 # encoding: [0xec,0x40,0x18,0x31] 122 fres. 2, 3 123 # CHECK: frsqrte 2, 3 # encoding: [0xfc,0x40,0x18,0x34] 124 frsqrte 2, 3 125 # CHECK: frsqrte. 2, 3 # encoding: [0xfc,0x40,0x18,0x35] 126 frsqrte. 2, 3 127 # CHECK: frsqrtes 2, 3 # encoding: [0xec,0x40,0x18,0x34] 128 frsqrtes 2, 3 129 # CHECK: frsqrtes. 2, 3 # encoding: [0xec,0x40,0x18,0x35] 130 frsqrtes. 2, 3 131 # FIXME: ftdiv 2, 3, 4 132 # FIXME: ftsqrt 2, 3, 4 133 134 # CHECK: fmadd 2, 3, 4, 5 # encoding: [0xfc,0x43,0x29,0x3a] 135 fmadd 2, 3, 4, 5 136 # CHECK: fmadd. 2, 3, 4, 5 # encoding: [0xfc,0x43,0x29,0x3b] 137 fmadd. 2, 3, 4, 5 138 # CHECK: fmadds 2, 3, 4, 5 # encoding: [0xec,0x43,0x29,0x3a] 139 fmadds 2, 3, 4, 5 140 # CHECK: fmadds. 2, 3, 4, 5 # encoding: [0xec,0x43,0x29,0x3b] 141 fmadds. 2, 3, 4, 5 142 # CHECK: fmsub 2, 3, 4, 5 # encoding: [0xfc,0x43,0x29,0x38] 143 fmsub 2, 3, 4, 5 144 # CHECK: fmsub. 2, 3, 4, 5 # encoding: [0xfc,0x43,0x29,0x39] 145 fmsub. 2, 3, 4, 5 146 # CHECK: fmsubs 2, 3, 4, 5 # encoding: [0xec,0x43,0x29,0x38] 147 fmsubs 2, 3, 4, 5 148 # CHECK: fmsubs. 2, 3, 4, 5 # encoding: [0xec,0x43,0x29,0x39] 149 fmsubs. 2, 3, 4, 5 150 # CHECK: fnmadd 2, 3, 4, 5 # encoding: [0xfc,0x43,0x29,0x3e] 151 fnmadd 2, 3, 4, 5 152 # CHECK: fnmadd. 2, 3, 4, 5 # encoding: [0xfc,0x43,0x29,0x3f] 153 fnmadd. 2, 3, 4, 5 154 # CHECK: fnmadds 2, 3, 4, 5 # encoding: [0xec,0x43,0x29,0x3e] 155 fnmadds 2, 3, 4, 5 156 # CHECK: fnmadds. 2, 3, 4, 5 # encoding: [0xec,0x43,0x29,0x3f] 157 fnmadds. 2, 3, 4, 5 158 # CHECK: fnmsub 2, 3, 4, 5 # encoding: [0xfc,0x43,0x29,0x3c] 159 fnmsub 2, 3, 4, 5 160 # CHECK: fnmsub. 2, 3, 4, 5 # encoding: [0xfc,0x43,0x29,0x3d] 161 fnmsub. 2, 3, 4, 5 162 # CHECK: fnmsubs 2, 3, 4, 5 # encoding: [0xec,0x43,0x29,0x3c] 163 fnmsubs 2, 3, 4, 5 164 # CHECK: fnmsubs. 2, 3, 4, 5 # encoding: [0xec,0x43,0x29,0x3d] 165 fnmsubs. 2, 3, 4, 5 166 167 # Floating-point rounding and conversion instructions 168 169 # CHECK: frsp 2, 3 # encoding: [0xfc,0x40,0x18,0x18] 170 frsp 2, 3 171 # CHECK: frsp. 2, 3 # encoding: [0xfc,0x40,0x18,0x19] 172 frsp. 2, 3 173 174 # FIXME: fctid 2, 3 175 # FIXME: fctid. 2, 3 176 # CHECK: fctidz 2, 3 # encoding: [0xfc,0x40,0x1e,0x5e] 177 fctidz 2, 3 178 # CHECK: fctidz. 2, 3 # encoding: [0xfc,0x40,0x1e,0x5f] 179 fctidz. 2, 3 180 # FIXME: fctidu 2, 3 181 # FIXME: fctidu. 2, 3 182 # CHECK: fctiduz 2, 3 # encoding: [0xfc,0x40,0x1f,0x5e] 183 fctiduz 2, 3 184 # CHECK: fctiduz. 2, 3 # encoding: [0xfc,0x40,0x1f,0x5f] 185 fctiduz. 2, 3 186 # FIXME: fctiw 2, 3 187 # FIXME: fctiw. 2, 3 188 # CHECK: fctiwz 2, 3 # encoding: [0xfc,0x40,0x18,0x1e] 189 fctiwz 2, 3 190 # CHECK: fctiwz. 2, 3 # encoding: [0xfc,0x40,0x18,0x1f] 191 fctiwz. 2, 3 192 # FIXME: fctiwu 2, 3 193 # FIXME: fctiwu. 2, 3 194 # CHECK: fctiwuz 2, 3 # encoding: [0xfc,0x40,0x19,0x1e] 195 fctiwuz 2, 3 196 # CHECK: fctiwuz. 2, 3 # encoding: [0xfc,0x40,0x19,0x1f] 197 fctiwuz. 2, 3 198 # CHECK: fcfid 2, 3 # encoding: [0xfc,0x40,0x1e,0x9c] 199 fcfid 2, 3 200 # CHECK: fcfid. 2, 3 # encoding: [0xfc,0x40,0x1e,0x9d] 201 fcfid. 2, 3 202 # CHECK: fcfidu 2, 3 # encoding: [0xfc,0x40,0x1f,0x9c] 203 fcfidu 2, 3 204 # CHECK: fcfidu. 2, 3 # encoding: [0xfc,0x40,0x1f,0x9d] 205 fcfidu. 2, 3 206 # CHECK: fcfids 2, 3 # encoding: [0xec,0x40,0x1e,0x9c] 207 fcfids 2, 3 208 # CHECK: fcfids. 2, 3 # encoding: [0xec,0x40,0x1e,0x9d] 209 fcfids. 2, 3 210 # CHECK: fcfidus 2, 3 # encoding: [0xec,0x40,0x1f,0x9c] 211 fcfidus 2, 3 212 # CHECK: fcfidus. 2, 3 # encoding: [0xec,0x40,0x1f,0x9d] 213 fcfidus. 2, 3 214 # CHECK: frin 2, 3 # encoding: [0xfc,0x40,0x1b,0x10] 215 frin 2, 3 216 # CHECK: frin. 2, 3 # encoding: [0xfc,0x40,0x1b,0x11] 217 frin. 2, 3 218 # CHECK: frip 2, 3 # encoding: [0xfc,0x40,0x1b,0x90] 219 frip 2, 3 220 # CHECK: frip. 2, 3 # encoding: [0xfc,0x40,0x1b,0x91] 221 frip. 2, 3 222 # CHECK: friz 2, 3 # encoding: [0xfc,0x40,0x1b,0x50] 223 friz 2, 3 224 # CHECK: friz. 2, 3 # encoding: [0xfc,0x40,0x1b,0x51] 225 friz. 2, 3 226 # CHECK: frim 2, 3 # encoding: [0xfc,0x40,0x1b,0xd0] 227 frim 2, 3 228 # CHECK: frim. 2, 3 # encoding: [0xfc,0x40,0x1b,0xd1] 229 frim. 2, 3 230 231 # Floating-point compare instructions 232 233 # CHECK: fcmpu 2, 3, 4 # encoding: [0xfd,0x03,0x20,0x00] 234 fcmpu 2, 3, 4 235 # FIXME: fcmpo 2, 3, 4 236 237 # Floating-point select instruction 238 239 # CHECK: fsel 2, 3, 4, 5 # encoding: [0xfc,0x43,0x29,0x2e] 240 fsel 2, 3, 4, 5 241 # CHECK: fsel. 2, 3, 4, 5 # encoding: [0xfc,0x43,0x29,0x2f] 242 fsel. 2, 3, 4, 5 243 244 # Floating-point status and control register instructions 245 246 # CHECK: mffs 2 # encoding: [0xfc,0x40,0x04,0x8e] 247 mffs 2 248 # FIXME: mffs. 2 249 250 # FIXME: mcrfs 2, 3 251 252 # FIXME: mtfsfi 2, 3, 1 253 # FIXME: mtfsfi. 2, 3, 1 254 # FIXME: mtfsf 2, 3, 1, 1 255 # FIXME: mtfsf. 2, 3, 1, 1 256 257 # CHECK: mtfsb0 31 # encoding: [0xff,0xe0,0x00,0x8c] 258 mtfsb0 31 259 # FIXME: mtfsb0. 31 260 # CHECK: mtfsb1 31 # encoding: [0xff,0xe0,0x00,0x4c] 261 mtfsb1 31 262 # FIXME: mtfsb1. 31 263 264