1
0
mirror of https://github.com/RPCS3/llvm-mirror.git synced 2024-10-21 03:53:04 +02:00

Print a load of a null pointer like this:

movw 0, %ax

instead of like this:

        movw , %ax

llvm-svn: 19500
This commit is contained in:
Chris Lattner 2005-01-12 04:05:19 +00:00
parent 3c85c67c97
commit 360988bae2

View File

@ -563,7 +563,7 @@ void X86ATTAsmPrinter::printMemReference(const MachineInstr *MI, unsigned Op){
printOp(DispSpec, true);
} else {
int DispVal = DispSpec.getImmedValue();
if (DispVal)
if (DispVal || (!IndexReg.getReg() && !BaseReg.getReg()))
O << DispVal;
}