diff options
| author | Alvin Wong <alvin@alvinhc.com> | 2023-05-06 23:27:59 +0800 |
|---|---|---|
| committer | Alvin Wong <alvin@alvinhc.com> | 2023-05-09 00:07:40 +0800 |
| commit | 6b996282cee3588e46b18c30957e71c964012e14 (patch) | |
| tree | ca2c8ed9d7b4792a8f0be9525b665070fa30cdce /lldb/source/Plugins/ScriptInterpreter/Python/ScriptedProcessPythonInterface.h | |
| parent | 8cd90fd1a8233b2dcb96451eab7c6baea3180f54 (diff) | |
[X86][CodeGen] Do not add `offset` for memory reference using symbol
In the past, D71436 added writing the `offset` operator for some
legitimate cases. However, for memory references in Intel syntax, the
`offset` operator (`[offset sym]`) appears to be superfluous at best,
possibly wrong and contradictory at worst.
This patch bypasses writing the `offset` operator in
`X86AsmPrinter::PrintIntelMemReference` which affects exactly this
case. A similar code flow exists in `X86IntelInstPrinter.cpp` -
`X86IntelInstPrinter::printMemReference`.
The motivation for fixing this output is to allow us to reject the
confusing `call [offset fn_ref]` syntax in MC, as discussed in D149579.
Depends on D149579
Differential Revision: https://reviews.llvm.org/D150047
Diffstat (limited to 'lldb/source/Plugins/ScriptInterpreter/Python/ScriptedProcessPythonInterface.h')
0 files changed, 0 insertions, 0 deletions
