[llvm-branch-commits] [llvm-branch] r231463 - Merging r225521:

Daniel Sanders daniel.sanders at imgtec.com
Fri Mar 6 03:40:28 PST 2015


Author: dsanders
Date: Fri Mar  6 05:40:28 2015
New Revision: 231463

URL: http://llvm.org/viewvc/llvm-project?rev=231463&view=rev
Log:
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.
------------------------------------------------------------------------

Modified:
    llvm/branches/release_35/lib/Target/Mips/MipsAsmPrinter.cpp

Modified: llvm/branches/release_35/lib/Target/Mips/MipsAsmPrinter.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/branches/release_35/lib/Target/Mips/MipsAsmPrinter.cpp?rev=231463&r1=231462&r2=231463&view=diff
==============================================================================
--- llvm/branches/release_35/lib/Target/Mips/MipsAsmPrinter.cpp (original)
+++ llvm/branches/release_35/lib/Target/Mips/MipsAsmPrinter.cpp Fri Mar  6 05:40:28 2015
@@ -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();





More information about the llvm-branch-commits mailing list