llvm-project/llvm/lib/Target/Mips
Daniel Sanders 3519dce968 [mips][msa] Fix invalid generated code when lowering FrameIndex involving unaligned offsets.
Summary:
The MSA ld.[bhwd] and st.[bhwd] instructions scale the immediate by the
element size before use as an offset. The offset must therefore be a
multiple of the element size to be valid in these instructions. However,
an unaligned base address is valid in MSA.

This commit causes the compiler to emit valid code when the calculated
offset is not a multiple of the element size by accounting for the offset
using addiu and using a zero offset in the load/store.

Depends on D2338

Reviewers: matheusalmeida

Reviewed By: matheusalmeida

Differential Revision: http://llvm-reviews.chandlerc.com/D2339

llvm-svn: 196777
2013-12-09 12:47:12 +00:00
..
AsmParser Method parseSetAssignment treats every operand with '$' sign as register and the parsing is directed to set alias for register. This will result in errors reported when expressions containing label references are parsed(for example long jumps) 2013-12-09 11:03:25 +00:00
Disassembler [mips][msa] Fix issue with immediate fields of LD/ST instructions 2013-12-05 11:06:22 +00:00
InstPrinter Cleaning up of prologue/epilogue code for Mips16. First step 2013-12-08 16:51:52 +00:00
MCTargetDesc [mips][msa] Fix issue with immediate fields of LD/ST instructions 2013-12-05 11:06:22 +00:00
TargetInfo [CMake] Let add_public_tablegen_target responsible to provide dependency to CommonTableGen. 2013-11-28 17:04:04 +00:00
CMakeLists.txt [CMake] Let add_public_tablegen_target() provide intrinsics_gen, too. 2013-11-28 17:04:31 +00:00
LLVMBuild.txt
MSA.txt [mips][msa] Added support for matching bclr, and bclri from normal IR (i.e. not intrinsics) 2013-11-12 10:45:18 +00:00
Makefile Remove edis - the enhanced disassembler. Fixes PR14654. 2012-12-19 19:55:47 +00:00
MicroMipsInstrFormats.td Use instr mapping for microMIPS in llvm-mc. 2013-11-15 08:07:34 +00:00
MicroMipsInstrInfo.td [mips] Redefine TAILCALL as a pseudo instruction. 2013-11-27 23:58:32 +00:00
Mips.h [mips] Revert test commit r195922. 2013-11-28 15:26:33 +00:00
Mips.td Change the default of AsmWriterClassName and isMCAsmWriter. 2013-12-02 04:55:42 +00:00
Mips16FrameLowering.cpp Add the saving of S2. This is needed for some of the floating point 2013-08-04 23:56:53 +00:00
Mips16FrameLowering.h [mips] Align the stack to 16-bytes for mfp64. 2013-10-29 19:29:03 +00:00
Mips16HardFloat.cpp Add fabsf to the list of inlined functions; otherwise 2013-10-08 19:55:01 +00:00
Mips16HardFloat.h Checkin in of first of several patches to finish implementation of 2013-05-10 22:25:39 +00:00
Mips16ISelDAGToDAG.cpp Fix two issues regarding Got pointer (GP) setup. 2013-09-18 22:46:09 +00:00
Mips16ISelDAGToDAG.h Track IR ordering of SelectionDAG nodes 2/4. 2013-05-25 02:42:55 +00:00
Mips16ISelLowering.cpp Make all the conditional Mips 16 branches get initially set for the 2013-11-15 02:21:52 +00:00
Mips16ISelLowering.h Mips: Remove global set. 2013-06-13 19:06:52 +00:00
Mips16InstrFormats.td Create a pattern for the "trap" instruction. 2013-08-07 04:00:26 +00:00
Mips16InstrInfo.cpp Make sure we mark these registers as defined. Previously was done 2013-12-08 19:21:47 +00:00
Mips16InstrInfo.h Delete dead code. 2013-12-06 00:13:50 +00:00
Mips16InstrInfo.td Cleaning up of prologue/epilogue code for Mips16. First step 2013-12-08 16:51:52 +00:00
Mips16RegisterInfo.cpp Clean up code for Mips16 large frame handling. 2013-08-04 01:13:25 +00:00
Mips16RegisterInfo.h Don't cache the instruction and register info from the TargetMachine, because 2013-06-07 07:04:14 +00:00
Mips64InstrInfo.td [mips] Redefine TAILCALL as a pseudo instruction. 2013-11-27 23:58:32 +00:00
MipsAnalyzeImmediate.cpp Replace Count{Leading,Trailing}Zeros_{32,64} with count{Leading,Trailing}Zeros. 2013-05-24 22:23:49 +00:00
MipsAnalyzeImmediate.h Even more spelling fixes for "instruction". 2013-09-28 13:42:22 +00:00
MipsAsmPrinter.cpp Remove dead code. 2013-12-02 15:36:37 +00:00
MipsAsmPrinter.h Fix a bug related to constant islands for Mips16 and mips16/32 dual mode. 2013-11-26 20:38:40 +00:00
MipsCallingConv.td [mips] Add support for calling convention CC_MipsO32_FP64, which is used when the 2013-08-20 23:38:40 +00:00
MipsCodeEmitter.cpp [mips][msa] Fix issue with immediate fields of LD/ST instructions 2013-12-05 11:06:22 +00:00
MipsCondMov.td [mips] Set instruction itineraries of loads, stores and conditional moves. 2013-09-06 23:28:24 +00:00
MipsConstantIslandPass.cpp Correct word hyphenations 2013-12-05 05:44:44 +00:00
MipsDSPInstrFormats.td [mips] DSP-ASE move from HI/LO register instructions. 2013-04-18 00:52:44 +00:00
MipsDSPInstrInfo.td [mips] Define a pseudo instruction which writes to both the lower and higher 2013-10-15 01:48:30 +00:00
MipsDelaySlotFiller.cpp [mips] Coding style clean up. 2013-10-07 19:33:02 +00:00
MipsFrameLowering.cpp Move all of the header files which are involved in modelling the LLVM IR 2013-01-02 11:36:10 +00:00
MipsFrameLowering.h [mips] Add parameter Alignment to MipsFrameLowering's constructor. 2013-03-29 01:51:04 +00:00
MipsISelDAGToDAG.cpp [mips][msa] Added support for matching bclr, and bclri from normal IR (i.e. not intrinsics) 2013-11-12 10:45:18 +00:00
MipsISelDAGToDAG.h [mips][msa] Added support for matching bclr, and bclri from normal IR (i.e. not intrinsics) 2013-11-12 10:45:18 +00:00
MipsISelLowering.cpp [mips] Small code generation improvement for conditional operator (select) 2013-12-05 12:07:05 +00:00
MipsISelLowering.h [mips] Rename isel nodes. 2013-10-15 01:12:50 +00:00
MipsInstrFPU.td This patch implements Mips load/store instructions from/to coprocessor 2. Test cases are added. 2013-09-16 10:29:42 +00:00
MipsInstrFormats.td Support for microMIPS trap instruction with immediate operands. 2013-11-13 13:15:03 +00:00
MipsInstrInfo.cpp [weak vtables] Remove a bunch of weak vtables 2013-11-19 00:57:56 +00:00
MipsInstrInfo.h [weak vtables] Remove a bunch of weak vtables 2013-11-19 00:57:56 +00:00
MipsInstrInfo.td [mips][msa] Fix issue with immediate fields of LD/ST instructions 2013-12-05 11:06:22 +00:00
MipsJITInfo.cpp [test commit] Minor comment change. 2013-07-24 13:02:35 +00:00
MipsJITInfo.h
MipsLongBranch.cpp Fixed issue with microMIPS long branch. 2013-11-30 19:12:28 +00:00
MipsMCInstLower.cpp Add a helper getSymbol to AsmPrinter. 2013-10-29 17:07:16 +00:00
MipsMCInstLower.h The asm printer has a mangler. Use it. 2013-10-29 16:24:21 +00:00
MipsMSAInstrFormats.td [mips][msa] Pseudo instructions require HasMSA too. Inherit from MSAPseudo instead of MipsPseudo 2013-11-20 14:32:28 +00:00
MipsMSAInstrInfo.td [mips][msa] Fix issue with immediate fields of LD/ST instructions 2013-12-05 11:06:22 +00:00
MipsMachineFunction.cpp [mips] Simplify and optimize code. 2013-10-08 18:13:24 +00:00
MipsMachineFunction.h [mips] Define a derived class of PseudoSourceValue that represents a GOT entry 2013-09-27 22:30:36 +00:00
MipsModuleISelDAGToDAG.cpp This patch enables llvm to switch between compiling for mips32/mips64 2013-04-09 19:46:01 +00:00
MipsModuleISelDAGToDAG.h This patch enables llvm to switch between compiling for mips32/mips64 2013-04-09 19:46:01 +00:00
MipsOptimizePICCall.cpp [mips] Implement the following optimizations using dominance information to 2013-11-27 23:38:42 +00:00
MipsOs16.cpp Make nomips16 mask not repeat if it ends with a '.'. 2013-09-23 22:36:11 +00:00
MipsOs16.h This is for an experimental option -mips-os16. The idea is to compile all 2013-04-10 16:58:04 +00:00
MipsRegisterInfo.cpp Remove getEHExceptionRegister and getEHHandlerRegister. 2013-10-07 13:39:22 +00:00
MipsRegisterInfo.h Remove getEHExceptionRegister and getEHHandlerRegister. 2013-10-07 13:39:22 +00:00
MipsRegisterInfo.td [mips][msa] Direct Object Emission support for CTCMSA and CFCMSA. 2013-10-21 12:26:50 +00:00
MipsRelocations.h
MipsSEFrameLowering.cpp [mips] Fix definition of mfhi and mflo instructions to read from the whole 2013-10-07 18:49:46 +00:00
MipsSEFrameLowering.h [mips] Align the stack to 16-bytes for mfp64. 2013-10-29 19:29:03 +00:00
MipsSEISelDAGToDAG.cpp [mips] Fix 'ran out of registers' in MIPS32 with FP64 when generating code for (ConstantFP 0.0) 2013-11-18 13:12:43 +00:00
MipsSEISelDAGToDAG.h [mips][msa] Added support for matching bclr, and bclri from normal IR (i.e. not intrinsics) 2013-11-12 10:45:18 +00:00
MipsSEISelLowering.cpp [mips] Implement the following optimizations using dominance information to 2013-11-27 23:38:42 +00:00
MipsSEISelLowering.h [mips][msa] Added support for matching fexp2 from normal IR (i.e. not intrinsics) 2013-10-23 10:36:52 +00:00
MipsSEInstrInfo.cpp [mips] Fix 'ran out of registers' in MIPS32 with FP64 when generating code for (ConstantFP 0.0) 2013-11-18 13:12:43 +00:00
MipsSEInstrInfo.h [mips] Define a pseudo instruction which writes to both the lower and higher 2013-10-15 01:48:30 +00:00
MipsSERegisterInfo.cpp [mips][msa] Fix invalid generated code when lowering FrameIndex involving unaligned offsets. 2013-12-09 12:47:12 +00:00
MipsSERegisterInfo.h Don't cache the instruction and register info from the TargetMachine, because 2013-06-07 07:04:14 +00:00
MipsSchedule.td [mips] Define instruction itineraries IIArith and IILogic. 2013-07-31 00:55:34 +00:00
MipsSelectionDAGInfo.cpp
MipsSelectionDAGInfo.h
MipsSubtarget.cpp Check in conditional branches for constant islands. Still need to finish 2013-11-28 00:56:37 +00:00
MipsSubtarget.h [mips] Partially revert r193641. Stack alignment should not be determined by 2013-11-11 21:49:03 +00:00
MipsTargetMachine.cpp [mips] Implement the following optimizations using dominance information to 2013-11-27 23:38:42 +00:00
MipsTargetMachine.h [mips] Implement MipsTargetMachine::getInstrItineraryData(). 2013-07-12 23:33:22 +00:00
MipsTargetObjectFile.cpp This is a resubmittal. For some reason it broke the bots yesterday 2013-01-18 21:20:38 +00:00
MipsTargetObjectFile.h This is a resubmittal. For some reason it broke the bots yesterday 2013-01-18 21:20:38 +00:00
MipsTargetStreamer.h reverts 195057 per request 2013-11-19 20:53:28 +00:00