History log of /external/llvm/test/MC/MachO/previous.s
Revision Date Author Comments (<<< Hide modified files) (Show modified files >>>)
ef920552d4fb0959097f1c165cfc81c69db19934 08-Aug-2012 Bill Wendling <isanbard@gmail.com> Add `.pushsection', `.popsection', and `.previous' directives to Darwin ASM.

There are situations where inline ASM may want to change the section -- for
instance, to create a variable in the .data section. However, it cannot do this
without (potentially) restoring to the wrong section. E.g.:

asm volatile (".section __DATA, __data\n\t"
".globl _fnord\n\t"
"_fnord: .quad 1f\n\t"
".text\n\t"
"1:" :::);

This may be wrong if this is inlined into a function that has a "section"
attribute. The user should use `.pushsection' and `.popsection' here instead.

The addition of `.previous' is added for completeness.
<rdar://problem/12048387>


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@161477 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/test/MC/MachO/previous.s