summaryrefslogtreecommitdiffstats
path: root/llvm/lib/Target/WebAssembly
diff options
context:
space:
mode:
authorHeejin Ahn <aheejin@gmail.com>2018-07-18 21:42:22 +0000
committerHeejin Ahn <aheejin@gmail.com>2018-07-18 21:42:22 +0000
commit47068a42d24db55632bc72dadba0732b24a6ac50 (patch)
tree9d9f9cd63c1845d023b6b24e5bd98691c82604a4 /llvm/lib/Target/WebAssembly
parentda142d10d9b71ef6d278e6f45fd3692e7c66948d (diff)
downloadbcm5719-llvm-47068a42d24db55632bc72dadba0732b24a6ac50.tar.gz
bcm5719-llvm-47068a42d24db55632bc72dadba0732b24a6ac50.zip
[WebAssembly] Add missing -mattr=+exception-handling guards
Summary: The use of exception handling instructions should only be enabled with `-mattr=+exception-handling` option. Reviewers: jgravelle-google Subscribers: dschuff, sbc100, sunfish, llvm-commits Differential Revision: https://reviews.llvm.org/D49391 llvm-svn: 337425
Diffstat (limited to 'llvm/lib/Target/WebAssembly')
-rw-r--r--llvm/lib/Target/WebAssembly/WebAssemblyInstrControl.td3
1 files changed, 3 insertions, 0 deletions
diff --git a/llvm/lib/Target/WebAssembly/WebAssemblyInstrControl.td b/llvm/lib/Target/WebAssembly/WebAssemblyInstrControl.td
index 09e148fb50d..d90244b9066 100644
--- a/llvm/lib/Target/WebAssembly/WebAssemblyInstrControl.td
+++ b/llvm/lib/Target/WebAssembly/WebAssemblyInstrControl.td
@@ -140,6 +140,8 @@ defm UNREACHABLE : NRI<(outs), (ins), [(trap)], "unreachable", 0x00>;
// Exception handling instructions
//===----------------------------------------------------------------------===//
+let Predicates = [HasExceptionHandling] in {
+
// Throwing an exception: throw / rethrow
let isTerminator = 1, hasCtrlDep = 1, isBarrier = 1 in {
defm THROW_I32 : I<(outs), (ins i32imm:$tag, I32:$val),
@@ -187,5 +189,6 @@ let isTerminator = 1, hasSideEffects = 1, isBarrier = 1, hasCtrlDep = 1,
defm CATCHRET : NRI<(outs), (ins bb_op:$dst, bb_op:$from),
[(catchret bb:$dst, bb:$from)], "", 0>;
}
+}
} // Defs = [ARGUMENTS]
OpenPOWER on IntegriCloud