[PATCH] D59448: [WebAssembly] Change wasm.throw's first argument to an immediate

Heejin Ahn via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Mon Mar 18 21:59:55 PDT 2019


This revision was automatically updated to reflect the committed changes.
Closed by commit rC356436: [WebAssembly] Change wasm.throw's first argument to an immediate (authored by aheejin, committed by ).

Changed prior to commit:
  https://reviews.llvm.org/D59448?vs=191240&id=191241#toc

Repository:
  rC Clang

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D59448/new/

https://reviews.llvm.org/D59448

Files:
  include/clang/Basic/BuiltinsWebAssembly.def
  test/CodeGen/builtins-wasm.c


Index: test/CodeGen/builtins-wasm.c
===================================================================
--- test/CodeGen/builtins-wasm.c
+++ test/CodeGen/builtins-wasm.c
@@ -38,10 +38,10 @@
   // WEBASSEMBLY64: call void @llvm.wasm.data.drop(i32 3)
 }
 
-void throw(unsigned int tag, void *obj) {
-  return __builtin_wasm_throw(tag, obj);
-  // WEBASSEMBLY32: call void @llvm.wasm.throw(i32 %{{.*}}, i8* %{{.*}})
-  // WEBASSEMBLY64: call void @llvm.wasm.throw(i32 %{{.*}}, i8* %{{.*}})
+void throw(void *obj) {
+  return __builtin_wasm_throw(0, obj);
+  // WEBASSEMBLY32: call void @llvm.wasm.throw(i32 0, i8* %{{.*}})
+  // WEBASSEMBLY64: call void @llvm.wasm.throw(i32 0, i8* %{{.*}})
 }
 
 void rethrow_in_catch(void) {
Index: include/clang/Basic/BuiltinsWebAssembly.def
===================================================================
--- include/clang/Basic/BuiltinsWebAssembly.def
+++ include/clang/Basic/BuiltinsWebAssembly.def
@@ -36,7 +36,7 @@
 BUILTIN(__builtin_wasm_max_f64, "ddd", "nc")
 
 // Exception handling builtins.
-TARGET_BUILTIN(__builtin_wasm_throw, "vUiv*", "r", "exception-handling")
+TARGET_BUILTIN(__builtin_wasm_throw, "vIUiv*", "r", "exception-handling")
 TARGET_BUILTIN(__builtin_wasm_rethrow_in_catch, "v", "r", "exception-handling")
 
 // Atomic wait and notify.


-------------- next part --------------
A non-text attachment was scrubbed...
Name: D59448.191241.patch
Type: text/x-patch
Size: 1298 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20190319/b7d4ac35/attachment-0001.bin>


More information about the cfe-commits mailing list