llvm-6502/utils/TableGen
Tim Northover a9a94ce839 TableGen: fix operand counting for aliases
TableGen has a fairly dubious heuristic to decide whether an alias should be
printed: does the alias have lest operands than the real instruction. This is
bad enough (particularly with no way to override it), but it should at least be
calculated consistently for both strings.

This patch implements that logic: first get the *correct* string for the
variant, in the same way as the Matcher, without guessing; then count the
number of whitespace chars.

There are basically 4 changes this brings about after the previous
commits; all of these appear to be good, so I have changed the tests:

+ ARM64: we print "neg X, Y" instead of "sub X, xzr, Y".
+ ARM64: we skip implicit "uxtx" and "uxtw" modifiers.
+ Sparc: we print "mov A, B" instead of "or %g0, A, B".
+ Sparc: we print "fcmpX A, B" instead of "fcmpX %fcc0, A, B"

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@208969 91177308-0d34-0410-b5e6-96231b3b80d8
2014-05-16 09:42:04 +00:00
..
AsmMatcherEmitter.cpp TableGen/ARM64: print aliases even if they have syntax variants. 2014-05-15 11:16:32 +00:00
AsmWriterEmitter.cpp TableGen: fix operand counting for aliases 2014-05-16 09:42:04 +00:00
AsmWriterInst.cpp Remove dead code. 2013-12-02 05:10:04 +00:00
AsmWriterInst.h Remove dead code. 2013-12-02 05:10:04 +00:00
CallingConvEmitter.cpp Make consistent use of MCPhysReg instead of uint16_t throughout the tree. 2014-04-04 05:16:06 +00:00
CMakeLists.txt Remove TGValueTypes.cpp from CMakeLists.txt which I forgot to do in r200036. 2014-01-24 20:51:32 +00:00
CodeEmitterGen.cpp remove a bunch of unused private methods 2014-03-23 17:09:26 +00:00
CodeGenDAGPatterns.cpp [Modules] Make Support/Debug.h modular. This requires it to not change 2014-04-21 22:55:11 +00:00
CodeGenDAGPatterns.h [C++11] More 'nullptr' conversion. In some cases just using a boolean check instead of comparing to nullptr. 2014-04-16 04:21:27 +00:00
CodeGenInstruction.cpp TableGen: use correct MIOperand when printing aliases 2014-05-15 13:36:01 +00:00
CodeGenInstruction.h TableGen: use correct MIOperand when printing aliases 2014-05-15 13:36:01 +00:00
CodeGenIntrinsics.h Expose "noduplicate" attribute as a property for intrinsics. 2014-03-18 23:51:07 +00:00
CodeGenMapTable.cpp [C++11] More 'nullptr' conversion. In some cases just using a boolean check instead of comparing to nullptr. 2014-04-15 07:20:03 +00:00
CodeGenRegisters.cpp [Modules] Fix potential ODR violations by sinking the DEBUG_TYPE 2014-04-22 03:06:00 +00:00
CodeGenRegisters.h [C++11] More 'nullptr' conversion. In some cases just using a boolean check instead of comparing to nullptr. 2014-04-16 04:21:27 +00:00
CodeGenSchedule.cpp [Modules] Fix potential ODR violations by sinking the DEBUG_TYPE 2014-04-22 03:06:00 +00:00
CodeGenSchedule.h iterator access to scheduling classes 2014-04-18 02:09:04 +00:00
CodeGenTarget.cpp [C++11] More 'nullptr' conversion. In some cases just using a boolean check instead of comparing to nullptr. 2014-04-15 07:20:03 +00:00
CodeGenTarget.h iterator_range accessor for CodeGenTarget instruction list. 2014-04-18 02:09:02 +00:00
CTagsEmitter.cpp [Modules] Fix potential ODR violations by sinking the DEBUG_TYPE 2014-04-22 03:06:00 +00:00
DAGISelEmitter.cpp [Modules] Make Support/Debug.h modular. This requires it to not change 2014-04-21 22:55:11 +00:00
DAGISelMatcher.cpp [C++11] More 'nullptr' conversion. In some cases just using a boolean check instead of comparing to nullptr. 2014-04-15 07:20:03 +00:00
DAGISelMatcher.h [C++11] More 'nullptr' conversion. In some cases just using a boolean check instead of comparing to nullptr. 2014-04-16 04:21:27 +00:00
DAGISelMatcherEmitter.cpp [C++11] More 'nullptr' conversion. In some cases just using a boolean check instead of comparing to nullptr. 2014-04-15 07:20:03 +00:00
DAGISelMatcherGen.cpp [C++11] More 'nullptr' conversion. In some cases just using a boolean check instead of comparing to nullptr. 2014-04-15 07:20:03 +00:00
DAGISelMatcherOpt.cpp [Modules] Fix potential ODR violations by sinking the DEBUG_TYPE 2014-04-22 03:06:00 +00:00
DFAPacketizerEmitter.cpp Simplify DFAPacketizerEmitter State copy/move semantics to use compiler defaults. 2014-04-21 22:58:00 +00:00
DisassemblerEmitter.cpp AArch64/ARM64: implement diagnosis of unpredictable loads & stores 2014-05-06 14:15:14 +00:00
FastISelEmitter.cpp [C++11] More 'nullptr' conversion. In some cases just using a boolean check instead of comparing to nullptr. 2014-04-15 07:20:03 +00:00
FixedLenDecoderEmitter.cpp [Modules] Fix potential ODR violations by sinking the DEBUG_TYPE 2014-04-22 03:06:00 +00:00
InstrInfoEmitter.cpp [C++11] Use 'nullptr' in tablegen output files. 2014-04-30 05:53:35 +00:00
IntrinsicEmitter.cpp Fix redefinition of default argument, found by modules build. It's not 2014-04-20 20:26:39 +00:00
LLVMBuild.txt LLVMBuild: Remove trailing newline, which irked me. 2011-12-12 19:48:00 +00:00
Makefile Remove exception handling usage from tblgen. 2012-10-25 20:33:17 +00:00
OptParserEmitter.cpp [cleanup] Re-sort all the includes with utils/sort_includes.py. 2014-03-04 10:07:28 +00:00
PseudoLoweringEmitter.cpp [Modules] Fix potential ODR violations by sinking the DEBUG_TYPE 2014-04-22 03:06:00 +00:00
RegisterInfoEmitter.cpp [C++11] Use 'nullptr' in tablegen output files. 2014-04-30 05:53:35 +00:00
SequenceToOffsetTable.h Add missing include 2013-08-28 07:03:02 +00:00
SetTheory.cpp [C++11] More 'nullptr' conversion. In some cases just using a boolean check instead of comparing to nullptr. 2014-04-15 07:20:03 +00:00
SetTheory.h Sort the #include lines for utils/... 2012-12-04 10:37:14 +00:00
SubtargetEmitter.cpp Move late partial-unrolling thresholds into the processor definitions 2014-05-08 09:14:44 +00:00
TableGen.cpp replace LeakSanitizerIsTurnedOffForTheCurrentProcess with __lsan_is_turned_off, but this time hide it under __has_feature(address_sanitizer); also include <sanitizer/lsan_interface.h> 2014-01-15 07:59:37 +00:00
TableGenBackends.h Add TableGen ctags(1) emitter and helper script. 2013-03-21 23:40:38 +00:00
tdtags Add TableGen ctags(1) emitter and helper script. 2013-03-21 23:40:38 +00:00
X86DisassemblerShared.h More C++ification. 2014-04-20 22:10:16 +00:00
X86DisassemblerTables.cpp AVX-512: Added rrk, rrkz, rmk, rmkz, rmbk, rmbkz versions of AVX512 FP packed instructions, added encoding tests for them. 2014-03-06 08:45:30 +00:00
X86DisassemblerTables.h Remove A6/A7 opcode maps. They can all be handled with a TB map, opcode of 0xa6/0xa7, and adding MRM_C0/MRM_E0 forms. Removes 376K from the disassembler tables. 2014-02-19 05:34:21 +00:00
X86ModRMFilters.cpp Second attempt at Removing special form of AddRegFrm used by FP instructions. These instructions can be handled by MRMXr instead. 2014-01-01 14:22:37 +00:00
X86ModRMFilters.h [C++11] Add 'override' keywords to tablegen code. 2014-03-05 05:17:42 +00:00
X86RecognizableInstr.cpp [C++11] More 'nullptr' conversion. In some cases just using a boolean check instead of comparing to nullptr. 2014-04-15 07:20:03 +00:00
X86RecognizableInstr.h [x86] Switch PAUSE instruction to use XS prefix instead of HasREPPrefix. Remove HasREPPrefix support from disassembler table generator since its now only used by CodeGenOnly instructions. 2014-02-20 07:59:43 +00:00