mirror of
https://github.com/RPCS3/llvm.git
synced 2025-02-25 13:20:57 +00:00
[WebAssembly] Define a table of function signatures for runtime library calls.
LLVM CodeGen emits references to external symbols that are never declared in LLVM IR level, so they have no declared signature. However, WebAssembly requires all functions be declared with signatures. This patch adds a table for providing signatures for known runtime libcalls that will be used in subsequent patches to emit declarations for such functions. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@295857 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
e2af082e44
commit
2be1878c67
@ -35,6 +35,7 @@ add_llvm_target(WebAssemblyCodeGen
|
||||
WebAssemblyRegNumbering.cpp
|
||||
WebAssemblyRegStackify.cpp
|
||||
WebAssemblyReplacePhysRegs.cpp
|
||||
WebAssemblyRuntimeLibcallSignatures.cpp
|
||||
WebAssemblySelectionDAGInfo.cpp
|
||||
WebAssemblySetP2AlignOperands.cpp
|
||||
WebAssemblyStoreResults.cpp
|
||||
|
1306
lib/Target/WebAssembly/WebAssemblyRuntimeLibcallSignatures.cpp
Normal file
1306
lib/Target/WebAssembly/WebAssemblyRuntimeLibcallSignatures.cpp
Normal file
File diff suppressed because it is too large
Load Diff
38
lib/Target/WebAssembly/WebAssemblyRuntimeLibcallSignatures.h
Normal file
38
lib/Target/WebAssembly/WebAssemblyRuntimeLibcallSignatures.h
Normal file
@ -0,0 +1,38 @@
|
||||
// CodeGen/RuntimeLibcallSignatures.h - R.T. Lib. Call Signatures -*- C++ -*--//
|
||||
//
|
||||
// The LLVM Compiler Infrastructure
|
||||
//
|
||||
// This file is distributed under the University of Illinois Open Source
|
||||
// License. See LICENSE.TXT for details.
|
||||
//
|
||||
//===----------------------------------------------------------------------===//
|
||||
///
|
||||
/// \file
|
||||
/// \brief This file provides signature information for runtime libcalls.
|
||||
///
|
||||
//===----------------------------------------------------------------------===//
|
||||
|
||||
#ifndef LLVM_LIB_TARGET_WEBASSEMBLY_RUNTIME_LIBCALL_SIGNATURES_H
|
||||
#define LLVM_LIB_TARGET_WEBASSEMBLY_RUNTIME_LIBCALL_SIGNATURES_H
|
||||
|
||||
#include "llvm/ADT/SmallVector.h"
|
||||
#include "llvm/CodeGen/RuntimeLibcalls.h"
|
||||
#include "MCTargetDesc/WebAssemblyMCTargetDesc.h"
|
||||
|
||||
namespace llvm {
|
||||
|
||||
class WebAssemblySubtarget;
|
||||
|
||||
extern void GetSignature(const WebAssemblySubtarget &Subtarget,
|
||||
RTLIB::Libcall LC,
|
||||
SmallVectorImpl<unsigned> &Rets,
|
||||
SmallVectorImpl<unsigned> &Params);
|
||||
|
||||
extern void GetSignature(const WebAssemblySubtarget &Subtarget,
|
||||
const char *Name,
|
||||
SmallVectorImpl<unsigned> &Rets,
|
||||
SmallVectorImpl<unsigned> &Params);
|
||||
|
||||
} // end namespace llvm
|
||||
|
||||
#endif
|
Loading…
x
Reference in New Issue
Block a user