Commit Graph

39 Commits

Author SHA1 Message Date
David Majnemer 0dcea0929b CodeGen: Simplify consecutive '%' modifiers
LLVM the consecutive '%' modifiers are redundant, skip them.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@225602 91177308-0d34-0410-b5e6-96231b3b80d8
2015-01-11 09:13:56 +00:00
David Majnemer 1bd59c97fb CodeGen: Simplify consecutive '&' modifiers
LLVM the consecutive '&' modifiers are redundant, skip them.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@225601 91177308-0d34-0410-b5e6-96231b3b80d8
2015-01-11 09:09:01 +00:00
David Majnemer f685eac9e6 CodeGen: Let arrays be inputs to inline asm
An array showing up in an inline assembly input is accepted in ICC and
GCC 4.8

This fixes PR20201.

Differential Revision: http://reviews.llvm.org/D4382

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@212954 91177308-0d34-0410-b5e6-96231b3b80d8
2014-07-14 16:27:53 +00:00
Ulrich Weigand e6b3dbae38 Handle '*' and '#' asm constraint modifiers.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@166924 91177308-0d34-0410-b5e6-96231b3b80d8
2012-10-29 12:20:54 +00:00
Chad Rosier 74896e0748 [ms-inline asm] Use the new Inline Asm Non-Standard Dialect attribute.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@161642 91177308-0d34-0410-b5e6-96231b3b80d8
2012-08-10 00:00:34 +00:00
Eric Christopher c5f9a011a5 Add support for AVX registers to clang inline asm. Add a small testcase
and update the Sema testcase with a register that we won't hit for a while
I hope.

Fixes rdar://10510405

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@145671 91177308-0d34-0410-b5e6-96231b3b80d8
2011-12-02 02:12:16 +00:00
Eric Christopher 93bfd79997 Clean up some oddly gratuitous vertical whitespace.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@145670 91177308-0d34-0410-b5e6-96231b3b80d8
2011-12-02 02:12:12 +00:00
Eric Christopher 867a379acd Rename function.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@145669 91177308-0d34-0410-b5e6-96231b3b80d8
2011-12-02 02:12:09 +00:00
Peter Collingbourne 93f1322684 Fix assertion failure in CodeGen where the input operand to an asm
instruction is tied to an output operand which is a pointer, and
the input operand is narrower than the output operand.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@136438 91177308-0d34-0410-b5e6-96231b3b80d8
2011-07-29 00:24:50 +00:00
Chris Lattner 9f5bff086c fix PR10415, tidying up IR representation of module level inline asm
to avoid extraneous \n's.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@135862 91177308-0d34-0410-b5e6-96231b3b80d8
2011-07-23 20:04:25 +00:00
Eric Christopher 78b929121f Add a testcase for the previous commit and update an existing test for an
extra register.

Part of PR10299 and rdar://9740322

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@134657 91177308-0d34-0410-b5e6-96231b3b80d8
2011-07-07 23:11:01 +00:00
Dale Johannesen 545be51fdf Add some missing X86-specific asm constraint letters, and fix
some bugs in setting allowsRegister on the ones there.
8348447.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@111980 91177308-0d34-0410-b5e6-96231b3b80d8
2010-08-24 22:33:12 +00:00
Chris Lattner aab64d0b7f Implement PR6845. We allow matching constraints to have different
input and output types when the smaller value isn't mentioned in the
asm string.  Extend this support from integers to also allowing 
fp values to be mismatched (if not mentioned in the asm string).


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@102188 91177308-0d34-0410-b5e6-96231b3b80d8
2010-04-23 17:27:29 +00:00
Chris Lattner 018b54e5c3 fix PR6780, properly handling the IR {|} escapes in inline asm strings.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@100449 91177308-0d34-0410-b5e6-96231b3b80d8
2010-04-05 18:44:00 +00:00
Chris Lattner 29a4071fc4 fix a buildbot failure, this was passing for me because the
'%t' file was left around on my disk.  doh.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@97699 91177308-0d34-0410-b5e6-96231b3b80d8
2010-03-04 00:38:16 +00:00
Chris Lattner eeeb49a69a merge asm-2.c into asm.c, remove asm-inout.c because it is
XFAIL and already tracked in bugzilla.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@97671 91177308-0d34-0410-b5e6-96231b3b80d8
2010-03-03 21:56:57 +00:00
Chris Lattner b992259f77 fix PR6475, we were doing side-effecting stuff in an assert.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@97669 91177308-0d34-0410-b5e6-96231b3b80d8
2010-03-03 21:52:23 +00:00
Daniel Dunbar a5728872c7 Update tests to use %clang_cc1 instead of 'clang-cc' or 'clang -cc1'.
- This is designed to make it obvious that %clang_cc1 is a "test variable"
   which is substituted. It is '%clang_cc1' instead of '%clang -cc1' because it
   can be useful to redefine what gets run as 'clang -cc1' (for example, to set
   a default target).

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@91446 91177308-0d34-0410-b5e6-96231b3b80d8
2009-12-15 20:14:24 +00:00
Daniel Dunbar 4fcfde4d5c Eliminate &&s in tests.
- 'for i in $(find . -type f); do sed -e 's#\(RUN:.*[^ ]\) *&& *$#\1#g' $i | FileUpdate $i; done', for the curious.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@86430 91177308-0d34-0410-b5e6-96231b3b80d8
2009-11-08 01:45:36 +00:00
Chris Lattner 4053983963 fix PR4938 by recognizing % as a modifier on outputs,
previously we only recognized it on inputs.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@83939 91177308-0d34-0410-b5e6-96231b3b80d8
2009-10-13 04:32:07 +00:00
Mike Stump 1eb4433ac4 Remove tabs, and whitespace cleanups.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@81346 91177308-0d34-0410-b5e6-96231b3b80d8
2009-09-09 15:08:12 +00:00
Daniel Dunbar 025f80dfc2 MultiTestRunner: Validate '&&' at the end of RUN lines.
- This is just to normalize, these will go away soon hopefully.

Added all the missing '&&'s that have crept in. :)


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@77062 91177308-0d34-0410-b5e6-96231b3b80d8
2009-07-25 11:27:37 +00:00
Daniel Dunbar b77e07a23d Update test
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@72110 91177308-0d34-0410-b5e6-96231b3b80d8
2009-05-19 16:09:59 +00:00
Chris Lattner 0bdaa5b576 look at the right operand when increasing the size of an asm output,
this fixes http://llvm.org/bugs/show_bug.cgi?id=3373#c20


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@70685 91177308-0d34-0410-b5e6-96231b3b80d8
2009-05-03 09:05:53 +00:00
Chris Lattner 3351f1145a allow references to the larger value in a tied constraint
from the asm string, but reject references to the smaller one.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@70679 91177308-0d34-0410-b5e6-96231b3b80d8
2009-05-03 08:32:32 +00:00
Chris Lattner a077b5c863 add support for tying asm operands where the result is smaller than
the input.  This is part of PR3373.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@70677 91177308-0d34-0410-b5e6-96231b3b80d8
2009-05-03 08:21:20 +00:00
Daniel Dunbar 50ac766f56 Remove typo
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@70676 91177308-0d34-0410-b5e6-96231b3b80d8
2009-05-03 08:00:14 +00:00
Chris Lattner ede9d90080 implement support for asm outputs targetting non-simple lvalue destinations
like bitfields.  incidentally llvm-gcc crashes on this sort of thing also. :)


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@70675 91177308-0d34-0410-b5e6-96231b3b80d8
2009-05-03 07:53:25 +00:00
Chris Lattner 4df4ee0ff6 handle codegen of asms where a small input is tied to a large output.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@70672 91177308-0d34-0410-b5e6-96231b3b80d8
2009-05-03 07:27:51 +00:00
Anders Carlsson ec91dab197 Ignore plus operands when looking up the operand number from a named operand. This matches llvm-gcc and fixes PR3908.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@68371 91177308-0d34-0410-b5e6-96231b3b80d8
2009-04-03 05:57:08 +00:00
Daniel Dunbar d7d5f0223b Rename clang to clang-cc.
Tests and drivers updated, still need to shuffle dirs.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@67602 91177308-0d34-0410-b5e6-96231b3b80d8
2009-03-24 02:24:46 +00:00
Chris Lattner 88beebe6ec Fix PR3682 by just disabling a broken assertion. This check should be
done in sema, and is reflected by the existing PR3258.  In the meantime,
fix PR3682 by disabling a bogus assertion (which doesn't account for + 
operands).



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@66533 91177308-0d34-0410-b5e6-96231b3b80d8
2009-03-10 06:42:37 +00:00
Chris Lattner 02af974dca reduce duplication of parsing code between %0 and %x0 and
add support for modifiers on named references, like %c[foo].



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@66532 91177308-0d34-0410-b5e6-96231b3b80d8
2009-03-10 06:38:02 +00:00
Chris Lattner 10ca96ae9a move matching of named operands into AsmStmt class. At the same
time handle + operands in operand counting, fixing asm.c:t7 to
expand into $2 instead of $1.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@66531 91177308-0d34-0410-b5e6-96231b3b80d8
2009-03-10 06:33:24 +00:00
Anders Carlsson 6032979a5d Match gcc and always perform array/function conversion for asm input exprs. Fixes PR3641.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@65256 91177308-0d34-0410-b5e6-96231b3b80d8
2009-02-22 02:11:23 +00:00
Anders Carlsson 03eb543cf7 If an input constraint refers to an output constraint, it should have the same constraint info as the output constraint. Fixes PR3417
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@63127 91177308-0d34-0410-b5e6-96231b3b80d8
2009-01-27 20:38:24 +00:00
Anders Carlsson ebaae2a310 Handle multi-value inputs
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@62069 91177308-0d34-0410-b5e6-96231b3b80d8
2009-01-12 02:22:13 +00:00
Anders Carlsson 9f2505b934 More inline asm fixes
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@62049 91177308-0d34-0410-b5e6-96231b3b80d8
2009-01-11 21:23:27 +00:00
Anders Carlsson 2763b3af0a Handle readwrite constraints correctly
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@62043 91177308-0d34-0410-b5e6-96231b3b80d8
2009-01-11 19:46:50 +00:00