]> granicus.if.org Git - llvm/commit
Merging r224425:
authorDaniel Sanders <daniel.sanders@imgtec.com>
Fri, 6 Mar 2015 11:39:52 +0000 (11:39 +0000)
committerDaniel Sanders <daniel.sanders@imgtec.com>
Fri, 6 Mar 2015 11:39:52 +0000 (11:39 +0000)
commit89ee039cd416b217d8bc558fa56a516429c8a251
tree64e9512f18924c57beb140a78f9dd6e823b3bed1
parent3682830c9eade5a82b902104610e0f826a7e91e5
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@231462 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