summaryrefslogtreecommitdiffstats
path: root/clang/test/Sema/asm.c
Commit message (Collapse)AuthorAgeFilesLines
* Fix assertion in inline assembler IR genAlexander Musman2015-09-211-0/+12
| | | | | | | Several inputs may not refer to one output constraint in inline assembler insertions, clang was failing on assertion on such test case. llvm-svn: 248158
* Additional fix for PR14269: Crash on vector elements / global register vars ↵Andrey Bokhanko2015-08-031-3/+18
| | | | | | | | | | in inline assembler. Compiler crashed when vector elements / global register vars were used in inline assembler with "m" restriction. This patch fixes this. Differential Revision: http://reviews.llvm.org/D10476 llvm-svn: 243870
* Fix for PR14269: Clang crashes when a bit field is used as inline assemblerAlexander Musman2015-06-051-0/+17
| | | | | | | | | | | | input / output with memory constraint. One generally can't get address of a bit field, so the general solution is to error on such cases. GCC does the same. Patch by Andrey Bokhanko Differential Revision: http://reviews.llvm.org/D10086 llvm-svn: 239153
* Sema: Relax parsing of '#' in constraintsDavid Majnemer2015-01-141-1/+1
| | | | llvm-svn: 225942
* Basic: Numeric constraints are multidigitDavid Majnemer2015-01-111-0/+7
| | | | | | | Clang would treat the digits in an "11m" input constraint separately as if it was handling constraint 1 twice instead of constraint 11. llvm-svn: 225606
* Basic: [asmSymbolicName] follows the same rule as numbers in asm inputsDavid Majnemer2015-01-111-0/+7
| | | | | | | | | Input constraints like "0" and "[foo]" should be treated the same when it comes to their corresponding output constraint. This fixes PR21850. llvm-svn: 225605
* Basic: The asm constraint '#m' isn't valid, reject itDavid Majnemer2015-01-111-0/+7
| | | | llvm-svn: 225603
* Basic: The asm constraint '+#r' isn't valid, reject itDavid Majnemer2015-01-111-0/+6
| | | | llvm-svn: 225600
* Sema: The asm constraint '+&m' isn't valid, reject itDavid Majnemer2015-01-101-0/+6
| | | | | | Don't permit '+&m' to make it to CodeGen, it's invalid. llvm-svn: 225586
* Sema: Forbid inconsistent constraint alternativesDavid Majnemer2014-12-291-0/+7
| | | | | | Verify that asm constraints have the same number of alternatives llvm-svn: 224911
* Fix assertion on asm register that are "%"Olivier Goffart2014-08-171-0/+1
| | | | | | | | | | | Name might be empty again after we removed the '%' prefix and Name[0] would assert. Found on code like register int foo asm("%" MACRO); where MACRO was supposed to be defined in a header file that was not found. llvm-svn: 215834
* [X86 inline-asm] Error out on inline-asm constraint "=f".Akira Hatanaka2014-07-181-0/+6
| | | | | | <rdar://problem/17476689> llvm-svn: 213428
* Add pointer types to global named registerRenato Golin2014-06-051-0/+10
| | | | | | | | | | This patch adds support for pointer types in global named registers variables. It'll be lowered as a pair of read/write_register and inttoptr/ptrtoint calls. Also adds some early checks on types on SemaDecl to avoid the assert. Tests changed accordingly. (PR19837) llvm-svn: 210274
* Non-allocatable Global Named RegisterRenato Golin2014-05-191-2/+0
| | | | | | | | | | | | | This patch implements global named registers in Clang, lowering to the just created intrinsics in LLVM (@llvm.read/write_register). A new type of LValue had to be created (Register), which just adds support to carry the metadata node containing the name of the register. Two new methods to emit loads and stores interoperate with another to emit the named metadata node. No guarantees are being made and only non-allocatable global variable named registers are being supported. Local named register support is unchanged. llvm-svn: 209149
* Stop crashing on empty asm input constraintsDuncan P. N. Exon Smith2013-12-161-0/+3
| | | | | | | | | | An empty string for an ASM input constraint is invalid, and will crash during clang CodeGen. Change TargetInfo::validateInputConstraint to reject an empty string. <rdar://problem/15552191> llvm-svn: 197362
* Reject asm output constraints that consist of modifiers only.Benjamin Kramer2013-04-181-0/+16
| | | | | | Fixes PR15759. llvm-svn: 179756
* Simplify test to use a count for the number of notes expected.Bill Wendling2013-03-271-1/+1
| | | | llvm-svn: 178196
* Add another expected note. Two errors => two notes.Tim Northover2013-03-271-1/+1
| | | | llvm-svn: 178143
* Fix testcase to add expected note.Bill Wendling2013-03-271-1/+1
| | | | llvm-svn: 178122
* Emit an error message instead of crashing when dereferencing an incomplete ↵Bill Wendling2013-03-251-0/+7
| | | | | | | | | | pointer type. If the ASM statement is dereferencing an incomplete pointer type, issue an error instead of crashing. <rdar://problem/12700799> llvm-svn: 177915
* c: privide deprecated warning when __private_extern__ storageFariborz Jahanian2012-08-171-1/+1
| | | | | | | | specifier is unsed in a declaration; as it may not make the symbol local to linkage unit as intended. Suggest using "hidden" visibility attribute instead. // rdar://7703982 llvm-svn: 162138
* Add support for AVX registers to clang inline asm. Add a small testcaseEric Christopher2011-12-021-1/+1
| | | | | | | | | and update the Sema testcase with a register that we won't hit for a while I hope. Fixes rdar://10510405 llvm-svn: 145671
* Add a testcase for the previous commit and update an existing test for anEric Christopher2011-07-071-5/+5
| | | | | | | | extra register. Part of PR10299 and rdar://9740322 llvm-svn: 134657
* Fix off-by-one error in StringLiteral::getLocationOfByte.Hans Wennborg2011-06-301-0/+6
| | | | | | This fixes PR10223. llvm-svn: 134183
* Split out logic for valid clobbers and valid inline asm registers.Eric Christopher2011-06-281-0/+4
| | | | | | Fixes rdar://9281377 llvm-svn: 134016
* Use a heralded conversion to bool in inline-asm constraints.John McCall2011-05-101-0/+8
| | | | llvm-svn: 131170
* Added warning about invalid register specification for local variables.Abramo Bagnara2011-01-111-1/+11
| | | | llvm-svn: 123236
* Produce a better error message for invalid register names.Rafael Espindola2011-01-011-0/+4
| | | | llvm-svn: 122670
* When setting a tied check if it's already tied. If it's tied to another ↵Anders Carlsson2010-11-031-2/+8
| | | | | | constraint it's invalid. Fixes PR3905. llvm-svn: 118146
* A number in an input constraint can't point to a read-write ('+') ↵Anders Carlsson2010-11-031-0/+6
| | | | | | constraint. Fixes PR3904. llvm-svn: 118145
* make clang print types as "const int *" instead of "int const*",Chris Lattner2010-09-051-1/+1
| | | | | | | which is should have done from the beginning. As usual, the most fun with this sort of change is updating all the testcases. llvm-svn: 113090
* Warn on top-level 'asm volatile' (instead of misparsing it).John McCall2010-01-251-0/+3
| | | | | | "Fixes" rdar://problem/7574870 llvm-svn: 94458
* Update tests to use %clang_cc1 instead of 'clang-cc' or 'clang -cc1'.Daniel Dunbar2009-12-151-1/+1
| | | | | | | | | - 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). llvm-svn: 91446
* Remove the -arch option from clang-cc: for all practical purposes, it's Eli Friedman2009-05-191-1/+1
| | | | | | redundant with -triple. llvm-svn: 72108
* If we have mismatched integer tied operands, but the operandChris Lattner2009-05-031-1/+1
| | | | | | | | number is not mentioned in the asm string, let it past sema. Right now these are currently rejected by the llvm code generator but this will be fixed next. llvm-svn: 70670
* implement PR4077: [Linux kernel] inscrutable error on inline asm ↵Chris Lattner2009-04-261-0/+7
| | | | | | | | | | | | | | | | | input/output constraint mismatch Before we emitted: $ clang t.c -S -m64 llvm: error: Unsupported asm: input constraint with a matching output constraint of incompatible type! Now we produce: $ clang t.c -S -m64 t.c:5:40: error: unsupported inline asm: input with type 'unsigned long' matching output with type 'int' asm volatile("foo " : "=a" (a) :"0" (b)); ~~~ ~^~ llvm-svn: 70142
* Rename clang to clang-cc.Daniel Dunbar2009-03-241-1/+1
| | | | | | Tests and drivers updated, still need to shuffle dirs. llvm-svn: 67602
* fix PR3258 by rejecting invalid numeric operands.Chris Lattner2009-03-111-1/+5
| | | | llvm-svn: 66618
* checking for symbolic operands as well as % at end of string.Chris Lattner2009-03-111-7/+9
| | | | llvm-svn: 66614
* reject invalid escape characters in extended-asm strings with a nice diagnostic.Chris Lattner2009-03-101-4/+7
| | | | llvm-svn: 66605
* If an input constraint refers to an output constraint, it should have the ↵Anders Carlsson2009-01-271-1/+1
| | | | | | same constraint info as the output constraint. Fixes PR3417 llvm-svn: 63127
* Handle the 'e' constraint. Fixes PR3385Anders Carlsson2009-01-241-0/+6
| | | | llvm-svn: 62923
* Fix an inline asm sema bug that I introduced.Anders Carlsson2009-01-211-1/+7
| | | | llvm-svn: 62666
* Improvements to Sema of asm statements. Fixes <rdar://problem/6156893>Anders Carlsson2009-01-201-0/+11
| | | | llvm-svn: 62609
* Add sema support for symbolic names in inline asm statements.Anders Carlsson2009-01-181-1/+5
| | | | llvm-svn: 62441
* Fix rdar://6094010 various asserts happening with wide strings in inline asm.Chris Lattner2008-07-231-0/+8
| | | | llvm-svn: 53947
* Check that the clobber registers are valid.Anders Carlsson2007-11-251-1/+14
| | | | llvm-svn: 44311
* Check asm input and output expressions.Anders Carlsson2007-11-231-0/+14
llvm-svn: 44289
OpenPOWER on IntegriCloud