Commit 4351822a authored by Daniel Sanders's avatar Daniel Sanders
Browse files

Merging r225521:

------------------------------------------------------------------------
r225521 | tomatabacu | 2015-01-09 15:00:30 +0000 (Fri, 09 Jan 2015) | 1 line

[mips] Add comment which explains why we need to change the assembler options before and after inline asm blocks. NFC.
------------------------------------------------------------------------

llvm-svn: 232084
parent 60d1be21
Loading
Loading
Loading
Loading
+6 −0
Original line number Diff line number Diff line
@@ -725,6 +725,12 @@ void MipsAsmPrinter::emitInlineAsmStart(
    const MCSubtargetInfo &StartInfo) const {
  MipsTargetStreamer &TS = getTargetStreamer();

  // GCC's choice of assembler options for inline assembly code ('at', 'macro'
  // and 'reorder') is different from LLVM's choice for generated code ('noat',
  // 'nomacro' and 'noreorder').
  // In order to maintain compatibility with inline assembly code which depends
  // on GCC's assembler options being used, we have to switch to those options
  // for the duration of the inline assembly block and then switch back.
  TS.emitDirectiveSetPush();
  TS.emitDirectiveSetAt();
  TS.emitDirectiveSetMacro();