Zlatko Buljan
48f1f39bfe
Revert r254897 "[mips][microMIPS] Implement LH, LHE, LHU and LHUE instructions"
...
Commited patch was intended to implement LH, LHE, LHU and LHUE instructions.
After commit test-suite failed with error message in the form of:
fatal error: error in backend: Cannot select: t124: i32,ch = load<LD2[%d](tbaa=<0x94acc48>), sext from i16> t0, t2, undef:i32
For that reason I decided to revert commit r254897 and make new patch which besides implementation and standard regression tests will also have dedicated tests (CodeGen) for the above error.
llvm-svn: 255109
2015-12-09 13:07:45 +00:00
Zlatko Buljan
1a01c15027
[mips][microMIPS] Implement LH, LHE, LHU and LHUE instructions
...
Differential Revision: http://reviews.llvm.org/D9824
llvm-svn: 254897
2015-12-07 08:29:31 +00:00
Zlatko Buljan
0f1223053c
[mips][DSP] Add DSPr1 and DSPr2 tests for the standard encodings
...
Differential Revision: http://reviews.llvm.org/D15141
llvm-svn: 254598
2015-12-03 09:56:39 +00:00
Hrvoje Varga
672b0f5582
[mips][microMIPS] Implement PREPEND, RADDU.W.QB, RDDSP, REPL.PH, REPL.QB, REPLV.PH, REPLV.QB and MTHLIP instructions
...
Differential Revision: http://reviews.llvm.org/D14527
llvm-svn: 254496
2015-12-02 09:31:24 +00:00
Hrvoje Varga
e51b0e13f3
[mips][microMIPS] Implement RECIP.fmt, RINT.fmt, ROUND.L.fmt, ROUND.W.fmt, SEL.fmt, SELEQZ.fmt, SELNEQZ.fmt and CLASS.fmt
...
Differential Revision: http://reviews.llvm.org/D13885
llvm-svn: 254405
2015-12-01 11:59:21 +00:00
Hrvoje Varga
c03957f049
[mips][microMIPS] Implement LBUX, LHX, LWX, MAQ_S[A].W.PHL, MAQ_S[A].W.PHR, MFHI, MFLO, MTHI and MTLO instructions
...
Differential Revision: http://reviews.llvm.org/D14436
llvm-svn: 254297
2015-11-30 12:58:39 +00:00
Zoran Jovanovic
a887b36167
[mips][microMIPS] Fix issue with offset operand of BALC and BC instructions
...
Value of offset operand for microMIPS BALC and BC instructions is currently shifted 2 bits, but it should be 1 bit.
Differential Revision: http://reviews.llvm.org/D14770
llvm-svn: 254296
2015-11-30 12:56:18 +00:00
Zlatko Buljan
56f3b0e410
[mips][microMIPS] Implement PRECR.QB.PH, PRECR_SRA[_R].PH.W, PRECRQ.PH.W, PRECRQ.QB.PH, PRECRQU_S.QB.PH and PRECRQ_RS.PH.W instructions
...
Differential Revision: http://reviews.llvm.org/D14605
llvm-svn: 254291
2015-11-30 08:37:38 +00:00
Hrvoje Varga
b65518c15c
[mips][microMIPS] Implement MUL[_S].PH, MULEQ_S.W.PHL, MULEQ_S.W.PHR, MULEU_S.PH.QBL, MULEU_S.PH.QBR, MULQ_RS.PH, MULQ_RS.W, MULQ_S.PH and MULQ_S.W instructions
...
Differential Revision: http://reviews.llvm.org/D14280
llvm-svn: 253651
2015-11-20 07:14:52 +00:00
Hrvoje Varga
78409019d9
[mips][microMIPS] Implement DPS.W.PH, DPSQ_S.W.PH, DPSQ_SA.L.W, DPSQX_S.W.PH, DPSQX_SA.W.PH, DPSU.H.QBL, DPSU.H.QBR and DPSX.W.PH instructions
...
Differential Revision: http://reviews.llvm.org/D14058
llvm-svn: 253443
2015-11-18 07:41:35 +00:00
Zlatko Buljan
72a7f9c1f5
[mips][microMIPS] Implement EXTP, EXTPDP, EXTPDPV, EXTPV, EXTR[_RS].W, EXTR_S.H, EXTRV[_RS].W and EXTRV_S.H instructions
...
Differential Revision: http://reviews.llvm.org/D14174
llvm-svn: 253332
2015-11-17 12:54:15 +00:00
Zlatko Buljan
246b21f66a
[mips][microMIPS] Implement SUBQ[_S].PH, SUBQ_S.W, SUBQH[_R].PH, SUBQH[_R].W, SUBU[_S].PH, SUBU[_S].QB and SUBUH[_R].QB instructions
...
Differential Revision: http://reviews.llvm.org/D14114
llvm-svn: 253329
2015-11-17 10:11:22 +00:00
Zlatko Buljan
3e0588d033
[mips][microMIPS] Implement PRECEQ.W.PHL, PRECEQ.W.PHR, PRECEQU.PH.QBL, PRECEQU.PH.QBLA, PRECEQU.PH.QBR, PRECEQU.PH.QBRA, PRECEU.PH.QBL, PRECEU.PH.QBLA, PRECEU.PH.QBR and PRECEU.PH.QBRA instructions
...
Differential Revision: http://reviews.llvm.org/D14279
llvm-svn: 253326
2015-11-17 09:43:29 +00:00
Zlatko Buljan
d1dea944b1
Added microMIPSDSPr1 assembler and disassembler tests to existing microMIPSDSPr2 test files.
...
llvm-svn: 253320
2015-11-17 07:58:27 +00:00
Zlatko Buljan
32fb5c40d2
[mips][microMIPS] Implement SHRA[_R].PH, SHRAV[_R].PH, SHRAV[_R].QB, SHRAV_R.W, SHRA_R.W, SHRL.PH, SHRL.QB, SHRLV.PH and SHRLV.QB instructions
...
Differential Revision: http://reviews.llvm.org/D14010
llvm-svn: 253041
2015-11-13 13:14:25 +00:00
Zlatko Buljan
797c2aec6b
[mips][microMIPS] Implement LWM16, SB16, SH16, SW16, SWSP and SWM16 instructions
...
Differential Revision: http://reviews.llvm.org/D11406
llvm-svn: 252885
2015-11-12 13:21:33 +00:00
Daniel Sanders
ea4f653d18
[mips][ias] Range check uimm2 operands and fix a bug this revealed.
...
Summary:
The bug was that the MIPS32R6/MIPS64R6/microMIPS32R6 versions of LSA and DLSA
(unlike the MSA version) failed to account for the off-by-one encoding of the
immediate. The range is actually 1..4 rather than 0..3.
Reviewers: vkalintiris
Subscribers: atanasyan, dsanders, llvm-commits
Differential Revision: http://reviews.llvm.org/D14015
llvm-svn: 252295
2015-11-06 12:22:31 +00:00
Hrvoje Varga
18148671ee
[mips][microMIPS] Implement PAUSE, RDHWR, RDPGPR, SDBBP, SSNOP, SYNC, SYNCI and WAIT instructions
...
Differential Revision: http://reviews.llvm.org/D12628
llvm-svn: 251510
2015-10-28 11:04:29 +00:00
Zlatko Buljan
2cf61020b8
[mips][microMIPS] Implement SHLL.PH, SHLL_S.PH, SHLL.QB, SHLLV.PH, SHLLV_S.PH, SHLLV.QB, SHLLV_S.W, SHLL_S.W, SHRA.QB and SHRA_R.QB instructions
...
Differential Revision: http://reviews.llvm.org/D13929
llvm-svn: 251098
2015-10-23 06:39:29 +00:00
Daniel Sanders
0f596814e9
[mips][msa] Remove copy_u.d and move copy_u.w to MSA64.
...
Summary:
The forwards compatibility strategy employed by MIPS is to consider registers
to be infinitely sign-extended. Then on ISA's with a wider register, the result
of existing instructions are sign-extended to register width and zero-extended
counterparts are added. copy_u.w on MSA32 and copy_u.w on MSA64 violate this
strategy and we have therefore corrected the MSA specs to fix this.
We still keep track of sign/zero-extension during legalization but we now
match copy_s.[wd] where required.
No change required to clang since __builtin_msa_copy_u_[wd] will map to
copy_s.[wd] where appropriate for the target.
Reviewers: vkalintiris
Subscribers: llvm-commits
Differential Revision: http://reviews.llvm.org/D13472
llvm-svn: 250887
2015-10-21 09:58:54 +00:00
Zlatko Buljan
5292083584
[mips][microMIPS] Implement ADDQ.PH, ADDQ_S.W, ADDQH.PH, ADDQH.W, ADDSC, ADDU.PH, ADDU_S.QB, ADDWC and ADDUH.QB instructions
...
Differential Revision: http://reviews.llvm.org/D13130
llvm-svn: 250685
2015-10-19 07:16:26 +00:00
Zlatko Buljan
d0a7d6e4ee
[mips][microMIPS] Implement ABSQ.QB, ABSQ_S.PH, ABSQ_S.W, ABSQ_S.QB, INSV, MADD, MADDU, MSUB, MSUBU, MULT and MULTU instructions
...
Differential Revision: http://reviews.llvm.org/D13721
llvm-svn: 250683
2015-10-19 06:34:44 +00:00
Zlatko Buljan
4c4f21b971
Commited two test files which are forgotten during commit of patch for http://reviews.llvm.org/D13376
...
llvm-svn: 250512
2015-10-16 13:03:10 +00:00
Hrvoje Varga
3c88fbd367
[mips][microMIPS] Implement LB, LBE, LBU and LBUE instructions
...
Differential Revision: http://reviews.llvm.org/D11633
llvm-svn: 250511
2015-10-16 12:24:58 +00:00
Zlatko Buljan
54b1eb4c73
[mips][microMIPS] Implement DPA.W.PH, DPAQ_S.W.PH, DPAQ_SA.L.W, DPAQX_S.W.PH, DPAQX_SA.W.PH, DPAU.H.QBL, DPAU.H.QBR and DPAX.W.PH instructions
...
Differential Revision: http://reviews.llvm.org/D13376
llvm-svn: 250382
2015-10-15 08:59:45 +00:00
Hrvoje Varga
3a3c4b8a39
[mips][microMIPS] Implement BREAK16, LI16, MOVE16, SDBBP16, SUBU16 and XOR16 instructions
...
Differential Revision: http://reviews.llvm.org/D11292#inline-103143
llvm-svn: 250381
2015-10-15 08:39:07 +00:00
Hrvoje Varga
3ef4dd7bc8
[mips][microMIPS] Implement LLE and SCE instructions
...
Differential Revision: http://reviews.llvm.org/D11630
llvm-svn: 250379
2015-10-15 08:11:50 +00:00
Hrvoje Varga
a766eff5a0
[mips][microMIPS] Implement LWLE, LWRE, SWLE and SWRE instructions
...
Differential Revision: http://reviews.llvm.org/D11631
llvm-svn: 250377
2015-10-15 07:23:06 +00:00
Zoran Jovanovic
2e386d3d07
[mips][micromips] Initial support for micrmomips DSP instructions and addu.qb implementation
...
Differential Revision: http://reviews.llvm.org/D12798
llvm-svn: 250058
2015-10-12 16:07:25 +00:00
Daniel Sanders
bb65d730bf
[mips][disassembler] Changed CHECK-EB directives to CHECK so div/divu are tested.
...
llvm-svn: 249386
2015-10-06 10:08:14 +00:00
Daniel Sanders
d245267be0
[mips][disassembler] Merged disassembler tests into the corresponding ISA/ASE subdirectories.
...
llvm-svn: 249384
2015-10-06 10:02:35 +00:00
Daniel Sanders
31bfdb5a82
[mips][disassembler] Moved DSP tests into proper place and corrected formatting.
...
llvm-svn: 249383
2015-10-06 09:28:48 +00:00
Zoran Jovanovic
5a8dffc618
[mips][microMIPS] Implement JALRC16, JRCADDIUSP and JRC16 instructions
...
Differential Revision: http://reviews.llvm.org/D11219
llvm-svn: 249317
2015-10-05 14:00:09 +00:00
Zoran Jovanovic
2960f3a346
[mips][microMIPS] Implement CACHEE, WRPGPR and WSBH instructions
...
Differential Revision: http://reviews.llvm.org/D10337
llvm-svn: 249004
2015-10-01 12:49:27 +00:00
Daniel Sanders
df19a5e605
[mips][microMIPS] Fix an invalid read for lwm32 and reserved reglist values.
...
Summary:
Some values of 'reglist' are reserved and cause the disassembler to read past
the end of the Regs array. Treat lwm32's containing reserved values as invalid
instructions.
Reviewers: zoran.jovanovic
Subscribers: llvm-commits
Differential Revision: http://reviews.llvm.org/D12959
llvm-svn: 247990
2015-09-18 14:20:54 +00:00
Zoran Jovanovic
7ba636cb4c
[mips][microMIPS] Implement TEQ, TGE, TGEU, TLT, TLTU and TNE instructions
...
Differential Revision: http://reviews.llvm.org/D9658
llvm-svn: 247880
2015-09-17 10:14:09 +00:00
Zoran Jovanovic
6e6a2c9cd7
[mips][microMIPS] Implement PREFX, LHUE, LBE, LBUE, LHE, LWE, SBE, SHE and SWE instructions
...
Differential Revision: http://reviews.llvm.org/D9189
llvm-svn: 247780
2015-09-16 09:14:35 +00:00
Zoran Jovanovic
dc4b8c2761
[mips][microMIPS] Fix an issue with disassembling lwm32 instruction
...
Fixed microMIPS disassembler crash on test case generated by llvm-mc-fuzzer.
Differential Revision: http://reviews.llvm.org/D12881
llvm-svn: 247698
2015-09-15 15:21:27 +00:00
Zoran Jovanovic
7beb737b46
[mips][microMIPS] Implement CACHEE and PREFE instructions for microMIPS32r6
...
Differential Revision: http://reviews.llvm.org/D11632
llvm-svn: 247670
2015-09-15 10:05:10 +00:00
Daniel Sanders
e4e83a7bc1
[mips] Added support for various EVA ASE instructions.
...
Summary:
Added support for the following instructions:
CACHEE, LBE, LBUE, LHE, LHUE, LWE, LLE, LWLE, LWRE, PREFE,
SBE, SHE, SWE, SCE, SWLE, SWRE, TLBINV, TLBINVF
This required adding some infrastructure for the EVA ASE.
Patch by Scott Egerton.
Reviewers: vkalintiris, dsanders
Subscribers: llvm-commits
Differential Revision: http://reviews.llvm.org/D11139
llvm-svn: 247669
2015-09-15 10:02:16 +00:00
Daniel Sanders
715f8f1332
[mips] Add missing disassembler tests for MIPS64-MIPS64R5.
...
llvm-svn: 247422
2015-09-11 16:24:11 +00:00
Daniel Sanders
9676db005e
[mips] Add missing MIPS32 - MIPS32R5 disassembler tests.
...
llvm-svn: 247420
2015-09-11 15:28:19 +00:00
Daniel Sanders
aba4daab10
[mips] Attempt to fix llvm-s390x-linux1
...
It doesn't seem to like the '|&' in the test command.
llvm-svn: 247418
2015-09-11 14:57:54 +00:00
Daniel Sanders
9bbda77006
[mips] Add missing MIPS-IV disassembler tests.
...
llvm-svn: 247417
2015-09-11 14:54:58 +00:00
Daniel Sanders
ff338fa355
[mips] Add missing MIPS-III disassembler tests.
...
llvm-svn: 247416
2015-09-11 14:48:46 +00:00
Daniel Sanders
3b571d05f8
[mips] Add missing MIPS-II disassembler tests.
...
These tests were found by llvm-mc-fuzzer (see http://reviews.llvm.org/D12723 )
and were verified by checking the disassembler output is accepted by GAS.
llvm-svn: 247414
2015-09-11 14:34:41 +00:00
Daniel Sanders
44c1d0c4f1
Re-commit r247405: [mips] Add missing MIPS-I disassembler tests.
...
These tests were found by llvm-mc-fuzzer (see http://reviews.llvm.org/D12723 )
and verified by checking the disassembler output is accepted by GAS.
The problematic tests from the previous commit have been moved to
valid-xfail.txt for now.
Also, give invalid instructions some coverage. invalid-xfail.txt contains
instructions that should be invalid but successfully disassemble.
llvm-svn: 247407
2015-09-11 12:59:03 +00:00
Daniel Sanders
c6a2034d0f
Revert r247405: [mips] Add missing MIPS-I disassembler tests.
...
A small number of the added tests have operands that change on each round trip.
llvm-svn: 247406
2015-09-11 12:42:38 +00:00
Daniel Sanders
f05bf32b38
[mips] Add missing MIPS-I disassembler tests.
...
These tests were found by llvm-mc-fuzzer (see http://reviews.llvm.org/D12723 )
and verified by checking the disassembler output is accepted by GAS.
llvm-svn: 247405
2015-09-11 12:24:06 +00:00
Zoran Jovanovic
6b28f09d67
[mips][microMIPS] Implement ADDU16, AND16, ANDI16, NOT16, OR16, SLL16 and SRL16 instructions
...
Differential Revision: http://reviews.llvm.org/D11178
llvm-svn: 247146
2015-09-09 13:55:45 +00:00