]> granicus.if.org Git - llvm/commitdiff
[WebAssembly] Disable 128-bit shift libcalls
authorDerek Schuff <dschuff@google.com>
Tue, 10 May 2016 00:14:07 +0000 (00:14 +0000)
committerDerek Schuff <dschuff@google.com>
Tue, 10 May 2016 00:14:07 +0000 (00:14 +0000)
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

index 4839a324214728e8bd42c271e75b4f91f011cfe2..3292dc485d8f008b557ce7fc8a899c3e11435f91 100644 (file)
@@ -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(