Hi,<div><br></div><div>In X86AsmPrinter::printLeaMemReference, immediate displacements for memory references currently are not being emitted if the memory reference has parentheses and the displacement is zero. This breaks inline assembly code that adds a constant to the displacement, e.g.: "leal 128+%0, %%edx" where %0 is a memory reference. Currently the emitted code would look like "leal 128+(%esp)" which triggers a warning (that an operand is missing and zero is being assumed) with GNU as and is not accepted at all by llvm-mc. With this patch "leal 128+0(%esp)" is emitted, which is happily accepted by both gas and llvm-mc.</div>
<div><br></div><div>Cheers,</div><div>Kaelyn</div>