| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
|
|
| |
This test ensures the popfd instruction in MS inline assembly can properly find a clobber name for the dirflag register. Previously the register was named 'DF', but it needs to be named 'dirflag' to match the name in the GCC register name list.
llvm-svn: 329738
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Segment moves to memory are always 16-bit. Remove invalid 32 and 64
bit variants.
Recommiting with missing clang inline assembly test change.
Fixes PR34478.
Reviewers: rnk, craig.topper
Subscribers: llvm-commits, hiraditya
Differential Revision: https://reviews.llvm.org/D39847
llvm-svn: 318797
|
|
|
|
|
|
| |
Differential Revision: https://reviews.llvm.org/D38445
llvm-svn: 318739
|
|
|
|
|
|
| |
Differential Revision: https://reviews.llvm.org/D36794
llvm-svn: 311640
|
|
|
|
|
|
|
|
|
|
|
| |
Currently, only non-negative immediate is allowed prior to a brac expression (memory reference).
MASM / GAS does not have any problem cope with the left side of the real line, so we should be able to as well.
llvm: D36229
Differential Revision: https://reviews.llvm.org/D36230
llvm-svn: 310529
|
|
|
|
|
|
|
|
|
|
|
| |
pointers aliases
MS InlineAsm Dot operator accepts "Bases" such as "this" (cpp) and class/struct pointer typedef.
This patch enhance its implementation with this behavior.
Differential Revision: https://reviews.llvm.org/D36450
llvm-svn: 310472
|
|
|
|
|
|
|
|
| |
Allows the incorporation of legit (x86) Debug Regs within inline asm stataements
Differential Revision: https://reviews.llvm.org/D36074
llvm-svn: 309672
|
|
|
|
|
|
|
|
|
| |
MS ignores the keyword "short" when used after a jc/jz instruction, LLVM ought to do the same.
llvm: D35892
Differential Revision: https://reviews.llvm.org/D35893
llvm-svn: 309510
|
|
|
|
|
|
|
|
| |
Allows the incorporation of legit (x86) Control Regs within inline asm stataements
Differential Revision: https://reviews.llvm.org/D35903
llvm-svn: 309508
|
|
|
|
|
|
|
|
| |
Microsoft style inline assembly statements." as it is causing msan failures.
This reverts commits r308985 and r308965
llvm-svn: 309004
|
|
|
|
|
|
|
|
|
|
| |
style inline assembly statements.
Differential Revision:
https://reviews.llvm.org/D33277
https://reviews.llvm.org/D33278
llvm-svn: 308965
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Inline asm dot operator while using imm generates wrong ir and asm
This is the test for the llvm changes committed in revision 306300
This also fixes bugzilla 32987:
https://bugs.llvm.org//show_bug.cgi?id=32987
The llvm part of the review that contains the test can be found here:
https://reviews.llvm.org/D33039
commit on behald of zizhar
Differential Revision:
https://reviews.llvm.org/D33040
llvm-svn: 306301
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This avoids problems on code like this:
char buf[16];
__asm {
movups xmm0, [buf]
mov [buf], eax
}
The frontend size in this case (1) is wrong, and the register makes the
instruction matching unambiguous. There are also enough bytes available
that we shouldn't complain to the user that they are potentially using
an incorrectly sized instruction to access the variable.
Supersedes D32636 and D26586 and fixes PR28266
llvm-svn: 302179
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
of a compound expression
This patch introduces X86AsmParser with the ability to handle the aforementioned ops within compound "MS" arithmetical expressions.
Currently - only supported as a stand alone Operand, e.g.:
"TYPE X"
now allowed :
"4 + TYPE X * 128"
LLVM side: https://reviews.llvm.org/D31173
Differential Revision: https://reviews.llvm.org/D31174
llvm-svn: 298426
|
|
|
|
|
|
|
| |
Since r295004, LLVM has started modelling this new register, but we
don't have GCC constraint inline asm spellings for it yet.
llvm-svn: 295107
|
|
|
|
|
|
|
|
| |
Allowing adjacent comments within MS inline assembly multi-line statement
Differential Revision: https://reviews.llvm.org/D28989
llvm-svn: 294120
|
|
|
|
| |
llvm-svn: 288093
|
|
|
|
|
|
|
|
|
|
|
|
| |
This solves PR23715 in a way that is compatible with LTO.
MSVC supports jumping to source-level labels and between inline asm
blocks, but we don't.
Also revert the old solution, r255201, which was to mark these calls as
noduplicate.
llvm-svn: 288059
|
|
|
|
|
|
|
|
|
|
| |
Test linked to: https://reviews.llvm.org/D24957
Committing in the name of Ziv Izhar: After check-all and LGTM .
Differential Revision: https://reviews.llvm.org/D24958
llvm-svn: 284213
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
block.
Clang tests for verifying the following syntaxes:
1. 0xNN and NNh are accepted as valid hexadecimal numbers, but 0xNNh is not.
0xNN and NNh may come with optional U or L suffix.
2. NNb is accepted as a valid binary (base-2) number, but 0bNN is not.
NNb may come with optional U or L suffix.
Differential Revision: https://reviews.llvm.org/D22112
llvm-svn: 280556
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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
|