diff options
| author | Toma Tabacu <toma.tabacu@imgtec.com> | 2015-01-09 15:00:30 +0000 |
|---|---|---|
| committer | Toma Tabacu <toma.tabacu@imgtec.com> | 2015-01-09 15:00:30 +0000 |
| commit | 68e8a9c0dd0c34031d350e1823ee82d62926d938 (patch) | |
| tree | ed129aaf000c2b1f5430dea223cbd47593a8188a /llvm/lib | |
| parent | 02c9153009db01b68337974fe2f2ab2ce7c358b0 (diff) | |
| download | bcm5719-llvm-68e8a9c0dd0c34031d350e1823ee82d62926d938.tar.gz bcm5719-llvm-68e8a9c0dd0c34031d350e1823ee82d62926d938.zip | |
[mips] Add comment which explains why we need to change the assembler options before and after inline asm blocks. NFC.
llvm-svn: 225521
Diffstat (limited to 'llvm/lib')
| -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 53b79eeacea..50c0441e0dd 100644 --- a/llvm/lib/Target/Mips/MipsAsmPrinter.cpp +++ b/llvm/lib/Target/Mips/MipsAsmPrinter.cpp @@ -747,6 +747,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(); |

