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:
Dan Gohman
2007-09-27 23:12:31 +00:00
parent fc3282221f
commit 82482944ed
5 changed files with 18 additions and 26 deletions

View File

@@ -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.