summaryrefslogtreecommitdiff
path: root/lib/Target/Sparc
diff options
context:
space:
mode:
authorTim Northover <tnorthover@apple.com>2014-05-16 09:42:04 +0000
committerTim Northover <tnorthover@apple.com>2014-05-16 09:42:04 +0000
commita9a94ce83924290417762594def7088bcf31d782 (patch)
tree436f499d2f6f51b21413288d8653af238307a5c9 /lib/Target/Sparc
parentfbf4058e7a94b08d9d2f1b994f2d1bef1cd80115 (diff)
downloadllvm-a9a94ce83924290417762594def7088bcf31d782.tar.gz
llvm-a9a94ce83924290417762594def7088bcf31d782.tar.bz2
llvm-a9a94ce83924290417762594def7088bcf31d782.tar.xz
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
Diffstat (limited to 'lib/Target/Sparc')
-rw-r--r--lib/Target/Sparc/InstPrinter/SparcInstPrinter.cpp1
1 files changed, 1 insertions, 0 deletions
diff --git a/lib/Target/Sparc/InstPrinter/SparcInstPrinter.cpp b/lib/Target/Sparc/InstPrinter/SparcInstPrinter.cpp
index 861d6bf64b..261fb3838d 100644
--- a/lib/Target/Sparc/InstPrinter/SparcInstPrinter.cpp
+++ b/lib/Target/Sparc/InstPrinter/SparcInstPrinter.cpp
@@ -15,6 +15,7 @@
#include "Sparc.h"
#include "llvm/MC/MCExpr.h"
#include "llvm/MC/MCInst.h"
+#include "llvm/MC/MCRegisterInfo.h"
#include "llvm/MC/MCSymbol.h"
#include "llvm/Support/raw_ostream.h"
using namespace llvm;