diff options
| author | Dan Gohman <dan433584@gmail.com> | 2019-05-21 23:06:34 +0000 |
|---|---|---|
| committer | Dan Gohman <dan433584@gmail.com> | 2019-05-21 23:06:34 +0000 |
| commit | a49496fb2a16b729f6f6ec8b9a1e8c72133ac9d9 (patch) | |
| tree | 1cef496b4f49b283af4c53a4be6c83bca406ef83 /llvm/lib/Target/WebAssembly/WebAssemblyRuntimeLibcallSignatures.cpp | |
| parent | db62d375dc339da7edeeb300e7348ffb774e5ed1 (diff) | |
| download | bcm5719-llvm-a49496fb2a16b729f6f6ec8b9a1e8c72133ac9d9.tar.gz bcm5719-llvm-a49496fb2a16b729f6f6ec8b9a1e8c72133ac9d9.zip | |
[WebAssembly] Add the signature for the new llround builtin function
r360889 added new llround builtin functions. This patch adds their
signatures for the WebAssembly backend.
It also adds wasm32 support to utils/update_llc_test_checks.py, since
that's the script other targets are using for their testcases for this
feature.
Differential Revision: https://reviews.llvm.org/D62207
llvm-svn: 361327
Diffstat (limited to 'llvm/lib/Target/WebAssembly/WebAssemblyRuntimeLibcallSignatures.cpp')
| -rw-r--r-- | llvm/lib/Target/WebAssembly/WebAssemblyRuntimeLibcallSignatures.cpp | 22 |
1 files changed, 22 insertions, 0 deletions
diff --git a/llvm/lib/Target/WebAssembly/WebAssemblyRuntimeLibcallSignatures.cpp b/llvm/lib/Target/WebAssembly/WebAssemblyRuntimeLibcallSignatures.cpp index ab06a9823bf..2bc602034ba 100644 --- a/llvm/lib/Target/WebAssembly/WebAssemblyRuntimeLibcallSignatures.cpp +++ b/llvm/lib/Target/WebAssembly/WebAssemblyRuntimeLibcallSignatures.cpp @@ -86,6 +86,9 @@ enum RuntimeLibcallSignature { func_iPTR_i64_i64_i64_i64_i64_i64, i32_func_i64_i64, i32_func_i64_i64_i64_i64, + iPTR_func_f32, + iPTR_func_f64, + iPTR_func_i64_i64, unsupported }; @@ -216,6 +219,12 @@ struct RuntimeLibcallSignatureTable { Table[RTLIB::ROUND_F32] = f32_func_f32; Table[RTLIB::ROUND_F64] = f64_func_f64; Table[RTLIB::ROUND_F128] = func_iPTR_i64_i64; + Table[RTLIB::LROUND_F32] = iPTR_func_f32; + Table[RTLIB::LROUND_F64] = iPTR_func_f64; + Table[RTLIB::LROUND_F128] = iPTR_func_i64_i64; + Table[RTLIB::LLROUND_F32] = i64_func_f32; + Table[RTLIB::LLROUND_F64] = i64_func_f64; + Table[RTLIB::LLROUND_F128] = i64_func_i64_i64; Table[RTLIB::FLOOR_F32] = f32_func_f32; Table[RTLIB::FLOOR_F64] = f64_func_f64; Table[RTLIB::FLOOR_F128] = func_iPTR_i64_i64; @@ -843,6 +852,19 @@ void llvm::getLibcallSignature(const WebAssemblySubtarget &Subtarget, Params.push_back(wasm::ValType::I64); Params.push_back(wasm::ValType::I64); break; + case iPTR_func_f32: + Rets.push_back(PtrTy); + Params.push_back(wasm::ValType::F32); + break; + case iPTR_func_f64: + Rets.push_back(PtrTy); + Params.push_back(wasm::ValType::F64); + break; + case iPTR_func_i64_i64: + Rets.push_back(PtrTy); + Params.push_back(wasm::ValType::I64); + Params.push_back(wasm::ValType::I64); + break; case unsupported: llvm_unreachable("unsupported runtime library signature"); } |

