mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-01-20 12:31:40 +00:00
Add operators for vadd[lw] and vsub[lw]
so they can be implemented without clang builtins. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@121213 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
94541efd92
commit
e113ae56d9
@ -584,9 +584,23 @@ static std::string GenOpString(OpKind op, const std::string &proto,
|
|||||||
case OpAdd:
|
case OpAdd:
|
||||||
s += "__a + __b;";
|
s += "__a + __b;";
|
||||||
break;
|
break;
|
||||||
|
case OpAddl:
|
||||||
|
s += Extend(proto, typestr, "__a") + " + "
|
||||||
|
+ Extend(proto, typestr, "__b") + ";";
|
||||||
|
break;
|
||||||
|
case OpAddw:
|
||||||
|
s += "__a + " + Extend(proto, typestr, "__b") + ";";
|
||||||
|
break;
|
||||||
case OpSub:
|
case OpSub:
|
||||||
s += "__a - __b;";
|
s += "__a - __b;";
|
||||||
break;
|
break;
|
||||||
|
case OpSubl:
|
||||||
|
s += Extend(proto, typestr, "__a") + " - "
|
||||||
|
+ Extend(proto, typestr, "__b") + ";";
|
||||||
|
break;
|
||||||
|
case OpSubw:
|
||||||
|
s += "__a - " + Extend(proto, typestr, "__b") + ";";
|
||||||
|
break;
|
||||||
case OpMulN:
|
case OpMulN:
|
||||||
s += "__a * " + Duplicate(nElts, typestr, "__b") + ";";
|
s += "__a * " + Duplicate(nElts, typestr, "__b") + ";";
|
||||||
break;
|
break;
|
||||||
|
@ -24,7 +24,11 @@
|
|||||||
enum OpKind {
|
enum OpKind {
|
||||||
OpNone,
|
OpNone,
|
||||||
OpAdd,
|
OpAdd,
|
||||||
|
OpAddl,
|
||||||
|
OpAddw,
|
||||||
OpSub,
|
OpSub,
|
||||||
|
OpSubl,
|
||||||
|
OpSubw,
|
||||||
OpMul,
|
OpMul,
|
||||||
OpMull,
|
OpMull,
|
||||||
OpMla,
|
OpMla,
|
||||||
@ -87,7 +91,11 @@ namespace llvm {
|
|||||||
NeonEmitter(RecordKeeper &R) : Records(R) {
|
NeonEmitter(RecordKeeper &R) : Records(R) {
|
||||||
OpMap["OP_NONE"] = OpNone;
|
OpMap["OP_NONE"] = OpNone;
|
||||||
OpMap["OP_ADD"] = OpAdd;
|
OpMap["OP_ADD"] = OpAdd;
|
||||||
|
OpMap["OP_ADDL"] = OpAddl;
|
||||||
|
OpMap["OP_ADDW"] = OpAddw;
|
||||||
OpMap["OP_SUB"] = OpSub;
|
OpMap["OP_SUB"] = OpSub;
|
||||||
|
OpMap["OP_SUBL"] = OpSubl;
|
||||||
|
OpMap["OP_SUBW"] = OpSubw;
|
||||||
OpMap["OP_MUL"] = OpMul;
|
OpMap["OP_MUL"] = OpMul;
|
||||||
OpMap["OP_MULL"] = OpMull;
|
OpMap["OP_MULL"] = OpMull;
|
||||||
OpMap["OP_MLA"] = OpMla;
|
OpMap["OP_MLA"] = OpMla;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user