summaryrefslogtreecommitdiffstats
path: root/clang/test/Parser/asm.c
Commit message (Collapse)AuthorAgeFilesLines
* Disallow an empty string literal in an asm labelAaron Ballman2020-01-081-0/+4
| | | | | | | | An empty string literal in an asm label does not make a whole lot of sense. GCC does not diagnose such a construct, but it also generates code that cannot be assembled by gas should two symbols have an empty asm label within the same TU. This does not affect an asm statement with an empty string literal, which is still a useful construct.
* Revert "clang support gnu asm goto."Erich Keane2019-05-301-50/+0
| | | | | | | | | | | This reverts commit 954ec09aed4f2be04bb5f4e10dbb4ea8bd19ef9a. Reverting due to test failures as requested by Jennifer Yu. Conflicts: clang/test/CodeGen/asm-goto.c llvm-svn: 362106
* clang support gnu asm goto.Jennifer Yu2019-05-301-0/+50
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Syntax: asm [volatile] goto ( AssemblerTemplate : : InputOperands : Clobbers : GotoLabels) https://gcc.gnu.org/onlinedocs/gcc/Extended-Asm.html New llvm IR is "callbr" for inline asm goto instead "call" for inline asm For: asm goto("testl %0, %0; jne %l1;" :: "r"(cond)::label_true, loop); IR: callbr void asm sideeffect "testl $0, $0; jne ${1:l};", "r,X,X,~{dirflag},~{fpsr},~{flags}"(i32 %0, i8* blockaddress(@foo, %label_true), i8* blockaddress(@foo, %loop)) #1 to label %asm.fallthrough [label %label_true, label %loop], !srcloc !3 asm.fallthrough: Compiler need to generate: 1> a dummy constarint 'X' for each label. 2> an unique fallthrough label for each asm goto stmt " asm.fallthrough%number". Diagnostic 1> duplicate asm operand name are used in output, input and label. 2> goto out of scope. llvm-svn: 362045
* Make language option `GNUAsm` discoverable with `__has_extension` macro.Volodymyr Sapsai2019-05-131-0/+4
| | | | | | | | | | | | | | | | This can be used for better support of `-fno-gnu-inline-asm` builds. rdar://problem/49540880 Reviewers: aaron.ballman, rsmith Reviewed By: aaron.ballman Subscribers: eraman, jkorous, dexonsmith, craig.topper, cfe-commits Differential Revision: https://reviews.llvm.org/D61619 llvm-svn: 360625
* Parse: Avoid crashing on unterminated top-level asm stringsJustin Bogner2013-12-101-0/+13
| | | | | | | | | | | When parsing invalid top-level asm statements, we were ignoring the return code of the SkipUntil we used for recovery. This led to crashes when we hit the end of file and tried to continue parsing anyway. This fixes the crash and adds a couple of tests for parsing related problems. llvm-svn: 196961
* Support C11 _Atomic type qualifier. This is more-or-less just syntactic ↵Richard Smith2013-03-281-0/+6
| | | | | | sugar for the _Atomic type specifier. llvm-svn: 178210
* Diagnose use of wide string literal in 'asm' instead of crashing. Fixes ↵Ted Kremenek2011-12-021-0/+3
| | | | | | <rdar://problem/10465079>. llvm-svn: 145656
* Fix PR7673 by allowing an empty clobbers section in an ASM statement.Chandler Carruth2010-07-221-1/+2
| | | | llvm-svn: 109087
* 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
* Rename clang to clang-cc.Daniel Dunbar2009-03-241-1/+1
| | | | | | Tests and drivers updated, still need to shuffle dirs. llvm-svn: 67602
* Fix a couple crashes on invalid input.Chris Lattner2008-05-271-0/+5
| | | | llvm-svn: 51622
* Behave correctly if a constraint expression is invalid.Anders Carlsson2008-02-091-0/+5
| | | | llvm-svn: 46910
* GCC fails if there is a trailing colon but no clobbers.Anders Carlsson2007-11-211-0/+5
llvm-svn: 44265
OpenPOWER on IntegriCloud