mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-11-01 15:17:25 +00:00
Add support to locate local variables in frames (early version.)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@26994 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
@@ -21,6 +21,7 @@
|
||||
#include "llvm/CodeGen/MachineInstrBuilder.h"
|
||||
#include "llvm/CodeGen/MachineFunction.h"
|
||||
#include "llvm/CodeGen/MachineFrameInfo.h"
|
||||
#include "llvm/CodeGen/MachineLocation.h"
|
||||
#include "llvm/Target/TargetFrameInfo.h"
|
||||
#include "llvm/Target/TargetMachine.h"
|
||||
#include "llvm/Target/TargetOptions.h"
|
||||
@@ -353,6 +354,18 @@ void AlphaRegisterInfo::emitEpilogue(MachineFunction &MF,
|
||||
}
|
||||
}
|
||||
|
||||
void AlphaRegisterInfo::getLocation(MachineFunction &MF, unsigned Index,
|
||||
MachineLocation &ML) const {
|
||||
assert(0 && "Needs to be defined for target");
|
||||
MachineFrameInfo *MFI = MF.getFrameInfo();
|
||||
bool FP = hasFP(MF);
|
||||
|
||||
// FIXME - Needs to handle register variables.
|
||||
// FIXME - Faking that llvm number is same as gcc numbering.
|
||||
ML.set((FP ? Alpha::R15 : Alpha::R30) - Alpha::R0,
|
||||
MFI->getObjectOffset(Index) + MFI->getStackSize());
|
||||
}
|
||||
|
||||
#include "AlphaGenRegisterInfo.inc"
|
||||
|
||||
std::string AlphaRegisterInfo::getPrettyName(unsigned reg)
|
||||
|
||||
Reference in New Issue
Block a user