diff options
author | JF Bastien <jfb@google.com> | 2015-10-22 02:32:50 +0000 |
---|---|---|
committer | JF Bastien <jfb@google.com> | 2015-10-22 02:32:50 +0000 |
commit | f2364bf129b533f99c4b9251fa60e720346223c8 (patch) | |
tree | b5d4d24b863265be4596cab2dac21bb6190f0259 /llvm/lib/Target/WebAssembly | |
parent | 6a8c151ecb1a8438535546fb104fc0e86f9323dc (diff) | |
download | bcm5719-llvm-f2364bf129b533f99c4b9251fa60e720346223c8.tar.gz bcm5719-llvm-f2364bf129b533f99c4b9251fa60e720346223c8.zip |
WebAssembly: fix more syntax
br_if shouldn't start with a dot.
div and rem went from prefix u/s to suffix.
llvm-svn: 250972
Diffstat (limited to 'llvm/lib/Target/WebAssembly')
-rw-r--r-- | llvm/lib/Target/WebAssembly/WebAssemblyAsmPrinter.cpp | 2 | ||||
-rw-r--r-- | llvm/lib/Target/WebAssembly/WebAssemblyInstrInteger.td | 8 |
2 files changed, 5 insertions, 5 deletions
diff --git a/llvm/lib/Target/WebAssembly/WebAssemblyAsmPrinter.cpp b/llvm/lib/Target/WebAssembly/WebAssemblyAsmPrinter.cpp index f3e3170dad2..6b5f653f3b9 100644 --- a/llvm/lib/Target/WebAssembly/WebAssemblyAsmPrinter.cpp +++ b/llvm/lib/Target/WebAssembly/WebAssemblyAsmPrinter.cpp @@ -107,7 +107,7 @@ static std::string OpcodeName(const WebAssemblyInstrInfo *TII, std::string Name(&N[0], &N[NameEnd]); if (!HasType) return Name; - for (const char *typelessOpcode : { "return", "call" }) + for (const char *typelessOpcode : { "return", "call", "br_if" }) if (Name == typelessOpcode) return Name; return std::string(&N[NameEnd + 1], &N[Len]) + '.' + Name; diff --git a/llvm/lib/Target/WebAssembly/WebAssemblyInstrInteger.td b/llvm/lib/Target/WebAssembly/WebAssemblyInstrInteger.td index b62cdaeb393..6a28a13eb3b 100644 --- a/llvm/lib/Target/WebAssembly/WebAssemblyInstrInteger.td +++ b/llvm/lib/Target/WebAssembly/WebAssemblyInstrInteger.td @@ -15,10 +15,10 @@ defm ADD : BinaryInt<add>; defm SUB : BinaryInt<sub>; defm MUL : BinaryInt<mul>; -defm SDIV : BinaryInt<sdiv>; -defm UDIV : BinaryInt<udiv>; -defm SREM : BinaryInt<srem>; -defm UREM : BinaryInt<urem>; +defm DIV_S : BinaryInt<sdiv>; +defm DIV_U : BinaryInt<udiv>; +defm REM_S : BinaryInt<srem>; +defm REM_U : BinaryInt<urem>; defm AND : BinaryInt<and>; defm IOR : BinaryInt<or>; defm XOR : BinaryInt<xor>; |