@@ -752,26 +752,23 @@ void *tp (void) {
752752 // WEBASSEMBLY: call {{.*}} @llvm.thread.pointer.p0()
753753}
754754
755-
756- typedef void (* funcref_t )();
757- typedef int (* funcref_int_t )(int );
758- typedef float (* F1 )(float , double , int );
759- typedef int (* F2 )(float , double , int );
760- typedef int (* F3 )(int , int , int );
761- typedef void (* F4 )(int , int , int );
762- typedef void (* F5 )(void );
755+ typedef void (* Fvoid )(void );
756+ typedef float (* Ffloats )(float , double , int );
757+ typedef void (* Fpointers )(Fvoid , Ffloats , void * , int * , int * * * , char [5 ]);
763758
764759void use (int );
765760
766- void test_function_pointer_signature_void (F1 func ) {
767- // WEBASSEMBLY: %0 = tail call i32 (ptr, ...) @llvm.wasm.ref.test.func(ptr %func, float 0.000000e+00, token poison, float 0.000000e+00, double 0.000000e+00, i32 0)
761+ void test_function_pointer_signature_void (Fvoid func ) {
762+ // WEBASSEMBLY: %0 = tail call i32 (ptr, ...) @llvm.wasm.ref.test.func(ptr %func, token poison)
763+ use (__builtin_wasm_test_function_pointer_signature (func ));
764+ }
765+
766+ void test_function_pointer_signature_floats (Ffloats func ) {
767+ // WEBASSEMBLY: tail call i32 (ptr, ...) @llvm.wasm.ref.test.func(ptr %func, float 0.000000e+00, token poison, float 0.000000e+00, double 0.000000e+00, i32 0)
768+ use (__builtin_wasm_test_function_pointer_signature (func ));
769+ }
770+
771+ void test_function_pointer_signature_pointers (Fpointers func ) {
772+ // WEBASSEMBLY: %0 = tail call i32 (ptr, ...) @llvm.wasm.ref.test.func(ptr %func, token poison, ptr null, ptr null, ptr null, ptr null, ptr null, ptr null)
768773 use (__builtin_wasm_test_function_pointer_signature (func ));
769- // WEBASSEMBLY: %1 = tail call i32 (ptr, ...) @llvm.wasm.ref.test.func(ptr %func, i32 0, token poison, float 0.000000e+00, double 0.000000e+00, i32 0)
770- use (__builtin_wasm_test_function_pointer_signature ((F2 )func ));
771- // WEBASSEMBLY: %2 = tail call i32 (ptr, ...) @llvm.wasm.ref.test.func(ptr %func, i32 0, token poison, i32 0, i32 0, i32 0)
772- use (__builtin_wasm_test_function_pointer_signature ((F3 )func ));
773- // WEBASSEMBLY: %3 = tail call i32 (ptr, ...) @llvm.wasm.ref.test.func(ptr %func, token poison, i32 0, i32 0, i32 0)
774- use (__builtin_wasm_test_function_pointer_signature ((F4 )func ));
775- // WEBASSEMBLY: %4 = tail call i32 (ptr, ...) @llvm.wasm.ref.test.func(ptr %func, token poison)
776- use (__builtin_wasm_test_function_pointer_signature ((F5 )func ));
777774}
0 commit comments