aturetsk created this revision. aturetsk added reviewers: bruno, echristo, ahatanak, RKSimon. aturetsk added a subscriber: cfe-commits. Herald added a subscriber: mehdi_amini.
Pass MCSubtargetInfo instead of CPU and Triple to AsmBackend in order to be able to reach feature bits there (e.g. for ckecking of long nop support). CPU and Triple are taken from MCSubtargetInfo. http://reviews.llvm.org/D21066 Files: tools/driver/cc1as_main.cpp Index: tools/driver/cc1as_main.cpp =================================================================== --- tools/driver/cc1as_main.cpp +++ tools/driver/cc1as_main.cpp @@ -381,7 +381,7 @@ MCAsmBackend *MAB = nullptr; if (Opts.ShowEncoding) { CE = TheTarget->createMCCodeEmitter(*MCII, *MRI, Ctx); - MAB = TheTarget->createMCAsmBackend(*MRI, Opts.Triple, Opts.CPU); + MAB = TheTarget->createMCAsmBackend(*STI, *MRI); } auto FOut = llvm::make_unique<formatted_raw_ostream>(*Out); Str.reset(TheTarget->createAsmStreamer( @@ -398,8 +398,8 @@ } MCCodeEmitter *CE = TheTarget->createMCCodeEmitter(*MCII, *MRI, Ctx); - MCAsmBackend *MAB = TheTarget->createMCAsmBackend(*MRI, Opts.Triple, - Opts.CPU); + MCAsmBackend *MAB = + TheTarget->createMCAsmBackend(*STI, *MRI); Triple T(Opts.Triple); Str.reset(TheTarget->createMCObjectStreamer( T, Ctx, *MAB, *Out, CE, *STI, Opts.RelaxAll,
Index: tools/driver/cc1as_main.cpp =================================================================== --- tools/driver/cc1as_main.cpp +++ tools/driver/cc1as_main.cpp @@ -381,7 +381,7 @@ MCAsmBackend *MAB = nullptr; if (Opts.ShowEncoding) { CE = TheTarget->createMCCodeEmitter(*MCII, *MRI, Ctx); - MAB = TheTarget->createMCAsmBackend(*MRI, Opts.Triple, Opts.CPU); + MAB = TheTarget->createMCAsmBackend(*STI, *MRI); } auto FOut = llvm::make_unique<formatted_raw_ostream>(*Out); Str.reset(TheTarget->createAsmStreamer( @@ -398,8 +398,8 @@ } MCCodeEmitter *CE = TheTarget->createMCCodeEmitter(*MCII, *MRI, Ctx); - MCAsmBackend *MAB = TheTarget->createMCAsmBackend(*MRI, Opts.Triple, - Opts.CPU); + MCAsmBackend *MAB = + TheTarget->createMCAsmBackend(*STI, *MRI); Triple T(Opts.Triple); Str.reset(TheTarget->createMCObjectStreamer( T, Ctx, *MAB, *Out, CE, *STI, Opts.RelaxAll,
_______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits