History log of /external/llvm/lib/CodeGen/AsmPrinter/AsmPrinterInlineAsm.cpp
Revision Date Author Comments (<<< Hide modified files) (Show modified files >>>)
4945246327db36405447bc67c14bf26aaeb120e4 13-Mar-2013 Stephen Hines <srhines@google.com> Fix ifdef-related differences from upstream LLVM.

Change-Id: I207500ca8b24afaa976077771cacb20d28a8a31a
/external/llvm/lib/CodeGen/AsmPrinter/AsmPrinterInlineAsm.cpp
5adb136be579e8fff3734461580cb34d1d2983b8 06-Mar-2013 Stephen Hines <srhines@google.com> Merge commit 'b3201c5cf1e183d840f7c99ff779d57f1549d8e5' into merge_20130226

Conflicts:
include/llvm/Support/ELF.h
lib/Support/DeltaAlgorithm.cpp

Change-Id: I24a4fbce62eb39d924efee3c687b55e1e17b30cd
f64c889cc94417322b0ff8ad1c61939183bf3c38 11-Feb-2013 Bob Wilson <bob.wilson@apple.com> Revert "Rename LLVMContext diagnostic handler types and functions."

This reverts my commit 171047. Now that I've removed my misguided attempt to
support backend warnings, these diagnostics are only about inline assembly.
It would take quite a bit more work to generalize them properly, so I'm
just reverting this.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@174860 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/AsmPrinter/AsmPrinterInlineAsm.cpp
059800f9e3fee2852672f846d91a2da14da7783a 21-Jan-2013 Stephen Hines <srhines@google.com> Merge remote-tracking branch 'upstream/master' into merge-llvm

Conflicts:
lib/CodeGen/AsmPrinter/AsmPrinter.cpp
lib/CodeGen/AsmPrinter/AsmPrinterInlineAsm.cpp
lib/MC/MCAssembler.cpp
lib/Support/Atomic.cpp
lib/Support/Memory.cpp
lib/Target/ARM/ARMJITInfo.cpp

Change-Id: Ib339baf88df5b04870c8df1bedcfe1f877ccab8d
0b8c9a80f20772c3793201ab5b251d3520b9cea3 02-Jan-2013 Chandler Carruth <chandlerc@gmail.com> Move all of the header files which are involved in modelling the LLVM IR
into their new header subdirectory: include/llvm/IR. This matches the
directory structure of lib, and begins to correct a long standing point
of file layout clutter in LLVM.

There are still more header files to move here, but I wanted to handle
them in separate commits to make tracking what files make sense at each
layer easier.

The only really questionable files here are the target intrinsic
tablegen files. But that's a battle I'd rather not fight today.

I've updated both CMake and Makefile build systems (I think, and my
tests think, but I may have missed something).

I've also re-sorted the includes throughout the project. I'll be
committing updates to Clang, DragonEgg, and Polly momentarily.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@171366 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/AsmPrinter/AsmPrinterInlineAsm.cpp
04de315694d441de4dbdf52b3ff41b2fe6803646 25-Dec-2012 Bob Wilson <bob.wilson@apple.com> Rename LLVMContext diagnostic handler types and functions.

These are now generally used for all diagnostics from the backend, not just
for inline assembly, so this drops the "InlineAsm" from the names. No
functional change. (I've left aliases for the old names but only for long
enough to let me switch over clang to use the new ones.)

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@171047 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/AsmPrinter/AsmPrinterInlineAsm.cpp
d04a8d4b33ff316ca4cf961e06c9e312eff8e64f 03-Dec-2012 Chandler Carruth <chandlerc@gmail.com> Use the new script to sort the includes of every file under lib.

Sooooo many of these had incorrect or strange main module includes.
I have manually inspected all of these, and fixed the main module
include to be the nearest plausible thing I could find. If you own or
care about any of these source files, I encourage you to take some time
and check that these edits were sensible. I can't have broken anything
(I strictly added headers, and reordered them, never removed), but they
may not be the headers you'd really like to identify as containing the
API being implemented.

Many forward declarations and missing includes were added to a header
files to allow them to parse cleanly when included first. The main
module rule does in fact have its merits. =]

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@169131 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/AsmPrinter/AsmPrinterInlineAsm.cpp
a7b159ccdd3531853dc49dd91cf8948ce382e1c1 11-Sep-2012 Chad Rosier <mcrosier@apple.com> [ms-inline asm] Split the parsing of IR asm strings into GCC and MS variants.
Add support in the EmitMSInlineAsmStr() function for handling integer consts.



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@163645 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/AsmPrinter/AsmPrinterInlineAsm.cpp
1c4ad5ef4fab105f0c8af7edd026e00502fb6279 11-Sep-2012 Stephen Hines <srhines@google.com> Merge branch 'upstream' into merge-2012_09_10

Conflicts:
lib/CodeGen/AsmPrinter/AsmPrinterInlineAsm.cpp
lib/Support/DynamicLibrary.cpp
lib/Support/LockFileManager.cpp

Change-Id: I91e94c3a7a76e19c688307c5a480a640a3bd2b7e
24f5fddbdff3d54d822555ae792a7f3bb22e342f 10-Sep-2012 Chad Rosier <mcrosier@apple.com> [ms-inline asm] Properly emit the asm directives when the AsmPrinterVariant
and InlineAsmVariant don't match.



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@163550 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/AsmPrinter/AsmPrinterInlineAsm.cpp
3b132fab0bebe7186348d7ab0e2663c9fddab3bb 10-Sep-2012 Chad Rosier <mcrosier@apple.com> [ms-inline asm] Pass the correct AsmVariant to the PrintAsmOperand() function
and update the printOperand() function accordingly.



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@163544 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/AsmPrinter/AsmPrinterInlineAsm.cpp
26c5d5f0a93640008ccd01554b9c26e1e42dc892 07-Sep-2012 Chad Rosier <mcrosier@apple.com> Fix indent.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@163416 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/AsmPrinter/AsmPrinterInlineAsm.cpp
c53ade2889c85207e064e4c3d049383ffffb3319 07-Sep-2012 Chad Rosier <mcrosier@apple.com> Update function names to conform to guidelines. No functional change intended.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@163401 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/AsmPrinter/AsmPrinterInlineAsm.cpp
366df7945f0e65052d2e1df701ae1fd16b943642 06-Sep-2012 Chad Rosier <mcrosier@apple.com> [ms-inline asm] Use the asm dialect from the MI to set the parser dialect.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@163273 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/AsmPrinter/AsmPrinterInlineAsm.cpp
7744acd1ab73b3eec6f1449f47083abe3fb1b527 03-Aug-2012 Shih-wei Liao <sliao@google.com> Merge with LLVM upstream r160668 (Jul 24th 2012)

Conflicts:
include/llvm/Support/ELF.h
lib/CodeGen/AsmPrinter/AsmPrinter.cpp
lib/Support/Memory.cpp
lib/Transforms/Instrumentation/AddressSanitizer.cpp

Change-Id: Iddd658cf2eadc7165b2805b446d31af2c5c9917f
4db98becf798a013ee00b82691af154e261d648e 21-Jun-2012 Jack Carter <jcarter@mips.com> The inline asm operand modifier 'n' is suppose
to be generic across architectures. It has the
following description in the gnu sources:

Negate the immediate constant

Several Architectures such as x86 have local implementations
of operand modifier 'n' which go beyond the above description
slightly. This won't affect them.

Affected files:

lib/CodeGen/AsmPrinter/AsmPrinterInlineAsm.cpp
Added 'n' to the switch cases.

test/CodeGen/Generic/asm-large-immediate.ll
Generic compiled test (x86 for me)

test/CodeGen/Mips/asm-large-immediate.ll
Mips compiled version of the generic one

Contributer: Jack Carter



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@158939 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/AsmPrinter/AsmPrinterInlineAsm.cpp
d5e11ad51a3966c0b80ce2119946cd1aa3558aec 21-Jun-2012 Jack Carter <jcarter@mips.com> The inline asm operand modifier 'c' is suppose
to be generic across architectures. It has the
following description in the gnu sources:

Substitute immediate value without immediate syntax

Several Architectures such as x86 have local implementations
of operand modifier 'c' which go beyond the above description
slightly. To make use of the generic modifiers without overriding
local implementation one can make a call to the base class method
for AsmPrinter::PrintAsmOperand() in the locally derived method's
"default" case in the switch statement. That way if it is already
defined locally the generic version will never get called.

This change is needed when test/CodeGen/generic/asm-large-immediate.ll
failed on a native Mips board. The test was assuming a generic
implementation was in place.

Affected files:

lib/Target/Mips/MipsAsmPrinter.cpp:
Changed the default case to call the base method.
lib/CodeGen/AsmPrinter/AsmPrinterInlineAsm.cpp
Added 'c' to the switch cases.
test/CodeGen/Mips/asm-large-immediate.ll
Mips compiled version of the generic one

Contributer: Jack Carter



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@158925 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/AsmPrinter/AsmPrinterInlineAsm.cpp
9318e484de290b46192e834eb8feca18e0ece153 08-May-2012 Akira Hatanaka <ahatanaka@mips.com> Formatting fixes.

Patch by Jack Carter.



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@156409 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/AsmPrinter/AsmPrinterInlineAsm.cpp
cf5a1461acaace0f3e7d11fbbcfbf635b8c8ea9d 24-Apr-2012 Shih-wei Liao <sliao@google.com> Merge with LLVM upstream r155090.

Conflicts:
lib/Support/Unix/PathV2.inc

Change-Id: I7b89833849f6cbcfa958a33a971d0f7754c9cb2c
aa206ffa6bf160f90d0d3aae5745ae4abf2d98fa 22-Mar-2012 Eric Christopher <echristo@apple.com> In erroneous inline assembly we could mistakenly try to access the
metadata operand as an actual operand, leading to an assert. Error
out in this case.

rdar://11007633

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@153234 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/AsmPrinter/AsmPrinterInlineAsm.cpp
0ebc07a576037e4e36f68bf5cece32740ca120c0 19-Oct-2011 Logan Chien <loganchien@google.com> Merge with LLVM upstream 2011/10/20 (r142530)

Conflicts:
lib/Support/Unix/Host.inc

Change-Id: Idc00db3b63912dca6348bddd9f8a1af2a8d5d147
fe59d853c6bee18aeca1da5f703fc442068853a7 21-Sep-2011 Jim Grosbach <grosbach@apple.com> Tidy up. Whitepsace.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@140275 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/AsmPrinter/AsmPrinterInlineAsm.cpp
3e74d6fdd248e20a280f1dff3da9a6c689c2c4c3 24-Aug-2011 Evan Cheng <evan.cheng@apple.com> Move TargetRegistry and TargetSelect from Target to Support where they belong.
These are strictly utilities for registering targets and components.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@138450 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/AsmPrinter/AsmPrinterInlineAsm.cpp
1b84cce77f8bccc905b4800927ce9016f76c1c40 16-Aug-2011 Jim Grosbach <grosbach@apple.com> Remove unused Target argument from AsmParser construction methods.

The argument is unused, and is a layering violation in any case.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@137735 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/AsmPrinter/AsmPrinterInlineAsm.cpp
94b9550a32d189704a8eae55505edf62662c0534 26-Jul-2011 Evan Cheng <evan.cheng@apple.com> Rename TargetAsmParser to MCTargetAsmParser and TargetAsmLexer to MCTargetAsmLexer; rename createAsmLexer to createMCAsmLexer and createAsmParser to createMCAsmParser.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@136027 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/AsmPrinter/AsmPrinterInlineAsm.cpp
a7cfc08ebe737062917b442830eb5321b0f79e89 23-Jul-2011 Evan Cheng <evan.cheng@apple.com> Move TargetAsmParser.h TargetAsmBackend.h and TargetAsmLexer.h to MC where they belong.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@135833 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/AsmPrinter/AsmPrinterInlineAsm.cpp
a71642b2a4944eaa269d881cf71b02b8e8fe5638 16-Jul-2011 Nowar Gu <nowar100@gmail.com> Merge upstream to r135343 at Sat. 16th July 2011.
ffc0e73046f737d75e0a62b3a83ef19bcef111e3 09-Jul-2011 Evan Cheng <evan.cheng@apple.com> Change createAsmParser to take a MCSubtargetInfo instead of triple,
CPU, and feature string. Parsing some asm directives can change
subtarget state (e.g. .code 16) and it must be reflected in other
modules (e.g. MCCodeEmitter). That is, the MCSubtargetInfo instance
must be shared.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@134795 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/AsmPrinter/AsmPrinterInlineAsm.cpp
ebdeeab812beec0385b445f3d4c41a114e0d972f 08-Jul-2011 Evan Cheng <evan.cheng@apple.com> Eliminate asm parser's dependency on TargetMachine:
- Each target asm parser now creates its own MCSubtatgetInfo (if needed).
- Changed AssemblerPredicate to take subtarget features which tablegen uses
to generate asm matcher subtarget feature queries. e.g.
"ModeThumb,FeatureThumb2" is translated to
"(Bits & ModeThumb) != 0 && (Bits & FeatureThumb2) != 0".


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@134678 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/AsmPrinter/AsmPrinterInlineAsm.cpp
b5530586d68bd25831a6796b5d3199cb0769a35c 09-Mar-2011 Jush Lu <jush.msn@gmail.com> Merge upstream r127116
4d03e416be8cf1f0f502118826b7cbaeec0b79b2 28-Feb-2011 jush <jush.msn@gmail.com> Merge LLVM upstream r119309 into honey
c36b7069b42bece963b7e6adf020353ce990ef76 08-Jan-2011 Evan Cheng <evan.cheng@apple.com> Do not model all INLINEASM instructions as having unmodelled side effects.
Instead encode llvm IR level property "HasSideEffects" in an operand (shared
with IsAlignStack). Added MachineInstrs::hasUnmodeledSideEffects() to check
the operand when the instruction is an INLINEASM.

This allows memory instructions to be moved around INLINEASM instructions.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@123044 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/AsmPrinter/AsmPrinterInlineAsm.cpp
ce1b9ad539e67c6d05cc6b47ca5f6e62a6d91eff 17-Nov-2010 Chris Lattner <sabre@nondot.org> With the newly simplified SourceMgr interfaces and the generalized
SrcMgrDiagHandler, we can improve clang diagnostics for inline asm:
instead of reporting them on a source line of the original line,
we can report it on the correct line wherever the string literal came
from. For something like this:

void foo() {
asm("push %rax\n"
".code32\n");
}

we used to get this: (note that the line in t.c isn't helpful)

t.c:4:7: error: warning: ignoring directive for now
asm("push %rax\n"
^
<inline asm>:2:1: note: instantiated into assembly here
.code32
^

now we get:

t.c:5:8: error: warning: ignoring directive for now
".code32\n"
^
<inline asm>:2:1: note: instantiated into assembly here
.code32
^

Note that we're pointing to line 5 properly now.



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@119488 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/AsmPrinter/AsmPrinterInlineAsm.cpp
4afa12890f679034e9741a687a6ce33f2846f129 17-Nov-2010 Chris Lattner <sabre@nondot.org> now that AsmPrinter::EmitInlineAsm is factored right, we can eliminate the
cookie argument to the SourceMgr diagnostic stuff. This cleanly separates
LLVMContext's inlineasm handler from the sourcemgr error handling
definition, increasing type safety and cleaning things up.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@119486 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/AsmPrinter/AsmPrinterInlineAsm.cpp
6e30c6a1d32f187804d24ecd1868d63c60330b22 17-Nov-2010 Chris Lattner <sabre@nondot.org> rearrange how the handler in SourceMgr is installed, eliminating the use of
the cookie argument to setDiagHandler


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@119483 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/AsmPrinter/AsmPrinterInlineAsm.cpp
a38941d458273946594d3592ed5debdc9730db08 17-Nov-2010 Chris Lattner <sabre@nondot.org> refactor the interface to EmitInlineAsm a bit, no functionality change.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@119482 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/AsmPrinter/AsmPrinterInlineAsm.cpp
ce027318293ddd2a0ea0cab4e9fa6af059d3bed2 02-Oct-2010 Jim Grosbach <grosbach@apple.com> Nuke trailing whitespace.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@115377 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/AsmPrinter/AsmPrinterInlineAsm.cpp
2b2de24fe2bdbe0c533bab2208f4b666ea0d6e86 02-Oct-2010 Jim Grosbach <grosbach@apple.com> Nuke trailing whitespace.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@115377 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/AsmPrinter/AsmPrinterInlineAsm.cpp
da61c1662bd86ea1f7fad601e9966f1b700636c1 11-Sep-2010 Shih-wei Liao <sliao@google.com> Merge commit '69494cf8102cf872e9cb76662e9960be7c112112' into HEAD

Conflicts:
lib/CodeGen/AsmPrinter/AsmPrinter.cpp
lib/Target/ARM/ARMCodeEmitter.cpp
lib/Target/ARM/ARMJITInfo.cpp
lib/Target/ARM/ARMRelocations.h
lib/Transforms/IPO/MergeFunctions.cpp

Change-Id: I23d40983717e072fa49334c1fa54f2cf961476c7
a3692dad3ef77c2a5e846f2324927e3ee0afee78 19-Jul-2010 Daniel Dunbar <daniel@zuster.org> Target: Give the TargetAsmParser access to the TargetMachine.
- Unfortunate, but necessary for now to handle subtarget instruction matching. Eventually we should factor out the lower level target machine information so we don't need to do this.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@108664 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/AsmPrinter/AsmPrinterInlineAsm.cpp
d73ada7d24832bc2a4c3965b8f00ffd951341acf 19-Jul-2010 Daniel Dunbar <daniel@zuster.org> Target: Give the TargetAsmParser access to the TargetMachine.
- Unfortunate, but necessary for now to handle subtarget instruction matching. Eventually we should factor out the lower level target machine information so we don't need to do this.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@108664 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/AsmPrinter/AsmPrinterInlineAsm.cpp
dd7297238f1bcc0edcde64c64a3bb7465aa2f194 18-Jul-2010 Daniel Dunbar <daniel@zuster.org> MC: Move several clients to using AsmParser constructor function.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@108645 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/AsmPrinter/AsmPrinterInlineAsm.cpp
9fbb37e10d3b2814877bb8d2893d863fe1da660b 18-Jul-2010 Daniel Dunbar <daniel@zuster.org> MC: Move several clients to using AsmParser constructor function.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@108645 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/AsmPrinter/AsmPrinterInlineAsm.cpp
d0c6a6bdc440b527399822b8c3fad444b816b3e0 15-Jul-2010 Chris Lattner <sabre@nondot.org> a more graceful fix for test/Other/inline-asm-newline-terminator.ll,
follow on to r103765


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@108390 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/AsmPrinter/AsmPrinterInlineAsm.cpp
b5b73c4c86b68e5edc3d3fceff28e852c1141b7f 15-Jul-2010 Chris Lattner <sabre@nondot.org> a more graceful fix for test/Other/inline-asm-newline-terminator.ll,
follow on to r103765


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@108390 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/AsmPrinter/AsmPrinterInlineAsm.cpp
908c105be3c4c20123d2d45f434386039aada840 02-Jul-2010 Dale Johannesen <dalej@apple.com> Propagate the AlignStack bit in InlineAsm's to the
PrologEpilog code, and use it to determine whether
the asm forces stack alignment or not. gcc consistently
does not do this for GCC-style asms; Apple gcc inconsistently
sometimes does it for asm blocks. There is no
convenient place to put a bit in either the SDNode or
the MachineInstr form, so I've added an extra operand
to each; unlovely, but it does allow for expansion for
more bits, should we need it. PR 5125. Some
existing testcases are affected.
The operand lists of the SDNode and MachineInstr forms
are indexed with awesome mnemonics, like "2"; I may
fix this someday, but not now. I'm not making it any
worse. If anyone is inspired I think you can find all
the right places from this patch.



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@107506 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/AsmPrinter/AsmPrinterInlineAsm.cpp
f1e309eb4862459a76445942ba4dafc433b6f317 02-Jul-2010 Dale Johannesen <dalej@apple.com> Propagate the AlignStack bit in InlineAsm's to the
PrologEpilog code, and use it to determine whether
the asm forces stack alignment or not. gcc consistently
does not do this for GCC-style asms; Apple gcc inconsistently
sometimes does it for asm blocks. There is no
convenient place to put a bit in either the SDNode or
the MachineInstr form, so I've added an extra operand
to each; unlovely, but it does allow for expansion for
more bits, should we need it. PR 5125. Some
existing testcases are affected.
The operand lists of the SDNode and MachineInstr forms
are indexed with awesome mnemonics, like "2"; I may
fix this someday, but not now. I'm not making it any
worse. If anyone is inspired I think you can find all
the right places from this patch.



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@107506 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/AsmPrinter/AsmPrinterInlineAsm.cpp
58b651de4926fb540218be70049c896d0ec53bb9 01-Jul-2010 Daniel Dunbar <daniel@zuster.org> MC: Pass the target instance to the AsmParser constructor.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@107426 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/AsmPrinter/AsmPrinterInlineAsm.cpp
9186fa6b0c8806786cae78bed50f95d1c7ce2b00 01-Jul-2010 Daniel Dunbar <daniel@zuster.org> MC: Pass the target instance to the AsmParser constructor.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@107426 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/AsmPrinter/AsmPrinterInlineAsm.cpp
f09bec35d06ca60cff9af63b36b54f84ef5d4d6f 14-May-2010 Daniel Dunbar <daniel@zuster.org> Inline Asm: Ensure buffer is newline terminated to match how the text is printed.
- This is a hack, but I can't decide the best place to handle this. Chris?

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@103765 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/AsmPrinter/AsmPrinterInlineAsm.cpp
d11d59e35a977e65387c3033dd7b0b7af5641f1e 14-May-2010 Daniel Dunbar <daniel@zuster.org> Inline Asm: Ensure buffer is newline terminated to match how the text is printed.
- This is a hack, but I can't decide the best place to handle this. Chris?

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@103765 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/AsmPrinter/AsmPrinterInlineAsm.cpp
a59a85f8dd03d52907019f1a4caaf7653b01b7d3 29-Apr-2010 Shih-wei Liao <sliao@google.com> For disassembler

Change-Id: I14e64ec4640cbeb57ac87473775e8ba8a7320b3f
/external/llvm/lib/CodeGen/AsmPrinter/AsmPrinterInlineAsm.cpp
7abe37e4aee38cc79d91dd069a37d7e91d5bef53 28-Apr-2010 Shih-wei Liao <sliao@google.com> Sync upstream to r102410.
Re-turn on sdk.

Change-Id: I91a890863989a67243b4d2dfd1ae09b843ebaeaf
/external/llvm/lib/CodeGen/AsmPrinter/AsmPrinterInlineAsm.cpp
fe5adeb63d07b93aa85df0fc1abd37cadd98be35 08-Apr-2010 Chris Lattner <sabre@nondot.org> implicit defs get added to the end of machine instrs sometimes. Scan the whole instruction for the metadata operand instead of assuming it will be at the end of the instruction.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@100792 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/AsmPrinter/AsmPrinterInlineAsm.cpp
d0024fec256659b45350387289e5d4520f15dc6d 08-Apr-2010 Chris Lattner <sabre@nondot.org> implicit defs get added to the end of machine instrs sometimes. Scan the whole instruction for the metadata operand instead of assuming it will be at the end of the instruction.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@100792 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/AsmPrinter/AsmPrinterInlineAsm.cpp
b8f832d331b5206b235262e4395b969d68cf439c 08-Apr-2010 Benjamin Kramer <benny.kra@googlemail.com> Use twines to simplify calls to report_fatal_error. For code size and readability.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@100756 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/AsmPrinter/AsmPrinterInlineAsm.cpp
1bd7335a17010bd4d8f86736cf73cac9f3fb80a5 08-Apr-2010 Benjamin Kramer <benny.kra@googlemail.com> Use twines to simplify calls to report_fatal_error. For code size and readability.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@100756 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/AsmPrinter/AsmPrinterInlineAsm.cpp
1178502ccf73f08434a82444def11c8e7d310d28 08-Apr-2010 Chris Lattner <sabre@nondot.org> introduce a new recoverable error handling API to LLVMContext
and use it in one place in inline asm handling stuff. Before
we'd generate this for an invalid modifier letter:

$ clang asm.c -c -o t.o
fatal error: error in backend: Invalid operand found in inline asm: 'abc incl ${0:Z}'
INLINEASM <es:abc incl ${0:Z}>, 10, %EAX<def>, 2147483657, %EAX, 14, %EFLAGS<earlyclobber,def,dead>, <!-1>


Now we generate this:

$ clang asm.c -c -o t.o
error: invalid operand in inline asm: 'incl ${0:Z}'
asm.c:3:12: note: generated from here
__asm__ ("incl %Z0" : "+r" (X));
^
1 error generated.

This is much better but still admittedly not great ("why" is the operand
invalid??), codegen should try harder with its diagnostics :)



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@100723 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/AsmPrinter/AsmPrinterInlineAsm.cpp
38686bdffdebc09aa6fe6b8b54b34ac32c753f59 08-Apr-2010 Chris Lattner <sabre@nondot.org> introduce a new recoverable error handling API to LLVMContext
and use it in one place in inline asm handling stuff. Before
we'd generate this for an invalid modifier letter:

$ clang asm.c -c -o t.o
fatal error: error in backend: Invalid operand found in inline asm: 'abc incl ${0:Z}'
INLINEASM <es:abc incl ${0:Z}>, 10, %EAX<def>, 2147483657, %EAX, 14, %EFLAGS<earlyclobber,def,dead>, <!-1>


Now we generate this:

$ clang asm.c -c -o t.o
error: invalid operand in inline asm: 'incl ${0:Z}'
asm.c:3:12: note: generated from here
__asm__ ("incl %Z0" : "+r" (X));
^
1 error generated.

This is much better but still admittedly not great ("why" is the operand
invalid??), codegen should try harder with its diagnostics :)



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@100723 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/AsmPrinter/AsmPrinterInlineAsm.cpp
8316f2d3810dd37bae0f847bc3efd495432b5893 08-Apr-2010 Chris Lattner <sabre@nondot.org> rename llvm::llvm_report_error -> llvm::report_fatal_error



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@100709 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/AsmPrinter/AsmPrinterInlineAsm.cpp
75361b69f3f327842b9dad69fa7f28ae3b688412 08-Apr-2010 Chris Lattner <sabre@nondot.org> rename llvm::llvm_report_error -> llvm::report_fatal_error



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@100709 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/AsmPrinter/AsmPrinterInlineAsm.cpp
bafc8377097d73be2dbc1a4cf344a50ac9e69fe8 07-Apr-2010 Chris Lattner <sabre@nondot.org> Have the inst emitter add the !srcloc mdnode to the machine instr.
Have the asmprinter use the mdnode to scavenge a source location if
present. Document this nonsense in langref.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@100607 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/AsmPrinter/AsmPrinterInlineAsm.cpp
cf9a415182aca6a432105a2a12168e1049de180a 07-Apr-2010 Chris Lattner <sabre@nondot.org> Have the inst emitter add the !srcloc mdnode to the machine instr.
Have the asmprinter use the mdnode to scavenge a source location if
present. Document this nonsense in langref.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@100607 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/AsmPrinter/AsmPrinterInlineAsm.cpp
2ad3cb174a3ad3dbf7b921ea70bc2c2f51de4624 07-Apr-2010 Chris Lattner <sabre@nondot.org> remove another magic number.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@100606 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/AsmPrinter/AsmPrinterInlineAsm.cpp
fee455ea6a7e209a3cac5fc8e601f8e85cfb3792 07-Apr-2010 Chris Lattner <sabre@nondot.org> remove another magic number.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@100606 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/AsmPrinter/AsmPrinterInlineAsm.cpp
4cd8b2a2086cf865b7592920999e6c1bca92b1e9 06-Apr-2010 Chris Lattner <sabre@nondot.org> propagate cookie management out one layer of function calls.



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@100510 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/AsmPrinter/AsmPrinterInlineAsm.cpp
885d94143d0fc02fd5c4ddf1d2a2ee74c7934bff 06-Apr-2010 Chris Lattner <sabre@nondot.org> propagate cookie management out one layer of function calls.



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@100510 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/AsmPrinter/AsmPrinterInlineAsm.cpp
890972db38ba77cc983c4ccdce8f068c45945925 06-Apr-2010 Chris Lattner <sabre@nondot.org> report errors through LLVMContext's inline asm handler if available.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@100509 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/AsmPrinter/AsmPrinterInlineAsm.cpp
6eb7806a5f5edf460e68f52bdd0fad25f7771873 06-Apr-2010 Chris Lattner <sabre@nondot.org> report errors through LLVMContext's inline asm handler if available.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@100509 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/AsmPrinter/AsmPrinterInlineAsm.cpp
76a8ffffa1f89e17ce3f5c207d7231a354b161e6 06-Apr-2010 Chris Lattner <sabre@nondot.org> Give AsmParser an option to control whether it finalizes
the stream. New demo:

$ clang asm.c -S -o - -emit-llvm | llc -filetype=obj -o t.o
$ otool -tv t.o
t.o:
(__TEXT,__text) section
_foo:
0000000000000000 subq $0x08,%rsp
0000000000000004 movl %edi,(%rsp)
0000000000000007 movl %edi,%eax
0000000000000009 incl %eax
000000000000000b movl %eax,(%rsp)
000000000000000e movl %eax,0x04(%rsp)
0000000000000012 addq $0x08,%rsp
0000000000000016 ret



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@100492 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/AsmPrinter/AsmPrinterInlineAsm.cpp
79180e2ef5ff4aa3c8f64b13736e8648663f3965 06-Apr-2010 Chris Lattner <sabre@nondot.org> Give AsmParser an option to control whether it finalizes
the stream. New demo:

$ clang asm.c -S -o - -emit-llvm | llc -filetype=obj -o t.o
$ otool -tv t.o
t.o:
(__TEXT,__text) section
_foo:
0000000000000000 subq $0x08,%rsp
0000000000000004 movl %edi,(%rsp)
0000000000000007 movl %edi,%eax
0000000000000009 incl %eax
000000000000000b movl %eax,(%rsp)
000000000000000e movl %eax,0x04(%rsp)
0000000000000012 addq $0x08,%rsp
0000000000000016 ret



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@100492 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/AsmPrinter/AsmPrinterInlineAsm.cpp
dd9d85d2fe017801e0090bf89bb3706b9ebacf2d 06-Apr-2010 Chris Lattner <sabre@nondot.org> add .o file writing for inline asm in llc. Here's a silly
demo:

$ clang asm.c -S -o - -emit-llvm | llc -filetype=obj -o t.o
<inline asm>:1:2: error: unrecognized instruction
abc incl %eax
^
LLVM ERROR: Error parsing inline asm

Only problem seems to be that the parser finalizes OutStreamer
at the end of the first inline asm, which isn't what we want.
For example:

$ cat asm.c
int foo(int X) {
__asm__ ("incl %0" : "+r" (X));
return X;
}
$ clang asm.c -S -o - -emit-llvm | llc
...
subq $8, %rsp
movl %edi, (%rsp)
movl %edi, %eax
## InlineAsm Start
incl %eax
## InlineAsm End
movl %eax, (%rsp)
movl %eax, 4(%rsp)
addq $8, %rsp
ret
$ clang asm.c -S -o - -emit-llvm | llc -filetype=obj -o t.o
$ otool -tv t.o
t.o:
(__TEXT,__text) section
_foo:
0000000000000000 subq $0x08,%rsp
0000000000000004 movl %edi,(%rsp)
0000000000000007 movl %edi,%eax
0000000000000009 incl %eax
$

don't stop at inc!



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@100491 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/AsmPrinter/AsmPrinterInlineAsm.cpp
af632c91a0090d8448dd10e48d8ce53f31be0a21 06-Apr-2010 Chris Lattner <sabre@nondot.org> add .o file writing for inline asm in llc. Here's a silly
demo:

$ clang asm.c -S -o - -emit-llvm | llc -filetype=obj -o t.o
<inline asm>:1:2: error: unrecognized instruction
abc incl %eax
^
LLVM ERROR: Error parsing inline asm

Only problem seems to be that the parser finalizes OutStreamer
at the end of the first inline asm, which isn't what we want.
For example:

$ cat asm.c
int foo(int X) {
__asm__ ("incl %0" : "+r" (X));
return X;
}
$ clang asm.c -S -o - -emit-llvm | llc
...
subq $8, %rsp
movl %edi, (%rsp)
movl %edi, %eax
## InlineAsm Start
incl %eax
## InlineAsm End
movl %eax, (%rsp)
movl %eax, 4(%rsp)
addq $8, %rsp
ret
$ clang asm.c -S -o - -emit-llvm | llc -filetype=obj -o t.o
$ otool -tv t.o
t.o:
(__TEXT,__text) section
_foo:
0000000000000000 subq $0x08,%rsp
0000000000000004 movl %edi,(%rsp)
0000000000000007 movl %edi,%eax
0000000000000009 incl %eax
$

don't stop at inc!



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@100491 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/AsmPrinter/AsmPrinterInlineAsm.cpp
7fb59c6cad5a7e3ae621e0fedcbc67fea3ea13fe 06-Apr-2010 Chris Lattner <sabre@nondot.org> stringref-ize the MemoryBuffer::get apis. This requires
a co-committed clang patch.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@100485 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/AsmPrinter/AsmPrinterInlineAsm.cpp
4c842dda3939c6b9f83ba7e8e19e43445cd9a832 06-Apr-2010 Chris Lattner <sabre@nondot.org> stringref-ize the MemoryBuffer::get apis. This requires
a co-committed clang patch.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@100485 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/AsmPrinter/AsmPrinterInlineAsm.cpp
26be1c167a76e02cc0f37a9a81115b9ad05c0fc6 04-Apr-2010 Chris Lattner <sabre@nondot.org> move uleb/sleb printing into AsmPrinter from DwarfPrinter.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@100344 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/AsmPrinter/AsmPrinterInlineAsm.cpp
7e1a8f882f1baa1c0d5204373d6eb4cb7fc9f3ea 04-Apr-2010 Chris Lattner <sabre@nondot.org> move uleb/sleb printing into AsmPrinter from DwarfPrinter.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@100344 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/AsmPrinter/AsmPrinterInlineAsm.cpp
a29bbb7cebddd0b111c04b2faa3bbe7ecd82ae32 04-Apr-2010 Chris Lattner <sabre@nondot.org> use stringref instead of strtol to avoid errno gymnastics.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@100341 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/AsmPrinter/AsmPrinterInlineAsm.cpp
65eeaad91d78b2a677ca889eaff60f6d807c7030 04-Apr-2010 Chris Lattner <sabre@nondot.org> use stringref instead of strtol to avoid errno gymnastics.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@100341 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/AsmPrinter/AsmPrinterInlineAsm.cpp
599df3c3c817cbf1839a29a321a955cfbd1e091a 04-Apr-2010 Chris Lattner <sabre@nondot.org> split inline asm support out to its own .cpp file.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@100340 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/AsmPrinter/AsmPrinterInlineAsm.cpp
736e31d0cfd8a28c31741f39be606a11e7fc0036 04-Apr-2010 Chris Lattner <sabre@nondot.org> split inline asm support out to its own .cpp file.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@100340 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/AsmPrinter/AsmPrinterInlineAsm.cpp