mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-07-22 23:24:59 +00:00
Fix a bit of confusion about .set and produce more readable assembly.
Every target we support has support for assembly that looks like a = b - c .long a What is special about MachO is that the above combination suppresses the production of a relocation. With this change we avoid producing the intermediary labels when they don't add any value. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@220256 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
@@ -264,7 +264,8 @@ MCOperand X86MCInstLower::LowerSymbolOperand(const MachineOperand &MO,
|
||||
Expr = MCBinaryExpr::CreateSub(Expr,
|
||||
MCSymbolRefExpr::Create(MF.getPICBaseSymbol(), Ctx),
|
||||
Ctx);
|
||||
if (MO.isJTI() && MAI.hasSetDirective()) {
|
||||
if (MO.isJTI()) {
|
||||
assert(MAI.doesSetDirectiveSuppressesReloc());
|
||||
// If .set directive is supported, use it to reduce the number of
|
||||
// relocations the assembler will generate for differences between
|
||||
// local labels. This is only safe when the symbols are in the same
|
||||
|
Reference in New Issue
Block a user