mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-07-25 13:24:46 +00:00
TargetAsmInfo::getAddressSize() was incorrect for x86-64 and 64-bit targets
other than PPC64. Instead of fixing it, just remove it and fix all the places that use it to use TargetData::getPointerSize() instead, as there aren't very many. Most of the references were in DwarfWriter.cpp. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@42419 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
@@ -1508,13 +1508,13 @@ void X86RegisterInfo::emitPrologue(MachineFunction &MF) const {
|
||||
|
||||
if (MMI && MMI->needsFrameInfo()) {
|
||||
std::vector<MachineMove> &Moves = MMI->getFrameMoves();
|
||||
const TargetAsmInfo *TAI = MF.getTarget().getTargetAsmInfo();
|
||||
const TargetData *TD = MF.getTarget().getTargetData();
|
||||
|
||||
// Calculate amount of bytes used for return address storing
|
||||
int stackGrowth =
|
||||
(MF.getTarget().getFrameInfo()->getStackGrowthDirection() ==
|
||||
TargetFrameInfo::StackGrowsUp ?
|
||||
TAI->getAddressSize() : -TAI->getAddressSize());
|
||||
TD->getPointerSize() : -TD->getPointerSize());
|
||||
|
||||
if (StackSize) {
|
||||
// Show update of SP.
|
||||
|
Reference in New Issue
Block a user