1 # RUN: llvm-mc -triple mblaze-unknown-unknown -show-encoding %s | FileCheck %s 2 3 # Test to make sure that all of the TYPE-A instructions supported by 4 # the Microblaze can be parsed by the assembly parser. 5 6 # TYPE A: OPCODE RD RA RB FLAGS 7 # BINARY: 000000 00000 00000 00000 00000000000 8 9 # CHECK: beq 10 # BINARY: 100111 00000 00010 00011 00000000000 11 # CHECK: encoding: [0x9c,0x02,0x18,0x00] 12 beq r2, r3 13 14 # CHECK: bge 15 # BINARY: 100111 00101 00010 00011 00000000000 16 # CHECK: encoding: [0x9c,0xa2,0x18,0x00] 17 bge r2, r3 18 19 # CHECK: bgt 20 # BINARY: 100111 00100 00010 00011 00000000000 21 # CHECK: encoding: [0x9c,0x82,0x18,0x00] 22 bgt r2, r3 23 24 # CHECK: ble 25 # BINARY: 100111 00011 00010 00011 00000000000 26 # CHECK: encoding: [0x9c,0x62,0x18,0x00] 27 ble r2, r3 28 29 # CHECK: blt 30 # BINARY: 100111 00010 00010 00011 00000000000 31 # CHECK: encoding: [0x9c,0x42,0x18,0x00] 32 blt r2, r3 33 34 # CHECK: bne 35 # BINARY: 100111 00001 00010 00011 00000000000 36 # CHECK: encoding: [0x9c,0x22,0x18,0x00] 37 bne r2, r3 38 39 # CHECK: beqd 40 # BINARY: 100111 10000 00010 00011 00000000000 41 # CHECK: encoding: [0x9e,0x02,0x18,0x00] 42 beqd r2, r3 43 44 # CHECK: bged 45 # BINARY: 100111 10101 00010 00011 00000000000 46 # CHECK: encoding: [0x9e,0xa2,0x18,0x00] 47 bged r2, r3 48 49 # CHECK: bgtd 50 # BINARY: 100111 10100 00010 00011 00000000000 51 # CHECK: encoding: [0x9e,0x82,0x18,0x00] 52 bgtd r2, r3 53 54 # CHECK: bled 55 # BINARY: 100111 10011 00010 00011 00000000000 56 # CHECK: encoding: [0x9e,0x62,0x18,0x00] 57 bled r2, r3 58 59 # CHECK: bltd 60 # BINARY: 100111 10010 00010 00011 00000000000 61 # CHECK: encoding: [0x9e,0x42,0x18,0x00] 62 bltd r2, r3 63 64 # CHECK: bned 65 # BINARY: 100111 10001 00010 00011 00000000000 66 # CHECK: encoding: [0x9e,0x22,0x18,0x00] 67 bned r2, r3 68 69 # CHECK: br 70 # BINARY: 100110 00000 00000 00011 00000000000 71 # CHECK: encoding: [0x98,0x00,0x18,0x00] 72 br r3 73 74 # CHECK: bra 75 # BINARY: 100110 00000 01000 00011 00000000000 76 # CHECK: encoding: [0x98,0x08,0x18,0x00] 77 bra r3 78 79 # CHECK: brd 80 # BINARY: 100110 00000 10000 00011 00000000000 81 # CHECK: encoding: [0x98,0x10,0x18,0x00] 82 brd r3 83 84 # CHECK: brad 85 # BINARY: 100110 00000 11000 00011 00000000000 86 # CHECK: encoding: [0x98,0x18,0x18,0x00] 87 brad r3 88 89 # CHECK: brld 90 # BINARY: 100110 01111 10100 00011 00000000000 91 # CHECK: encoding: [0x99,0xf4,0x18,0x00] 92 brld r15, r3 93 94 # CHECK: brald 95 # BINARY: 100110 01111 11100 00011 00000000000 96 # CHECK: encoding: [0x99,0xfc,0x18,0x00] 97 brald r15, r3 98 99 # CHECK: brk 100 # BINARY: 100110 01111 01100 00011 00000000000 101 # CHECK: encoding: [0x99,0xec,0x18,0x00] 102 brk r15, r3 103 104 # CHECK: beqi 105 # BINARY: 101111 00000 00010 0000000000000000 106 # CHECK: encoding: [0xbc,0x02,0x00,0x00] 107 beqi r2, 0 108 109 # CHECK: bgei 110 # BINARY: 101111 00101 00010 0000000000000000 111 # CHECK: encoding: [0xbc,0xa2,0x00,0x00] 112 bgei r2, 0 113 114 # CHECK: bgti 115 # BINARY: 101111 00100 00010 0000000000000000 116 # CHECK: encoding: [0xbc,0x82,0x00,0x00] 117 bgti r2, 0 118 119 # CHECK: blei 120 # BINARY: 101111 00011 00010 0000000000000000 121 # CHECK: encoding: [0xbc,0x62,0x00,0x00] 122 blei r2, 0 123 124 # CHECK: blti 125 # BINARY: 101111 00010 00010 0000000000000000 126 # CHECK: encoding: [0xbc,0x42,0x00,0x00] 127 blti r2, 0 128 129 # CHECK: bnei 130 # BINARY: 101111 00001 00010 0000000000000000 131 # CHECK: encoding: [0xbc,0x22,0x00,0x00] 132 bnei r2, 0 133 134 # CHECK: beqid 135 # BINARY: 101111 10000 00010 0000000000000000 136 # CHECK: encoding: [0xbe,0x02,0x00,0x00] 137 beqid r2, 0 138 139 # CHECK: bgeid 140 # BINARY: 101111 10101 00010 0000000000000000 141 # CHECK: encoding: [0xbe,0xa2,0x00,0x00] 142 bgeid r2, 0 143 144 # CHECK: bgtid 145 # BINARY: 101111 10100 00010 0000000000000000 146 # CHECK: encoding: [0xbe,0x82,0x00,0x00] 147 bgtid r2, 0 148 149 # CHECK: bleid 150 # BINARY: 101111 10011 00010 0000000000000000 151 # CHECK: encoding: [0xbe,0x62,0x00,0x00] 152 bleid r2, 0 153 154 # CHECK: bltid 155 # BINARY: 101111 10010 00010 0000000000000000 156 # CHECK: encoding: [0xbe,0x42,0x00,0x00] 157 bltid r2, 0 158 159 # CHECK: bneid 160 # BINARY: 101111 10001 00010 0000000000000000 161 # CHECK: encoding: [0xbe,0x22,0x00,0x00] 162 bneid r2, 0 163 164 # CHECK: bri 165 # BINARY: 101110 00000 00000 0000000000000000 166 # CHECK: encoding: [0xb8,0x00,0x00,0x00] 167 bri 0 168 169 # CHECK: brai 170 # BINARY: 101110 00000 01000 0000000000000000 171 # CHECK: encoding: [0xb8,0x08,0x00,0x00] 172 brai 0 173 174 # CHECK: brid 175 # BINARY: 101110 00000 10000 0000000000000000 176 # CHECK: encoding: [0xb8,0x10,0x00,0x00] 177 brid 0 178 179 # CHECK: braid 180 # BINARY: 101110 00000 11000 0000000000000000 181 # CHECK: encoding: [0xb8,0x18,0x00,0x00] 182 braid 0 183 184 # CHECK: brlid 185 # BINARY: 101110 01111 10100 0000000000000000 186 # CHECK: encoding: [0xb9,0xf4,0x00,0x00] 187 brlid r15, 0 188 189 # CHECK: bralid 190 # BINARY: 101110 01111 11100 0000000000000000 191 # CHECK: encoding: [0xb9,0xfc,0x00,0x00] 192 bralid r15, 0 193 194 # CHECK: brki 195 # BINARY: 101110 01111 01100 0000000000000000 196 # CHECK: encoding: [0xb9,0xec,0x00,0x00] 197 brki r15, 0 198