| Commit message (Collapse) | Author | Age | Files | Lines |
... | |
|
|
|
|
|
|
|
| |
If there is no associated immediate (MS style inline asm), do not try to access
the operand, assume that it is valid. This should fix the buildbots after SVN
r225941.
llvm-svn: 225950
|
|
|
|
|
|
|
| |
The int instruction takes as an operand an 8-bit immediate value. Validate that
the input is valid rather than silently truncating the value.
llvm-svn: 225941
|
|
|
|
|
|
|
|
| |
AsmParsers.
Make sure they all have llvm_unreachable on the default path out of the switch. Remove unnecessary "default: break". Remove a 'return' after unreachable. Fix some indentation.
llvm-svn: 225114
|
|
|
|
|
|
|
|
|
|
| |
without using mode predicates.
This is necessary to allow the disassembler to be able to handle AdSize32 instructions in 64-bit mode when address size prefix is used.
Eventually we should probably also support 'addr32' and 'addr16' in the assembler to override the address size on some of these instructions. But for now we'll just use special operand types that will lookup the current mode size to select the right instruction.
llvm-svn: 225075
|
|
|
|
| |
llvm-svn: 223339
|
|
|
|
|
|
|
|
|
|
| |
The X86AsmParser intel handling was refactored in r216481, making it
try each different memory operand size to see which one matches.
Operand sizes larger than 80 ("[xyz]mmword ptr") were forgotten, which
led to an "invalid operand" error for code such as:
movdqa [rax], xmm0
llvm-svn: 223187
|
|
|
|
|
|
| |
Base classes were storing a second copy.
llvm-svn: 221667
|
|
|
|
|
|
|
|
|
|
|
|
| |
Summary: CFI directives are generated for .S files.
Reviewers: eugenis
Subscribers: llvm-commits
Differential Revision: http://reviews.llvm.org/D5520
llvm-svn: 219199
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Summary:
This fixes a couple of issues. One is ensuring that AOK_Label rewrite
rules have a lower priority than AOK_Skip rules, as AOK_Skip needs to
be able to skip the brackets properly. The other part of the fix ensures
that we don't overwrite Identifier when looking up the identifier, and
that we use the locally available information to generate the AOK_Label
rewrite in ParseIntelIdentifier. Doing that in CreateMemForInlineAsm
would be problematic since the Start location there may point to the
beginning of a bracket expression, and not necessarily the beginning of
an identifier.
This also means that we don't need to carry around the InternlName field,
which helps simplify the code.
Test Plan: This will be tested on the clang side.
Reviewers: rnk
Subscribers: llvm-commits
Differential Revision: http://reviews.llvm.org/D5445
llvm-svn: 218270
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
The implementation of the callback in clang's Sema will return an
internal name for labels.
Test Plan: Will be tested in clang.
Reviewers: rnk
Subscribers: llvm-commits
Differential Revision: http://reviews.llvm.org/D4587
llvm-svn: 218229
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
instrumentation code.
Summary: [asan-assembly-instrumentation] Added CFI directives to the generated instrumentation code.
Reviewers: eugenis
Subscribers: llvm-commits
Differential Revision: http://reviews.llvm.org/D5189
llvm-svn: 217482
|
|
|
|
| |
llvm-svn: 216823
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Instructions like 'fxsave' and control flow instructions like 'jne'
match any operand size. The loop I added to the Intel syntax matcher
assumed that using a different size would give a different instruction.
Now it handles the case where we get the same instruction for different
memory operand sizes.
This also allows us to remove the hack we had for unsized absolute
memory operands, because we can successfully match things like 'jnz'
without reporting ambiguity. Removing this hack uncovered test case
involving 'fadd' that was ambiguous. The memory operand could have been
single or double precision.
llvm-svn: 216604
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
The existing matcher has lots of AT&T assembly dialect assumptions baked
into it. In particular, the hack for resolving the size of a memory
operand by appending the four most common suffixes doesn't work at all.
The Intel assembly dialect mnemonic table has ambiguous entries, so we
need to try matching multiple times with different operand sizes, since
that's the only way to choose different instruction variants.
This makes us more compatible with gas's implementation of Intel
assembly syntax. MSVC assumes you want byte-sized operations for the
instructions that we reject as ambiguous.
Reviewed By: grosbach
Differential Revision: http://reviews.llvm.org/D4747
llvm-svn: 216481
|
|
|
|
|
|
|
|
|
|
| |
ARM in particular is getting dangerously close to exceeding 32 bits worth of
possible subtarget features. When this happens, various parts of MC start to
fail inexplicably as masks get truncated to "unsigned".
Mostly just refactoring at present, and there's probably no way to test.
llvm-svn: 215887
|
|
|
|
|
|
|
|
| |
Fixes PR18916. I don't think we need to implement support for either
hybrid syntax. Nobody should write Intel assembly with '%' prefixes on
their registers or AT&T assembly without them.
llvm-svn: 215031
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This is consistent with how we parse them in a standalone .s file, and
inline assembly shouldn't differ.
This fixes errors about requiring more registers than available in
cases like this:
void f();
void __declspec(naked) g() {
__asm pusha
__asm call f
__asm popa
__asm ret
}
There are no registers available to pass the address of 'f' into the asm
blob. The asm should now directly call 'f'.
Tests will land in Clang shortly.
llvm-svn: 214550
|
|
|
|
|
|
|
|
| |
This improves the diagnostics from the regular assembler, but more
importantly it fixes an assertion when parsing inline assembly. Test
landing in Clang.
llvm-svn: 214468
|
|
|
|
|
|
|
|
| |
Instead, create an absolute memory operand.
Fixes PR20504.
llvm-svn: 214457
|
|
|
|
|
|
| |
Previously we would execute unreachable during object emission.
llvm-svn: 214456
|
|
|
|
|
|
| |
Patch by Yuri Gorshenin.
llvm-svn: 214395
|
|
|
|
|
|
| |
No functional change.
llvm-svn: 214364
|
|
|
|
|
|
|
|
|
| |
This works towards making the Intel syntax asm matcher use a completely
different disambiguation strategy.
No functional change.
llvm-svn: 214352
|
|
|
|
|
|
|
|
|
|
|
|
| |
Enabling HasAVX512{DQ,BW,VL} predicates.
Adding VK2, VK4, VK32, VK64 masked register classes.
Adding new types (v64i8, v32i16) to VR512.
Extending calling conventions for new types (v64i8, v32i16)
Patch by Zinovy Nis <zinovy.y.nis@intel.com>
Reviewed by Elena Demikhovsky <elena.demikhovsky@intel.com>
llvm-svn: 213545
|
|
|
|
|
|
|
| |
Clang tries to check the clobber list but doesn't list segment registers in its
x86 register list. This fixes PR20343.
llvm-svn: 213303
|
|
|
|
|
|
| |
This fixes http://llvm.org/PR20202
llvm-svn: 212352
|
|
|
|
|
|
| |
Temporarily back out commits r211749, r211752 and r211754.
llvm-svn: 211814
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
string_ostream is a safe and efficient string builder that combines opaque
stack storage with a built-in ostream interface.
small_string_ostream<bytes> additionally permits an explicit stack storage size
other than the default 128 bytes to be provided. Beyond that, storage is
transferred to the heap.
This convenient class can be used in most places an
std::string+raw_string_ostream pair or SmallString<>+raw_svector_ostream pair
would previously have been used, in order to guarantee consistent access
without byte truncation.
The patch also converts much of LLVM to use the new facility. These changes
include several probable bug fixes for truncated output, a programming error
that's no longer possible with the new interface.
llvm-svn: 211749
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
We would get confused by '@' characters in symbol names, we would
mistake the text following them for the variant kind.
When an identifier a string, the variant kind will never show up inside
of it. Instead, check to see if there is a variant following the
string.
This fixes PR19965.
llvm-svn: 211249
|
|
|
|
|
|
|
|
|
|
|
|
| |
I saw at least a memory leak or two from inspection (on probably
untested error paths) and r206991, which was the original inspiration
for this change.
I ran this idea by Jim Grosbach a few weeks ago & he was OK with it.
Since it's a basically mechanical patch that seemed sufficient - usual
post-commit review, revert, etc, as needed.
llvm-svn: 210427
|
|
|
|
| |
llvm-svn: 207197
|
|
|
|
|
|
| |
Patch by Yuri Gorshenin.
llvm-svn: 207115
|
|
|
|
| |
llvm-svn: 206991
|
|
|
|
|
|
|
|
|
| |
For now it contains a single flag, SanitizeAddress, which enables
AddressSanitizer instrumentation of inline assembly.
Patch by Yuri Gorshenin.
llvm-svn: 206971
|
|
|
|
|
|
|
|
| |
This is an initial version of *Sanitizer instrumentation of assembly code.
Patch by Yuri Gorshenin.
llvm-svn: 203908
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This changes the implementation of local directional labels to use a dedicated
map. With that it can then just use CreateTempSymbol, which is what the rest
of MC uses.
CreateTempSymbol doesn't do a great job at making sure the names are unique
(or being efficient when the names are not needed), but that should probably
be fixed in a followup patch.
This fixes pr18928.
llvm-svn: 203826
|
|
|
|
|
|
| |
class.
llvm-svn: 203418
|
|
|
|
|
|
|
|
| |
Fixes PR18994.
Tests, once again, in that other repository. =P
llvm-svn: 203146
|
|
|
|
|
|
|
|
|
|
| |
This is required to include MSVC's <atomic> header, which we do now in
LLVM.
Tests forthcoming in Clang, since that's where we test semantic inline
asm changes.
llvm-svn: 202865
|
|
|
|
|
|
|
|
|
| |
We were dropping the displacement on the floor if we also had some
immediate offset.
Should fix PR19033.
llvm-svn: 202774
|
|
|
|
|
|
|
|
|
|
| |
X86Operand is extracted into individual header, because it allows to create an
arbitrary memory operand and append it to MCInst. It'll be reused in X86 inline
assembly instrumentation.
Patch by Yuri Gorshenin.
llvm-svn: 202496
|
|
|
|
| |
llvm-svn: 201761
|
|
|
|
|
|
|
|
| |
Nis Zinovy (zinovy.y.nis@intel.com)
Fixed truncate i32 to i1; a test will be provided in the next commit.
llvm-svn: 201757
|
|
|
|
|
|
|
|
| |
the << and >> bitwise operators.
rdar://15975725
llvm-svn: 200896
|
|
|
|
| |
llvm-svn: 200345
|
|
|
|
|
|
|
|
|
| |
registers in memory addresses that do not match the index register. As it does
for .att_syntax.
rdar://15887380
llvm-svn: 199948
|
|
|
|
|
|
|
|
|
|
|
| |
scale factors in memory addresses. As it does for .att_syntax.
It was producing:
Assertion failed: (((Scale == 1 || Scale == 2 || Scale == 4 || Scale == 8)) && "Invalid scale!"), function CreateMem, file /Volumes/SandBox/llvm/lib/Target/X86/AsmParser/X86AsmParser.cpp, line 1133.
rdar://14967214
llvm-svn: 199942
|
|
|
|
| |
llvm-svn: 199810
|
|
|
|
| |
llvm-svn: 199809
|
|
|
|
| |
llvm-svn: 199808
|