From 42a519609886359fc6b518f526d7922939ac0d7d Mon Sep 17 00:00:00 2001 From: Derek Schuff Date: Tue, 10 May 2016 00:14:07 +0000 Subject: [PATCH] [WebAssembly] Disable 128-bit shift libcalls Currently the signature of the functions i128(i128, i32) aka void(i32, i64, i64, i32) doesn't match the signature of the call emitted by the default lowering, void(i32, i64, i64). git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@268991 91177308-0d34-0410-b5e6-96231b3b80d8 --- lib/Target/WebAssembly/WebAssemblyISelLowering.cpp | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/lib/Target/WebAssembly/WebAssemblyISelLowering.cpp b/lib/Target/WebAssembly/WebAssemblyISelLowering.cpp index 4839a324214..3292dc485d8 100644 --- a/lib/Target/WebAssembly/WebAssemblyISelLowering.cpp +++ b/lib/Target/WebAssembly/WebAssemblyISelLowering.cpp @@ -135,6 +135,13 @@ WebAssemblyTargetLowering::WebAssemblyTargetLowering( // Trap lowers to wasm unreachable setOperationAction(ISD::TRAP, MVT::Other, Legal); + + // Disable 128-bit shift libcalls. Currently the signature of the functions + // i128(i128, i32) aka void(i32, i64, i64, i32) doesn't match the signature + // of the call emitted by the default lowering, void(i32, i64, i64). + setLibcallName(RTLIB::SRL_I128, nullptr); + setLibcallName(RTLIB::SRA_I128, nullptr); + setLibcallName(RTLIB::SHL_I128, nullptr); } FastISel *WebAssemblyTargetLowering::createFastISel( -- 2.50.1