llvm.org GIT mirror llvm / 2d829cd
Revert r306095: [mips] Fix reg positions in the aui/daui instructions ELF/mips-plt-r6.s in lld-test is failing. Reverting the change. Original commit message: [mips] Fix register positions in the aui/daui instructions Swapped the position of the rt and rs register in the aut/daui instructions for mips32r6 and mips64r6. With this change, the format of the generated instructions complies with specifications and GCC. Patch by Milos Stojanovic. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@306099 91177308-0d34-0410-b5e6-96231b3b80d8 Petar Jovanovic 2 years ago
7 changed file(s) with 12 addition(s) and 12 deletion(s). Raw diff Collapse all Expand all
325325 class AUI_DESC_BASE
326326 InstrItinClass itin = NoItinerary>
327327 : MipsR6Arch {
328 dag OutOperandList = (outs GPROpnd:$rt);
329 dag InOperandList = (ins GPROpnd:$rs, uimm16:$imm);
330 string AsmString = !strconcat(instr_asm, "\t$rt, $rs, $imm");
328 dag OutOperandList = (outs GPROpnd:$rs);
329 dag InOperandList = (ins GPROpnd:$rt, uimm16:$imm);
330 string AsmString = !strconcat(instr_asm, "\t$rs, $rt, $imm");
331331 list Pattern = [];
332332 InstrItinClass Itinerary = itin;
333333 }
33 0x0a 0x00 0x29 0x25 # CHECK: addiu $9, $9, 10
44 0xa0 0x22 0x43 0x7c # CHECK: align $4, $2, $3, 2
55 0x38 0x00 0x7f 0xec # CHECK: aluipc $3, 56
6 0xe9 0xff 0x43 0x3c # CHECK: aui $3, $2, 65513
6 0xe9 0xff 0x62 0x3c # CHECK: aui $3, $2, 65513
77 0xff 0xff 0x7e 0xec # CHECK: auipc $3, -1
88 0x9b 0x14 0x11 0x04 # CHECK: bal 21104
99 0xb8 0x96 0x37 0xe8 # CHECK: balc 14572260
5959 0x25 0x29 0x00 0x0a # CHECK: addiu $9, $9, 10
6060 0x30 0x42 0x00 0x04 # CHECK: andi $2, $2, 4
6161 0x34 0x42 0x00 0x04 # CHECK: ori $2, $2, 4
62 0x3c 0x43 0xff 0xe9 # CHECK: aui $3, $2, 65513
62 0x3c 0x62 0xff 0xe9 # CHECK: aui $3, $2, 65513
6363 0x40 0x08 0x78 0x01 # CHECK: mfc0 $8, $15, 1
6464 0x40 0x08 0x80 0x03 # CHECK: mfc0 $8, $16, 3
6565 0x40 0x89 0x78 0x01 # CHECK: mtc0 $9, $15, 1
33 0xa0 0x22 0x43 0x7c # CHECK: align $4, $2, $3, 2
44 0x38 0x00 0x7f 0xec # CHECK: aluipc $3, 56
55 0x04 0x00 0x42 0x30 # CHECK: andi $2, $2, 4
6 0xe9 0xff 0x43 0x3c # CHECK: aui $3, $2, 65513
6 0xe9 0xff 0x62 0x3c # CHECK: aui $3, $2, 65513
77 0xff 0xff 0x7e 0xec # CHECK: auipc $3, -1
88 0x9b 0x14 0x11 0x04 # CHECK: bal 21104
99 0xb8 0x96 0x37 0xe8 # CHECK: balc 14572260
9696 0x78 0x56 0x66 0x04 # CHECK: dahi $3, $3, 22136
9797 0xcd 0xab 0x7e 0x04 # CHECK: dati $3, $3, 43981
9898 0x64 0x23 0x43 0x7c # CHECK: dalign $4, $2, $3, 5
99 0x34 0x12 0x43 0x74 # CHECK: daui $3, $2, 4660
99 0x34 0x12 0x62 0x74 # CHECK: daui $3, $2, 4660
100100 0x24 0x20 0x02 0x7c # CHECK: dbitswap $4, $2
101101 0x53 0x90 0xc0 0x00 # CHECK: dclo $18, $6
102102 0x52 0x80 0x20 0x03 # CHECK: dclz $16, $25
7676 0x25 0x29 0x00 0x0a # CHECK: addiu $9, $9, 10
7777 0x30 0x42 0x00 0x04 # CHECK: andi $2, $2, 4
7878 0x34 0x42 0x00 0x04 # CHECK: ori $2, $2, 4
79 0x3c 0x43 0xff 0xe9 # CHECK: aui $3, $2, 65513
79 0x3c 0x62 0xff 0xe9 # CHECK: aui $3, $2, 65513
8080 0x40 0x08 0x78 0x01 # CHECK: mfc0 $8, $15, 1
8181 0x40 0x08 0x80 0x03 # CHECK: mfc0 $8, $16, 3
8282 0x40 0x38 0x50 0x00 # CHECK: dmfc0 $24, $10, 0
196196 0x60 0x82 0x00 0x01 # CHECK: bnvc $4, $2, 8
197197 0x60 0xa6 0x00 0x40 # CHECK: bnec $5, $6, 260
198198 0x60 0x43 0xff 0xfa # CHECK: bnec $2, $3, -20
199 0x74 0x43 0x12 0x34 # CHECK: daui $3, $2, 4660
199 0x74 0x62 0x12 0x34 # CHECK: daui $3, $2, 4660
200200 0x7c 0x02 0x20 0x20 # CHECK: bitswap $4, $2
201201 0x7c 0x02 0x20 0x24 # CHECK: dbitswap $4, $2
202202 0x7c 0x43 0x22 0xa0 # CHECK: align $4, $2, $3, 2
1919 addu $9,10 # CHECK: addiu $9, $9, 10 # encoding: [0x25,0x29,0x00,0x0a]
2020 align $4, $2, $3, 2 # CHECK: align $4, $2, $3, 2 # encoding: [0x7c,0x43,0x22,0xa0]
2121 aluipc $3, 56 # CHECK: aluipc $3, 56 # encoding: [0xec,0x7f,0x00,0x38]
22 aui $3, $2, 23 # CHECK: aui $3, $2, 23 # encoding: [0x3c,0x43,0x00,0x17]
22 aui $3, $2, 23 # CHECK: aui $3, $2, 23 # encoding: [0x3c,0x62,0x00,0x17]
2323 auipc $3, -1 # CHECK: auipc $3, -1 # encoding: [0xec,0x7e,0xff,0xff]
2424 bal 21100 # CHECK: bal 21100 # encoding: [0x04,0x11,0x14,0x9b]
2525 balc 14572256 # CHECK: balc 14572256 # encoding: [0xe8,0x37,0x96,0xb8]
1919 align $4, $2, $3, 2 # CHECK: align $4, $2, $3, 2 # encoding: [0x7c,0x43,0x22,0xa0]
2020 aluipc $3, 56 # CHECK: aluipc $3, 56 # encoding: [0xec,0x7f,0x00,0x38]
2121 and $2,4 # CHECK: andi $2, $2, 4 # encoding: [0x30,0x42,0x00,0x04]
22 aui $3, $2, 23 # CHECK: aui $3, $2, 23 # encoding: [0x3c,0x43,0x00,0x17]
22 aui $3, $2, 23 # CHECK: aui $3, $2, 23 # encoding: [0x3c,0x62,0x00,0x17]
2323 auipc $3, -1 # CHECK: auipc $3, -1 # encoding: [0xec,0x7e,0xff,0xff]
2424 bal 21100 # CHECK: bal 21100 # encoding: [0x04,0x11,0x14,0x9b]
2525 balc 14572256 # CHECK: balc 14572256 # encoding: [0xe8,0x37,0x96,0xb8]
105105 dahi $3, $3, 0x5678 # CHECK: dahi $3, $3, 22136 # encoding: [0x04,0x66,0x56,0x78]
106106 dalign $4,$2,$3,5 # CHECK: dalign $4, $2, $3, 5 # encoding: [0x7c,0x43,0x23,0x64]
107107 dati $3, $3, 0xabcd # CHECK: dati $3, $3, 43981 # encoding: [0x04,0x7e,0xab,0xcd]
108 daui $3, $2, 0x1234 # CHECK: daui $3, $2, 4660 # encoding: [0x74,0x43,0x12,0x34]
108 daui $3, $2, 0x1234 # CHECK: daui $3, $2, 4660 # encoding: [0x74,0x62,0x12,0x34]
109109 dbitswap $4, $2 # CHECK: dbitswap $4, $2 # encoding: [0x7c,0x02,0x20,0x24]
110110 dclo $s2,$a2 # CHECK: dclo $18, $6 # encoding: [0x00,0xc0,0x90,0x53]
111111 dclz $s0,$25 # CHECK: dclz $16, $25 # encoding: [0x03,0x20,0x80,0x52]