diff options
author | Bob Wilson <bob.wilson@apple.com> | 2010-12-08 21:39:04 +0000 |
---|---|---|
committer | Bob Wilson <bob.wilson@apple.com> | 2010-12-08 21:39:04 +0000 |
commit | b4504308ce87260a22ded19b00be7466237bc255 (patch) | |
tree | 7ab64d75cf9a4db4bf8a8e5ee56a7b3ee8c8b9a6 /utils/TableGen/NeonEmitter.cpp | |
parent | b1e9df3b7288113bb319ff7233814f5904725afb (diff) | |
download | external_llvm-b4504308ce87260a22ded19b00be7466237bc255.zip external_llvm-b4504308ce87260a22ded19b00be7466237bc255.tar.gz external_llvm-b4504308ce87260a22ded19b00be7466237bc255.tar.bz2 |
Add operators for vabdl and vabal so they can be implemented without builtins.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@121287 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'utils/TableGen/NeonEmitter.cpp')
-rw-r--r-- | utils/TableGen/NeonEmitter.cpp | 27 |
1 files changed, 27 insertions, 0 deletions
diff --git a/utils/TableGen/NeonEmitter.cpp b/utils/TableGen/NeonEmitter.cpp index 03f4fd3..355a964 100644 --- a/utils/TableGen/NeonEmitter.cpp +++ b/utils/TableGen/NeonEmitter.cpp @@ -747,9 +747,36 @@ static std::string GenOpString(OpKind op, const std::string &proto, s += ");"; break; } + case OpAbdl: { + std::string abd = MangleName("vabd", typestr, ClassS) + "(__a, __b)"; + if (typestr[0] != 'U') { + // vabd results are always unsigned and must be zero-extended. + std::string utype = "U" + typestr.str(); + s += "(" + TypeString(proto[0], typestr) + ")"; + abd = "(" + TypeString('d', utype) + ")" + abd; + s += Extend(utype, abd) + ";"; + } else { + s += Extend(typestr, abd) + ";"; + } + break; + } case OpAba: s += "__a + " + MangleName("vabd", typestr, ClassS) + "(__b, __c);"; break; + case OpAbal: { + s += "__a + "; + std::string abd = MangleName("vabd", typestr, ClassS) + "(__b, __c)"; + if (typestr[0] != 'U') { + // vabd results are always unsigned and must be zero-extended. + std::string utype = "U" + typestr.str(); + s += "(" + TypeString(proto[0], typestr) + ")"; + abd = "(" + TypeString('d', utype) + ")" + abd; + s += Extend(utype, abd) + ";"; + } else { + s += Extend(typestr, abd) + ";"; + } + break; + } default: throw "unknown OpKind!"; break; |