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: lbu 10 # BINARY: 110000 00001 00010 00011 00000000000 11 # CHECK: encoding: [0xc0,0x22,0x18,0x00] 12 lbu r1, r2, r3 13 14 # CHECK: lbur 15 # BINARY: 110000 00001 00010 00011 01000000000 16 # CHECK: encoding: [0xc0,0x22,0x1a,0x00] 17 lbur r1, r2, r3 18 19 # CHECK: lbui 20 # BINARY: 111000 00001 00010 0000000000011100 21 # CHECK: encoding: [0xe0,0x22,0x00,0x1c] 22 lbui r1, r2, 28 23 24 # CHECK: lhu 25 # BINARY: 110001 00001 00010 00011 00000000000 26 # CHECK: encoding: [0xc4,0x22,0x18,0x00] 27 lhu r1, r2, r3 28 29 # CHECK: lhur 30 # BINARY: 110001 00001 00010 00011 01000000000 31 # CHECK: encoding: [0xc4,0x22,0x1a,0x00] 32 lhur r1, r2, r3 33 34 # CHECK: lhui 35 # BINARY: 111001 00001 00010 0000000000011100 36 # CHECK: encoding: [0xe4,0x22,0x00,0x1c] 37 lhui r1, r2, 28 38 39 # CHECK: lw 40 # BINARY: 110010 00001 00010 00011 00000000000 41 # CHECK: encoding: [0xc8,0x22,0x18,0x00] 42 lw r1, r2, r3 43 44 # CHECK: lwr 45 # BINARY: 110010 00001 00010 00011 01000000000 46 # CHECK: encoding: [0xc8,0x22,0x1a,0x00] 47 lwr r1, r2, r3 48 49 # CHECK: lwi 50 # BINARY: 111010 00001 00010 0000000000011100 51 # CHECK: encoding: [0xe8,0x22,0x00,0x1c] 52 lwi r1, r2, 28 53 54 # CHECK: lwx 55 # BINARY: 110010 00001 00010 00011 10000000000 56 # CHECK: encoding: [0xc8,0x22,0x1c,0x00] 57 lwx r1, r2, r3 58 59 # CHECK: sb 60 # BINARY: 110100 00001 00010 00011 00000000000 61 # CHECK: encoding: [0xd0,0x22,0x18,0x00] 62 sb r1, r2, r3 63 64 # CHECK: sbr 65 # BINARY: 110100 00001 00010 00011 01000000000 66 # CHECK: encoding: [0xd0,0x22,0x1a,0x00] 67 sbr r1, r2, r3 68 69 # CHECK: sbi 70 # BINARY: 111100 00001 00010 0000000000011100 71 # CHECK: encoding: [0xf0,0x22,0x00,0x1c] 72 sbi r1, r2, 28 73 74 # CHECK: sh 75 # BINARY: 110101 00001 00010 00011 00000000000 76 # CHECK: encoding: [0xd4,0x22,0x18,0x00] 77 sh r1, r2, r3 78 79 # CHECK: shr 80 # BINARY: 110101 00001 00010 00011 01000000000 81 # CHECK: encoding: [0xd4,0x22,0x1a,0x00] 82 shr r1, r2, r3 83 84 # CHECK: shi 85 # BINARY: 111101 00001 00010 0000000000011100 86 # CHECK: encoding: [0xf4,0x22,0x00,0x1c] 87 shi r1, r2, 28 88 89 # CHECK: sw 90 # BINARY: 110110 00001 00010 00011 00000000000 91 # CHECK: encoding: [0xd8,0x22,0x18,0x00] 92 sw r1, r2, r3 93 94 # CHECK: swr 95 # BINARY: 110110 00001 00010 00011 01000000000 96 # CHECK: encoding: [0xd8,0x22,0x1a,0x00] 97 swr r1, r2, r3 98 99 # CHECK: swi 100 # BINARY: 111110 00001 00010 0000000000011100 101 # CHECK: encoding: [0xf8,0x22,0x00,0x1c] 102 swi r1, r2, 28 103 104 # CHECK: swx 105 # BINARY: 110110 00001 00010 00011 10000000000 106 # CHECK: encoding: [0xd8,0x22,0x1c,0x00] 107 swx r1, r2, r3 108