mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-07-26 05:25:47 +00:00
Keep the MCSubtargetInfo in the MCRelxableFragment class.
Needed to fix PR18303 to correctly re-encode the instruction if it is relaxed. We keep a copy of the MCSubtargetInfo to make sure that we are not effected by future changes to the subtarget info coming from the assembler (e.g. when parsing .code 16 directived). git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@200347 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
@@ -230,7 +230,7 @@ void MCObjectStreamer::EmitInstToFragment(const MCInst &Inst,
|
||||
const MCSubtargetInfo &STI) {
|
||||
// Always create a new, separate fragment here, because its size can change
|
||||
// during relaxation.
|
||||
MCRelaxableFragment *IF = new MCRelaxableFragment(Inst);
|
||||
MCRelaxableFragment *IF = new MCRelaxableFragment(Inst, STI);
|
||||
insert(IF);
|
||||
|
||||
SmallString<128> Code;
|
||||
|
Reference in New Issue
Block a user