31 #define DEBUG_TYPE "wasm-reg-info"
33 #define GET_REGINFO_TARGET_DESC
34 #include "WebAssemblyGenRegisterInfo.inc"
41 static const MCPhysReg CalleeSavedRegs[] = {0};
42 return CalleeSavedRegs;
48 for (
auto Reg : {WebAssembly::SP32, WebAssembly::SP64, WebAssembly::FP32,
62 static const unsigned Regs[2][2] = {
64 {WebAssembly::SP32, WebAssembly::SP64},
65 {WebAssembly::FP32, WebAssembly::FP64}};
81 bool requiresRealignment =
unsigned getStackAlignment() const
getStackAlignment - This method returns the number of bytes to which the stack pointer must be aligne...
Alignment of stack for function (3 bits) stored as log2 of alignment with +1 bias 0 means unaligned (...
uint16_t MCPhysReg
An unsigned integer type large enough to represent all physical registers, but not necessarily virtua...
const Function * getFunction() const
getFunction - Return the LLVM function that this machine code represents
bool hasFP(const MachineFunction &MF) const override
Return true if the specified function should have a dedicated frame pointer register.
bool hasAttribute(unsigned Index, Attribute::AttrKind Kind) const
Return true if the attribute exists at the given index.
void eliminateFrameIndex(MachineBasicBlock::iterator MI, int SPAdj, unsigned FIOperandNum, RegScavenger *RS=nullptr) const override
unsigned getMaxAlignment() const
Return the alignment in bytes that this function must be aligned to, which is greater than the defaul...
WebAssemblyRegisterInfo(const Triple &TT)
#define llvm_unreachable(msg)
Marks that the current location is not supposed to be reachable.
Reg
All possible values of the reg field in the ModR/M byte.
The MachineFrameInfo class represents an abstract stack frame until prolog/epilog code is inserted...
bool isArch64Bit() const
Test whether the architecture is 64-bit.
BitVector getReservedRegs(const MachineFunction &MF) const override
bundle_iterator< MachineInstr, instr_iterator > iterator
const MCPhysReg * getCalleeSavedRegs(const MachineFunction *MF) const override
This file provides WebAssembly-specific target descriptions.
Triple - Helper class for working with autoconf configuration names.
This file contains the WebAssembly implementation of the WebAssemblyRegisterInfo class.
This file declares the WebAssembly-specific subclass of TargetSubtarget.
This file contains the WebAssembly implementation of the TargetInstrInfo class.
MachineFrameInfo * getFrameInfo()
getFrameInfo - Return the frame info object for the current function.
unsigned getFrameRegister(const MachineFunction &MF) const override
AttributeSet getAttributes() const
Return the attribute list for this Function.
This class implements WebAssembly-specific bits of TargetFrameLowering class.
bool hasFnAttribute(Attribute::AttrKind Kind) const
Return true if the function has the attribute.
This file declares WebAssembly-specific per-machine-function information.
bool needsStackRealignment(const MachineFunction &MF) const override
bool canRealignStack(const MachineFunction &MF) const