Print a load of a null pointer like this:

movw 0, %ax

instead of like this:

        movw , %ax


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@19500 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
Chris Lattner 2005-01-12 04:05:19 +00:00
parent 085c9955ca
commit 9f2cb3da48

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;
}