summaryrefslogtreecommitdiffstats
path: root/llvm/lib/Target/WebAssembly/WebAssemblyInstrSIMD.td
diff options
context:
space:
mode:
Diffstat (limited to 'llvm/lib/Target/WebAssembly/WebAssemblyInstrSIMD.td')
-rw-r--r--llvm/lib/Target/WebAssembly/WebAssemblyInstrSIMD.td21
1 files changed, 16 insertions, 5 deletions
diff --git a/llvm/lib/Target/WebAssembly/WebAssemblyInstrSIMD.td b/llvm/lib/Target/WebAssembly/WebAssemblyInstrSIMD.td
index 7d1edccdeb3..5ff0ecba034 100644
--- a/llvm/lib/Target/WebAssembly/WebAssemblyInstrSIMD.td
+++ b/llvm/lib/Target/WebAssembly/WebAssemblyInstrSIMD.td
@@ -12,8 +12,19 @@
///
//===----------------------------------------------------------------------===//
-let isCommutable = 1 in {
-defm ADD : SIMDBinary<add, fadd, "add ">;
-defm MUL: SIMDBinary<mul, fmul, "mul ">;
-} // isCommutable = 1
-defm SUB: SIMDBinary<sub, fsub, "sub ">;
+let Defs = [ARGUMENTS] in {
+
+let isCommutable = 1 in
+defm ADD : SIMDBinaryInt<add, "add ", 24>;
+defm SUB : SIMDBinaryInt<sub, "sub ", 28>;
+let isCommutable = 1 in
+defm MUL : SIMDBinaryInt<mul, "mul ", 32>;
+
+let isCommutable = 1 in
+defm ADD : SIMDBinaryFP<fadd, "add ", 122>;
+defm SUB : SIMDBinaryFP<fsub, "sub ", 124>;
+defm DIV : SIMDBinaryFP<fdiv, "div ", 126>;
+let isCommutable = 1 in
+defm MUL : SIMDBinaryFP<fmul, "mul ", 128>;
+
+} // Defs = [ARGUMENTS]
OpenPOWER on IntegriCloud