[llvm-branch-commits] [llvm-branch] r232084 - Merging r225521:
Daniel Sanders
daniel.sanders at imgtec.com
Thu Mar 12 12:21:17 PDT 2015
Author: dsanders
Date: Thu Mar 12 14:21:16 2015
New Revision: 232084
URL: http://llvm.org/viewvc/llvm-project?rev=232084&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=232084&r1=232083&r2=232084&view=diff
==============================================================================
--- llvm/branches/release_35/lib/Target/Mips/MipsAsmPrinter.cpp (original)
+++ llvm/branches/release_35/lib/Target/Mips/MipsAsmPrinter.cpp Thu Mar 12 14:21:16 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