llvm-6502/utils/TableGen
Jim Grosbach 6ccfc507dc Many Thumb2 instructions can reference the full ARM register set (i.e.,
have 4 bits per register in the operand encoding), but have undefined
behavior when the operand value is 13 or 15 (SP and PC, respectively).
The trivial coalescer in linear scan sometimes will merge a copy from
SP into a subsequent instruction which uses the copy, and if that
instruction cannot legally reference SP, we get bad code such as:
  mls r0,r9,r0,sp
instead of:
  mov r2, sp
  mls r0, r9, r0, r2

This patch adds a new register class for use by Thumb2 that excludes
the problematic registers (SP and PC) and is used instead of GPR
for those operands which cannot legally reference PC or SP. The
trivial coalescer explicitly requires that the register class
of the destination for the COPY instruction contain the source
register for the COPY to be considered for coalescing. This prevents
errant instructions like that above.

PR7499




git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@109842 91177308-0d34-0410-b5e6-96231b3b80d8
2010-07-30 02:41:01 +00:00
..
ARMDecoderEmitter.cpp Changes to ARM tail calls, mostly cosmetic. 2010-07-08 01:18:23 +00:00
ARMDecoderEmitter.h Convert some tab stops into spaces. 2010-07-12 08:16:59 +00:00
AsmMatcherEmitter.cpp TblGen/AsmMatcher: Add support for honoring instruction Requires<[]> attributes as part of the matcher. 2010-07-19 05:44:09 +00:00
AsmMatcherEmitter.h Stub out assembly matcher (.s -> MCInst) tblgen backend. 2009-07-11 19:39:44 +00:00
AsmWriterEmitter.cpp Update comment. 2010-07-16 23:10:00 +00:00
AsmWriterEmitter.h enhance llvm-mc -show-inst to print the enum of an instruction, like so: 2010-02-11 22:57:32 +00:00
AsmWriterInst.cpp change a ton of code to not implicitly use the "O" raw_ostream 2010-04-04 04:47:45 +00:00
AsmWriterInst.h Changed AsmWriterOperand to also include the index of the 2010-02-10 02:27:43 +00:00
CallingConvEmitter.cpp Add contexts to some of the MVT APIs. No functionality change yet, just the infrastructure work needed to get the contexts to where they need to be first. 2009-08-12 00:36:31 +00:00
CallingConvEmitter.h Replace std::iostreams with raw_ostream in TableGen. 2009-07-03 00:10:29 +00:00
ClangASTNodesEmitter.cpp Allow for creation of clang DeclNodes tables. 2010-05-30 07:21:42 +00:00
ClangASTNodesEmitter.h Fix comment 2010-06-01 23:29:39 +00:00
ClangAttrEmitter.cpp Remove unused variables. 2010-06-25 09:35:33 +00:00
ClangAttrEmitter.h Add preliminary clang attribute generation support. 2010-06-16 23:45:50 +00:00
ClangDiagnosticsEmitter.cpp diaggroup categories should take precedence over diag-specific groups. 2010-05-24 21:55:47 +00:00
ClangDiagnosticsEmitter.h Replace std::iostreams with raw_ostream in TableGen. 2009-07-03 00:10:29 +00:00
CMakeLists.txt Don't link against libm and libpthread which don't exist in BeOS/Haiku. Also, 2010-06-23 06:48:34 +00:00
CodeEmitterGen.cpp Clean up TargetOpcodes.h a bit, and limit the number of places where the full 2010-07-02 21:44:22 +00:00
CodeEmitterGen.h Revert 90628, which was incorrect. 2009-12-15 20:21:44 +00:00
CodeGenDAGPatterns.cpp Add the SubRegIndex TableGen class. 2010-05-24 14:48:12 +00:00
CodeGenDAGPatterns.h stop computing InstImpInputs, it is dead 2010-04-20 06:30:25 +00:00
CodeGenInstruction.cpp Remove isTwoAddress from llvm. 2010-06-21 20:35:09 +00:00
CodeGenInstruction.h hoist some funky logic into CodeGenInstruction 2010-03-27 20:09:24 +00:00
CodeGenIntrinsics.h Split EVT into MVT and EVT, the former representing _just_ a primitive type, while 2009-08-11 20:47:22 +00:00
CodeGenRegisters.h Replace the tablegen RegisterClass field SubRegClassList with an alist-like data 2010-05-24 21:46:58 +00:00
CodeGenTarget.cpp Rename DBG_LABEL PROLOG_LABEL, because it's only used during prolog emission and 2010-07-16 22:20:36 +00:00
CodeGenTarget.h Ignore NumberHack and give each SubRegIndex instance a unique enum value instead. 2010-05-25 17:21:04 +00:00
DAGISelEmitter.cpp Switch pattern sorting predicate from stable sort -> sort, it 2010-03-29 02:02:45 +00:00
DAGISelEmitter.h optimize tblgen compile time by eliminating the old isel. 2010-03-01 21:49:54 +00:00
DAGISelMatcher.cpp add plumbing for handling multiple result nodes 2010-03-24 00:41:19 +00:00
DAGISelMatcher.h add plumbing for handling multiple result nodes 2010-03-24 00:41:19 +00:00
DAGISelMatcherEmitter.cpp generate better code in CheckComplexPattern 2010-06-14 22:33:34 +00:00
DAGISelMatcherGen.cpp Add the SubRegIndex TableGen class. 2010-05-24 14:48:12 +00:00
DAGISelMatcherOpt.cpp add plumbing for handling multiple result nodes 2010-03-24 00:41:19 +00:00
DisassemblerEmitter.cpp Second try of initial ARM/Thumb disassembler check-in. It consists of a tablgen 2010-04-02 22:27:38 +00:00
DisassemblerEmitter.h Sketch TableGen disassembler emitter, based on patch by Sean Callanan. 2009-11-25 02:13:23 +00:00
EDEmitter.cpp Many Thumb2 instructions can reference the full ARM register set (i.e., 2010-07-30 02:41:01 +00:00
EDEmitter.h remove option from tablegen for building static header. 2010-07-20 19:45:21 +00:00
FastISelEmitter.cpp Filter out patterns that have PredicateOperands. 2010-07-28 01:52:23 +00:00
FastISelEmitter.h Replace std::iostreams with raw_ostream in TableGen. 2009-07-03 00:10:29 +00:00
InstrEnumEmitter.cpp make inst_begin/inst_end iterate over InstructionsByEnumValue. 2010-03-19 01:00:55 +00:00
InstrEnumEmitter.h Replace std::iostreams with raw_ostream in TableGen. 2009-07-03 00:10:29 +00:00
InstrInfoEmitter.cpp Start TargetRegisterClass indices at 0 instead of 1, so that 2010-06-18 18:13:55 +00:00
InstrInfoEmitter.h Replace TSFlagsFields and TSFlagsShifts with a simpler TSFlags field. 2010-04-05 03:10:20 +00:00
IntrinsicEmitter.cpp Fixes for Microsoft Visual Studio 2010, from Steven Watanabe! 2010-05-11 06:17:44 +00:00
IntrinsicEmitter.h Fixes for Microsoft Visual Studio 2010, from Steven Watanabe! 2010-05-11 06:17:44 +00:00
LLVMCConfigurationEmitter.cpp Return -1 only on failure to execute a program. 2010-07-27 11:19:36 +00:00
LLVMCConfigurationEmitter.h This variable is never used. 2009-10-17 20:08:47 +00:00
Makefile Add an emitter to handle the list of clang statement nodes. 2010-05-05 04:13:08 +00:00
NeonEmitter.cpp Fix a warning from gcc-4.0 (from the ppc buildbot). 2010-07-28 18:21:10 +00:00
NeonEmitter.h Add generic vector support for bitselect & element byteswap 2010-06-12 03:09:49 +00:00
OptParserEmitter.cpp tblgen/OptParser: Use EmitSourceFileHeader. 2010-01-04 22:03:51 +00:00
OptParserEmitter.h TableGen: Add initial backend for clang Driver's option parsing. 2009-11-18 21:29:51 +00:00
Record.cpp Fix a tblgen bug. 2010-06-23 19:50:39 +00:00
Record.h Add StringRef::compare_numeric and use it to sort TableGen register records. 2010-05-26 21:47:28 +00:00
RegisterInfoEmitter.cpp Start TargetRegisterClass indices at 0 instead of 1, so that 2010-06-18 18:13:55 +00:00
RegisterInfoEmitter.h Replace std::iostreams with raw_ostream in TableGen. 2009-07-03 00:10:29 +00:00
StringToOffsetTable.h Use raw_ostream::write_escaped instead of EscapeString. 2009-10-17 20:43:19 +00:00
SubtargetEmitter.cpp Make processor FUs unique for given itinerary. This extends the limit of 32 2010-04-18 20:31:01 +00:00
SubtargetEmitter.h Make processor FUs unique for given itinerary. This extends the limit of 32 2010-04-18 20:31:01 +00:00
TableGen.cpp remove option from tablegen for building static header. 2010-07-20 19:45:21 +00:00
TableGenBackend.cpp Replace std::iostreams with raw_ostream in TableGen. 2009-07-03 00:10:29 +00:00
TableGenBackend.h Replace std::iostreams with raw_ostream in TableGen. 2009-07-03 00:10:29 +00:00
TGLexer.cpp Add an !eq() operator to TableGen. It operates on strings only. 2010-01-05 19:11:42 +00:00
TGLexer.h Add an !eq() operator to TableGen. It operates on strings only. 2010-01-05 19:11:42 +00:00
TGParser.cpp Fix a subtle multiclass bug: when using class inheritance on 2010-06-22 20:30:50 +00:00
TGParser.h Teach tablegen to allow "let" expressions inside multiclasses, 2010-06-10 02:42:59 +00:00
TGValueTypes.cpp Add contexts to some of the MVT APIs. No functionality change yet, just the infrastructure work needed to get the contexts to where they need to be first. 2009-08-12 00:36:31 +00:00
X86DisassemblerShared.h fix build and while at it remove a redudant include 2009-12-19 11:52:18 +00:00
X86DisassemblerTables.cpp Fix a bunch of namespace polution. 2010-04-15 17:08:50 +00:00
X86DisassemblerTables.h Table-driven disassembler for the X86 architecture (16-, 32-, and 64-bit 2009-12-19 02:59:52 +00:00
X86ModRMFilters.h Add missing newlines at EOF (for clang++). 2009-12-19 04:16:48 +00:00
X86RecognizableInstr.cpp Convert some tab stops into spaces. 2010-07-12 08:16:59 +00:00
X86RecognizableInstr.h Reapply r105521, this time appending "LLU" to 64 bit 2010-06-08 22:51:23 +00:00