llvm-6502/lib/Target/Mips
Daniel Sanders c96096cc0f [mips][mips64r6] Add b[on]vc
Summary:
This required me to implement the disassembler for MIPS64r6 since the encodings
are ambiguous with other instructions. This in turn revealed a few
assembly/disassembly bugs which I have fixed.

* da[ht]i only take two operands according to the spec, not three.
* DecodeBranchTarget2[16] correctly handles wider immediates than simm16
  * Also made non-functional change to DecodeBranchTarget and
    DecodeBranchTargetMM to keep implementation style consistent between
    them.
* Difficult encodings are handled by a custom decode method on the most
  general encoding in the group. This method will convert the MCInst to a
  different opcode if necessary.

DecodeBranchTarget is not currently the inverse of getBranchTargetOpValue
so disassembling some branch instructions emit incorrect output. This seems
to affect branches with delay slots on all MIPS ISA's. I've left this bug
for now and temporarily removed the check for the immediate on
bc[12]eqz/bc[12]nez in the MIPS32r6/MIPS64r6 tests.

jialc and jic crash the disassembler for some reason. I've left these
instructions commented out for the moment.

Depends on D3760

Reviewers: jkolek, zoran.jovanovic, vmedic

Reviewed By: vmedic

Differential Revision: http://reviews.llvm.org/D3761

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@209415 91177308-0d34-0410-b5e6-96231b3b80d8
2014-05-22 11:23:21 +00:00
..
AsmParser [mips] Implement l[wd]c3, and s[wd]c3. 2014-05-08 13:02:11 +00:00
Disassembler [mips][mips64r6] Add b[on]vc 2014-05-22 11:23:21 +00:00
InstPrinter TableGen: use PrintMethods to print more aliases 2014-05-12 18:04:06 +00:00
MCTargetDesc [mips][mips64r6] Add Compact indexed jumps. 2014-05-16 13:19:46 +00:00
TargetInfo
CMakeLists.txt enable fast isel tablegen files for Mips 2014-04-25 18:36:38 +00:00
LLVMBuild.txt
Makefile enable fast isel tablegen files for Mips 2014-04-25 18:36:38 +00:00
MicroMipsInstrFormats.td
MicroMipsInstrFPU.td [mips] Marked up instructions added in MIPS32r2 and tested that IAS for -mcpu=mips(2|32) does not accept them 2014-05-13 11:45:36 +00:00
MicroMipsInstrInfo.td [mips] Marked up instructions added in MIPS32r2 and tested that IAS for -mcpu=mips(2|32) does not accept them 2014-05-13 11:45:36 +00:00
Mips16FrameLowering.cpp Use FrameSetup on frame instructions for the Mips port. 2014-04-14 22:21:22 +00:00
Mips16FrameLowering.h [C++11] Add 'override' keywords and remove 'virtual'. Additionally add 'final' and leave 'virtual' on some methods that are marked virtual without overriding anything and have no obvious overrides themselves. Mips edition 2014-04-29 07:58:02 +00:00
Mips16HardFloat.cpp [C++] Use 'nullptr'. Target edition. 2014-04-25 05:30:21 +00:00
Mips16HardFloat.h [C++11] Add 'override' keywords and remove 'virtual'. Additionally add 'final' and leave 'virtual' on some methods that are marked virtual without overriding anything and have no obvious overrides themselves. Mips edition 2014-04-29 07:58:02 +00:00
Mips16HardFloatInfo.cpp [C++] Use 'nullptr'. Target edition. 2014-04-25 05:30:21 +00:00
Mips16HardFloatInfo.h
Mips16InstrFormats.td
Mips16InstrInfo.cpp [Modules] Make Support/Debug.h modular. This requires it to not change 2014-04-21 22:55:11 +00:00
Mips16InstrInfo.h [C++11] Add 'override' keywords and remove 'virtual'. Additionally add 'final' and leave 'virtual' on some methods that are marked virtual without overriding anything and have no obvious overrides themselves. Mips edition 2014-04-29 07:58:02 +00:00
Mips16InstrInfo.td
Mips16ISelDAGToDAG.cpp [mips] Replace FeatureFPIdx with FeatureMips4_32r2 2014-05-12 11:56:16 +00:00
Mips16ISelDAGToDAG.h [C++11] Add 'override' keywords and remove 'virtual'. Additionally add 'final' and leave 'virtual' on some methods that are marked virtual without overriding anything and have no obvious overrides themselves. Mips edition 2014-04-29 07:58:02 +00:00
Mips16ISelLowering.cpp Target: change member from reference to pointer 2014-05-17 21:50:01 +00:00
Mips16ISelLowering.h [C++11] Add 'override' keywords and remove 'virtual'. Additionally add 'final' and leave 'virtual' on some methods that are marked virtual without overriding anything and have no obvious overrides themselves. Mips edition 2014-04-29 07:58:02 +00:00
Mips16RegisterInfo.cpp [Modules] Make Support/Debug.h modular. This requires it to not change 2014-04-21 22:55:11 +00:00
Mips16RegisterInfo.h [C++11] Add 'override' keywords and remove 'virtual'. Additionally add 'final' and leave 'virtual' on some methods that are marked virtual without overriding anything and have no obvious overrides themselves. Mips edition 2014-04-29 07:58:02 +00:00
Mips32r6InstrFormats.td [mips][mips64r6] Add b[on]vc 2014-05-22 11:23:21 +00:00
Mips32r6InstrInfo.td [mips][mips64r6] Add b[on]vc 2014-05-22 11:23:21 +00:00
Mips64InstrInfo.td [mips] Free up two values in SubtargetFeatureFlag by folding the redundant IsGP32/IsGP64 into IsGP32bit/IsGP64bit 2014-05-13 11:17:46 +00:00
Mips64r6InstrInfo.td [mips][mips64r6] Add b[on]vc 2014-05-22 11:23:21 +00:00
Mips.h
Mips.td [mips] Marked up instructions added in MIPS32r2 and tested that IAS for -mcpu=mips(2|32) does not accept them 2014-05-13 11:45:36 +00:00
MipsAnalyzeImmediate.cpp
MipsAnalyzeImmediate.h
MipsAsmPrinter.cpp [mips] Fix MipsLongBranch pass to work when the offset from the branch to the 2014-04-30 15:06:25 +00:00
MipsAsmPrinter.h [mips] Fix MipsLongBranch pass to work when the offset from the branch to the 2014-04-30 15:06:25 +00:00
MipsCallingConv.td [mips] Correct callee saved list for the N32 ABI and enable test 2014-04-16 10:23:37 +00:00
MipsCodeEmitter.cpp [mips][mips64r6] Add Compact indexed jumps. 2014-05-16 13:19:46 +00:00
MipsCondMov.td [mips] Marked up instructions added in MIPS-IV and tested that IAS for -mcpu=mips[123] does not accept them 2014-05-09 14:06:17 +00:00
MipsConstantIslandPass.cpp [C++11] Add 'override' keywords and remove 'virtual'. Additionally add 'final' and leave 'virtual' on some methods that are marked virtual without overriding anything and have no obvious overrides themselves. Mips edition 2014-04-29 07:58:02 +00:00
MipsDelaySlotFiller.cpp [C++11] Add 'override' keywords and remove 'virtual'. Additionally add 'final' and leave 'virtual' on some methods that are marked virtual without overriding anything and have no obvious overrides themselves. Mips edition 2014-04-29 07:58:02 +00:00
MipsDSPInstrFormats.td
MipsDSPInstrInfo.td
MipsFastISel.cpp Finish materialize for ints 2014-05-15 21:54:15 +00:00
MipsFrameLowering.cpp Make consistent use of MCPhysReg instead of uint16_t throughout the tree. 2014-04-04 05:16:06 +00:00
MipsFrameLowering.h [C++11] Add 'override' keywords and remove 'virtual'. Additionally add 'final' and leave 'virtual' on some methods that are marked virtual without overriding anything and have no obvious overrides themselves. Mips edition 2014-04-29 07:58:02 +00:00
MipsInstrFormats.td [mips] Implement tlbp, tlbr, tlbwi, and tlbwr 2014-05-08 11:51:18 +00:00
MipsInstrFPU.td [mips] Marked up instructions added in MIPS32r2 and tested that IAS for -mcpu=mips(2|32) does not accept them 2014-05-13 11:45:36 +00:00
MipsInstrInfo.cpp [C++] Use 'nullptr'. Target edition. 2014-04-25 05:30:21 +00:00
MipsInstrInfo.h [mips] Fix MipsLongBranch pass to work when the offset from the branch to the 2014-04-30 15:06:25 +00:00
MipsInstrInfo.td Mips: don't print subu alias for addiu 2014-05-16 09:41:30 +00:00
MipsISelDAGToDAG.cpp [C++] Use 'nullptr'. Target edition. 2014-04-25 05:30:21 +00:00
MipsISelDAGToDAG.h [C++11] Add 'override' keywords and remove 'virtual'. Additionally add 'final' and leave 'virtual' on some methods that are marked virtual without overriding anything and have no obvious overrides themselves. Mips edition 2014-04-29 07:58:02 +00:00
MipsISelLowering.cpp Target: remove old constructors for CallLoweringInfo 2014-05-17 21:50:17 +00:00
MipsISelLowering.h [C++11] Add 'override' keywords and remove 'virtual'. Additionally add 'final' and leave 'virtual' on some methods that are marked virtual without overriding anything and have no obvious overrides themselves. Mips edition 2014-04-29 07:58:02 +00:00
MipsJITInfo.cpp [Modules] Fix potential ODR violations by sinking the DEBUG_TYPE 2014-04-22 02:41:26 +00:00
MipsJITInfo.h [C++11] Add 'override' keywords and remove 'virtual'. Additionally add 'final' and leave 'virtual' on some methods that are marked virtual without overriding anything and have no obvious overrides themselves. Mips edition 2014-04-29 07:58:02 +00:00
MipsLongBranch.cpp [mips] Fix MipsLongBranch pass to work when the offset from the branch to the 2014-04-30 15:06:25 +00:00
MipsMachineFunction.cpp Use range loop. 2014-05-07 14:53:32 +00:00
MipsMachineFunction.h [C++11] Add 'override' keywords and remove 'virtual'. Additionally add 'final' and leave 'virtual' on some methods that are marked virtual without overriding anything and have no obvious overrides themselves. Mips edition 2014-04-29 07:58:02 +00:00
MipsMCInstLower.cpp [mips] Fix MipsLongBranch pass to work when the offset from the branch to the 2014-04-30 15:06:25 +00:00
MipsMCInstLower.h [mips] Fix MipsLongBranch pass to work when the offset from the branch to the 2014-04-30 15:06:25 +00:00
MipsModuleISelDAGToDAG.cpp [Modules] Make Support/Debug.h modular. This requires it to not change 2014-04-21 22:55:11 +00:00
MipsModuleISelDAGToDAG.h [C++11] Add 'override' keywords and remove 'virtual'. Additionally add 'final' and leave 'virtual' on some methods that are marked virtual without overriding anything and have no obvious overrides themselves. Mips edition 2014-04-29 07:58:02 +00:00
MipsMSAInstrFormats.td
MipsMSAInstrInfo.td [mips][mips64r6] Add align and dalign 2014-05-15 12:06:36 +00:00
MipsOptimizePICCall.cpp [C++11] Add 'override' keywords and remove 'virtual'. Additionally add 'final' and leave 'virtual' on some methods that are marked virtual without overriding anything and have no obvious overrides themselves. Mips edition 2014-04-29 07:58:02 +00:00
MipsOs16.cpp [Modules] Fix potential ODR violations by sinking the DEBUG_TYPE 2014-04-22 02:41:26 +00:00
MipsOs16.h [C++11] Add 'override' keywords and remove 'virtual'. Additionally add 'final' and leave 'virtual' on some methods that are marked virtual without overriding anything and have no obvious overrides themselves. Mips edition 2014-04-29 07:58:02 +00:00
MipsRegisterInfo.cpp [Modules] Fix potential ODR violations by sinking the DEBUG_TYPE 2014-04-22 02:41:26 +00:00
MipsRegisterInfo.h [C++11] Add 'override' keywords and remove 'virtual'. Additionally add 'final' and leave 'virtual' on some methods that are marked virtual without overriding anything and have no obvious overrides themselves. Mips edition 2014-04-29 07:58:02 +00:00
MipsRegisterInfo.td [mips] Implement l[wd]c3, and s[wd]c3. 2014-05-08 13:02:11 +00:00
MipsRelocations.h
MipsSchedule.td
MipsSEFrameLowering.cpp Use FrameSetup on frame instructions for the Mips port. 2014-04-14 22:21:22 +00:00
MipsSEFrameLowering.h [C++11] Add 'override' keywords and remove 'virtual'. Additionally add 'final' and leave 'virtual' on some methods that are marked virtual without overriding anything and have no obvious overrides themselves. Mips edition 2014-04-29 07:58:02 +00:00
MipsSEInstrInfo.cpp [C++] Use 'nullptr'. Target edition. 2014-04-25 05:30:21 +00:00
MipsSEInstrInfo.h [C++11] Add 'override' keywords and remove 'virtual'. Additionally add 'final' and leave 'virtual' on some methods that are marked virtual without overriding anything and have no obvious overrides themselves. Mips edition 2014-04-29 07:58:02 +00:00
MipsSEISelDAGToDAG.cpp [C++] Use 'nullptr'. Target edition. 2014-04-25 05:30:21 +00:00
MipsSEISelDAGToDAG.h [C++11] Add 'override' keywords and remove 'virtual'. Additionally add 'final' and leave 'virtual' on some methods that are marked virtual without overriding anything and have no obvious overrides themselves. Mips edition 2014-04-29 07:58:02 +00:00
MipsSEISelLowering.cpp [mips][msa] Fix vector insertions where the index is variable 2014-04-30 12:09:32 +00:00
MipsSEISelLowering.h [mips][msa] Fix vector insertions where the index is variable 2014-04-30 12:09:32 +00:00
MipsSelectionDAGInfo.cpp [Modules] Fix potential ODR violations by sinking the DEBUG_TYPE 2014-04-22 02:41:26 +00:00
MipsSelectionDAGInfo.h
MipsSERegisterInfo.cpp [C++] Use 'nullptr'. Target edition. 2014-04-25 05:30:21 +00:00
MipsSERegisterInfo.h [C++11] Add 'override' keywords and remove 'virtual'. Additionally add 'final' and leave 'virtual' on some methods that are marked virtual without overriding anything and have no obvious overrides themselves. Mips edition 2014-04-29 07:58:02 +00:00
MipsSubtarget.cpp [mips] Marked up instructions added in MIPS32r2 and tested that IAS for -mcpu=mips(2|32) does not accept them 2014-05-13 11:45:36 +00:00
MipsSubtarget.h [mips] Marked up instructions added in MIPS32r2 and tested that IAS for -mcpu=mips(2|32) does not accept them 2014-05-13 11:45:36 +00:00
MipsTargetMachine.cpp [C++11] Add 'override' keywords and remove 'virtual'. Additionally add 'final' and leave 'virtual' on some methods that are marked virtual without overriding anything and have no obvious overrides themselves. Mips edition 2014-04-29 07:58:02 +00:00
MipsTargetMachine.h [C++11] Add 'override' keywords and remove 'virtual'. Additionally add 'final' and leave 'virtual' on some methods that are marked virtual without overriding anything and have no obvious overrides themselves. Mips edition 2014-04-29 07:58:02 +00:00
MipsTargetObjectFile.cpp
MipsTargetObjectFile.h
MipsTargetStreamer.h [mips] Move expansion of .cpsetup to target streamer. 2014-05-01 10:24:46 +00:00
MSA.txt