diff options
author | Daniel Sanders <daniel.sanders@imgtec.com> | 2015-03-06 11:40:28 +0000 |
---|---|---|
committer | Daniel Sanders <daniel.sanders@imgtec.com> | 2015-03-06 11:40:28 +0000 |
commit | 8f20452cf2523aaa1aec69d68e46e026327f7ccc (patch) | |
tree | d1af50f40fecea74d8f99626e934ff1e4dd6f0dd | |
parent | 84bc83fd78ff275e69035380e841bd74866b08bf (diff) | |
download | llvm-8f20452cf2523aaa1aec69d68e46e026327f7ccc.zip llvm-8f20452cf2523aaa1aec69d68e46e026327f7ccc.tar.gz llvm-8f20452cf2523aaa1aec69d68e46e026327f7ccc.tar.bz2 |
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: 231463
-rw-r--r-- | llvm/lib/Target/Mips/MipsAsmPrinter.cpp | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/llvm/lib/Target/Mips/MipsAsmPrinter.cpp b/llvm/lib/Target/Mips/MipsAsmPrinter.cpp index 94b7c0d..fac3f79 100644 --- a/llvm/lib/Target/Mips/MipsAsmPrinter.cpp +++ b/llvm/lib/Target/Mips/MipsAsmPrinter.cpp @@ -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(); |