]> granicus.if.org Git - llvm/commit
Merging r224425:
authorDaniel Sanders <daniel.sanders@imgtec.com>
Thu, 12 Mar 2015 19:17:32 +0000 (19:17 +0000)
committerDaniel Sanders <daniel.sanders@imgtec.com>
Thu, 12 Mar 2015 19:17:32 +0000 (19:17 +0000)
commitd3e5e7407bc211c540d040578fea03e72e19eac2
tree5dfec2434091fe3cdf835d3f8ef30d579b56eb8a
parent33550d78eabbd08eb8652b9cf23098bf257823fa
Merging r224425:
------------------------------------------------------------------------
r224425 | tomatabacu | 2014-12-17 10:56:16 +0000 (Wed, 17 Dec 2014) | 17 lines

[mips] Set GCC-compatible MIPS asssembler options before inline asm blocks.

Summary:
When generating MIPS assembly, LLVM always overrides the default assembler options by emitting the '.set noreorder', '.set nomacro' and '.set noat' directives,
while GCC uses the default options if an assembly-level function contains inline assembly code.

This becomes a problem when the code generated by LLVM is interleaved with inline assembly which assumes GCC-like assembler options (from Linux, for example).

This patch fixes these conflicts by setting the appropriate assembler options at the beginning of an inline asm block and popping them at the end.

Reviewers: dsanders

Reviewed By: dsanders

Subscribers: llvm-commits

Differential Revision: http://reviews.llvm.org/D6637
------------------------------------------------------------------------

git-svn-id: https://llvm.org/svn/llvm-project/llvm/branches/release_35@232083 91177308-0d34-0410-b5e6-96231b3b80d8
include/llvm/CodeGen/AsmPrinter.h
lib/CodeGen/AsmPrinter/AsmPrinterInlineAsm.cpp
lib/Target/Mips/Mips16HardFloat.cpp
lib/Target/Mips/MipsAsmPrinter.cpp
lib/Target/Mips/MipsAsmPrinter.h
test/CodeGen/Mips/fptr2.ll [deleted file]
test/CodeGen/Mips/inlineasm-assembler-directives.ll [new file with mode: 0644]
test/CodeGen/Mips/inlineasm-cnstrnt-reg.ll
test/CodeGen/Mips/inlineasmmemop.ll