| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
fix bag with curly braces
Until now curly braces could only be used in MS inline assembly to mark block start/end.
All curly braces were removed completely at a very early stage.
This approach caused bugs like:
"m{o}v eax, ebx" turned into "mov eax, ebx" without any error.
In addition, AVX-512 added special operands (e.g., k registers), which are also surrounded by curly braces that mark them as such.
Now, we need to keep the curly braces and identify at a later stage if they are marking block start/end (if so, ignore them), or surrounding special AVX-512 operands (if so, parse them as such).
This patch fixes the bug described above and enables the use of AVX-512 special operands.
This commit is the the clang part of the patch.
The clang part of the review is: http://reviews.llvm.org/D17766
The llvm part of the review is: http://reviews.llvm.org/D17767
Differential Revision: http://reviews.llvm.org/D17766
llvm-svn: 262842
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Fixing a crash caused by trying to merge a single-line asm statement with an asm block that follows it, e.g:
asm int 4
asm {
int 5
}
Now, only adjacent single-line asm statements that are not surrounded by braces will be merged into one asm call.
Differential Revision: http://reviews.llvm.org/D17496
llvm-svn: 261618
|
|
|
|
|
|
|
|
|
| |
In MS inline asm syntax a label with '$' char produces an error, while in AT&T it does not.
In AT&T inline asm syntax Clang escapes the '$' char and replaces it with "$$". Adopted same approach for MS syntax.
Differential Revision: http://reviews.llvm.org/D15795
llvm-svn: 256545
|
|
|
|
|
|
|
|
|
|
| |
include structs
Test case for commit 256381
Differential Revision: http://reviews.llvm.org/D15749
llvm-svn: 256382
|
|
|
|
|
|
|
|
| |
Add MS inline asm support for structs that contain fields that are also structs.
Differential Revision: http://reviews.llvm.org/D15578
llvm-svn: 255890
|
|
|
|
|
|
|
|
| |
Duplicating it can lead to labels being defined twice.
Differential revision: http://reviews.llvm.org/D15399
llvm-svn: 255201
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Now we can parse code like this:
struct A {
int field;
};
int f(A o) {
__asm mov eax, o.field
}
Fixes PR19117.
llvm-svn: 246088
|
|
|
|
|
|
|
|
|
|
|
| |
inline asm
This contains the test-case for r243630.
Patch by: marina.yatsina@intel.com
Differential Revision: http://reviews.llvm.org/D11513
llvm-svn: 243632
|
|
|
|
|
|
|
|
|
| |
LLVM side of the patch was committed as r239695.
Differential Revision: http://reviews.llvm.org/D10384
Patch by marina.yatsina@intel.com
llvm-svn: 239696
|
|
|
|
| |
llvm-svn: 230795
|
|
|
|
|
|
|
|
|
|
|
|
| |
Summary: This is a test for this patch: http://reviews.llvm.org/D5445.
Reviewers: rnk
Subscribers: cfe-commits
Differential Revision: http://reviews.llvm.org/D5446
llvm-svn: 218271
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Summary:
This fixes PR20023. In order to implement this scoping rule, we piggy
back on the existing LabelDecl machinery, by creating LabelDecl's that
will carry the "internal" name of the inline assembly label, which we
will rewrite the asm label to.
Reviewers: rnk
Subscribers: cfe-commits
Differential Revision: http://reviews.llvm.org/D4589
llvm-svn: 218230
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
If control falls off the end of a function after an __asm block, MSVC
assumes that the inline assembly filled the EAX and possibly EDX
registers with an appropriate return value. This functionality is used
in inline functions returning 64-bit integers in system headers, so we
need some amount of compatibility.
This is implemented in Clang by adding extra output constraints to every
inline asm block, and storing the resulting output registers into the
return value slot. If we see an asm block somewhere in the function
body, we emit a normal epilogue instead of marking the end of the
function with a return type unreachable.
Normal returns in functions not using this functionality will overwrite
the return value slot, and in most cases LLVM should be able to
eliminate the dead stores.
Fixes PR17201.
Reviewed By: majnemer
Differential Revision: http://reviews.llvm.org/D5177
llvm-svn: 217187
|
|
|
|
| |
llvm-svn: 217174
|
|
|
|
|
|
|
|
|
| |
These tests seem like an exception to the rule against assembly emitting
tests in clang. I made an LLVM side change that can only be tested by
setting up the inline assembly machinery that is only implemented by
Clang.
llvm-svn: 214552
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Note that it's not clear whether this is the right behavior, please see
the review for the discussion.
Reviewers: rnk
Subscribers: cfe-commits
Differential Revision: http://reviews.llvm.org/D4577
llvm-svn: 214401
|
|
|
|
| |
llvm-svn: 213919
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Summary:
This patch extends the __asm parser to make it keep parsing input tokens
as inline assembly if a single-line __asm line is followed by another line
starting with __asm too. It also makes sure that we correctly keep
matching braces in such situations by separating the notions of how many
braces we are matching and whether we are in single-line asm block mode.
Reviewers: rnk
Subscribers: cfe-commits
Differential Revision: http://reviews.llvm.org/D4598
llvm-svn: 213916
|
|
|
|
| |
llvm-svn: 213329
|
|
|
|
| |
llvm-svn: 213305
|
|
|
|
|
|
| |
This fixes http://llvm.org/PR20204.
llvm-svn: 212389
|
|
|
|
| |
llvm-svn: 212373
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
When parsing MS inline assembly, we note that fpsw is an implicit def of
most x87 FP operations, and add it to the clobber list. However, we
don't recognize fpsw as a gcc register name, and we assert. Clang
always adds an fpsr clobber, which means the same thing to LLVM, so we
can just use that.
This test case was broken by my LLVM change r196939.
Reviewers: echristo
Differential Revision: http://llvm-reviews.chandlerc.com/D2993
llvm-svn: 204878
|
|
|
|
| |
llvm-svn: 203147
|
|
|
|
|
|
| |
Tests r200279 in LLVM.
llvm-svn: 200280
|
|
|
|
| |
llvm-svn: 196940
|
|
|
|
| |
llvm-svn: 196350
|
|
|
|
| |
llvm-svn: 189910
|
|
|
|
| |
llvm-svn: 179811
|
|
|
|
| |
llvm-svn: 179720
|
|
|
|
| |
llvm-svn: 179656
|
|
|
|
| |
llvm-svn: 179404
|
|
|
|
| |
llvm-svn: 179400
|
|
|
|
| |
llvm-svn: 179394
|
|
|
|
|
|
| |
version as lea is only available in 64-bit mode.
llvm-svn: 179190
|
|
|
|
|
|
|
| |
commit was reverted in r179120, but I do plan on reapplying with a fix shortly.
Part of rdar://13611297
llvm-svn: 179182
|
|
|
|
| |
llvm-svn: 179031
|
|
|
|
| |
llvm-svn: 178882
|
|
|
|
| |
llvm-svn: 178188
|
|
|
|
| |
llvm-svn: 178187
|
|
|
|
| |
llvm-svn: 177441
|
|
|
|
| |
llvm-svn: 177414
|
|
|
|
| |
llvm-svn: 177349
|
|
|
|
| |
llvm-svn: 176038
|
|
|
|
|
|
| |
attributes on the call/invoke instructions.
llvm-svn: 175878
|
|
|
|
|
|
| |
clobbered.
llvm-svn: 175637
|
|
|
|
| |
llvm-svn: 175313
|
|
|
|
| |
llvm-svn: 175084
|
|
|
|
|
|
| |
Part of rdar://13202662
llvm-svn: 175022
|
|
|
|
|
|
| |
Part of rdar://13200215
llvm-svn: 175009
|