| Commit message (Collapse) | Author | Age | Files | Lines |
... | |
|
|
|
| |
llvm-svn: 221358
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Some ARM FPUs only have 16 double-precision registers, rather than the
normal 32. LLVM represents this with the D16 target feature. This is
currently used by CodeGen to avoid using high registers when they are
not available, but the assembler and disassembler do not.
I fix this in the assmebler and disassembler rather than the
InstrInfo.td files, as the latter would require a large number of
changes everywhere one of the floating-point instructions is referenced
in the backend. This solution is similar to the one used for
co-processor numbers and MSR masks.
llvm-svn: 221341
|
|
|
|
|
|
|
|
|
| |
Currently, the ARM disassembler will disassemble the Thumb2 memory hint
instructions (PLD, PLDW and PLI), even for targets which do not have
these instructions. This patch adds the required checks to the
disassmebler.
llvm-svn: 220472
|
|
|
|
|
|
|
|
|
|
|
|
| |
This patch implements a few changes related to the Thumb2 M-class MSR instruction:
* better handling of unpredictable encodings,
* recognition of the _g and _nzcvqg variants by the asm parser only if the DSP
extension is available, preferred output of MSR APSR moves with the _<bits>
suffix for v7-M.
Patch by Petr Pavlu.
llvm-svn: 216874
|
|
|
|
|
|
|
|
|
|
| |
These are system-only instructions for CPUs with virtualization
extensions, allowing a hypervisor easy access to all of the various
different AArch32 registers.
rdar://problem/17861345
llvm-svn: 215700
|
|
|
|
|
|
|
|
|
|
| |
to assemble back.
Note: The current code in DecodeMSRMask() rejects the unpredictable A/R MSR mask '0000' with Fail. The code in the patch follows this style and rejects unpredictable M-class MSR masks also with Fail (instead of SoftFail). If SoftFail is preferred in this case then additional changes to ARMInstPrinter (to print non-symbolic masks) and ARMAsmParser (to parse non-symbolic masks) will be needed.
Patch by Petr Pavlu!
llvm-svn: 214505
|
|
|
|
| |
llvm-svn: 213856
|
|
|
|
| |
llvm-svn: 213832
|
|
|
|
|
|
|
| |
definition below all of the header #include lines, lib/Target/...
edition.
llvm-svn: 206842
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This patch re-introduces the MCContext member that was removed from
MCDisassembler in r206063, and requires that an MCContext be passed in at
MCDisassembler construction time. (Previously the MCContext member had been
initialized in an ad-hoc fashion after construction). The MCCContext member
can be used by MCDisassembler sub-classes to construct constant or
target-specific MCExprs.
This patch updates disassemblers for in-tree targets, and provides the
MCRegisterInfo instance that some disassemblers were using through the
MCContext (previously those backends were constructing their own
MCRegisterInfo instances).
llvm-svn: 206241
|
|
|
|
|
|
| |
ThumbLE/ThumbBE
llvm-svn: 205317
|
|
|
|
|
|
| |
Reviewed at http://llvm-reviews.chandlerc.com/D3095
llvm-svn: 205007
|
|
|
|
|
|
| |
class.
llvm-svn: 203439
|
|
|
|
| |
llvm-svn: 202806
|
|
|
|
|
|
|
|
|
| |
CommonTableGen.
add_public_tablegen_target adds *CommonTableGen to LLVM_COMMON_DEPENDS.
LLVM_COMMON_DEPENDS affects add_llvm_library (and other add_target stuff) within its scope.
llvm-svn: 195927
|
|
|
|
|
|
| |
sets them.
llvm-svn: 195921
|
|
|
|
|
|
| |
ARMv8 (ARM encodings)
llvm-svn: 194261
|
|
|
|
| |
llvm-svn: 193705
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
The set of circumstances where the writeback register is allowed to be in the
list of registers is rather baroque, but I think this implements them all on
the assembly parsing side.
For disassembly, we still warn about an ARM-mode LDM even if the architecture
revision is < v7 (the required architecture information isn't available). It's
a silly instruction anyway, so hopefully no-one will mind.
rdar://problem/15223374
llvm-svn: 193185
|
|
|
|
|
|
| |
Pointed out by Joerg.
llvm-svn: 191749
|
|
|
|
| |
llvm-svn: 190996
|
|
|
|
|
|
|
|
| |
definition of t2PLDWpci,
as pldw does not have a literal variant (i.e. pc relative version)
llvm-svn: 187804
|
|
|
|
|
|
|
| |
This adds a new class for non-predicable NEON instructions and a
new DecoderNamespace for v8 NEON instructions.
llvm-svn: 186504
|
|
|
|
| |
llvm-svn: 185651
|
|
|
|
|
|
|
|
|
| |
instructions.
This adds a new decoder table/namespace 'VFPV8', as these instructions have their
top 4 bits as 0b1111, while other Thumb instructions have 0b1110.
llvm-svn: 185642
|
|
|
|
|
|
|
| |
When encoded to thumb, VFP instruction and VMOV/VDUP between scalar and
core registers, must have their predicate bit to 0b1110.
llvm-svn: 184707
|
|
|
|
| |
llvm-svn: 184706
|
|
|
|
|
|
| |
mask == 0 -> UNPRED
llvm-svn: 184702
|
|
|
|
| |
llvm-svn: 184701
|
|
|
|
|
|
|
|
| |
This fixes two previous issues:
- Negative offsets were not correctly disassembled
- The decoded opcodes were not the right one
llvm-svn: 184180
|
|
|
|
| |
llvm-svn: 184179
|
|
|
|
| |
llvm-svn: 183914
|
|
|
|
| |
llvm-svn: 183731
|
|
|
|
|
|
| |
The decoded MCInst wasn't reencoded as the same instruction
llvm-svn: 183729
|
|
|
|
|
|
| |
ISB should only accepts full system sync, other options are reserved
llvm-svn: 183656
|
|
|
|
|
|
| |
Enforce Table A7-15 (op=1, cmode=0b111) -> UNDEF
llvm-svn: 183612
|
|
|
|
| |
llvm-svn: 183611
|
|
|
|
|
|
|
|
|
| |
Handle the case when the disassembler table can't tell
the difference between some encodings of QADD and CPS.
Add some necessary safe guards in CPS decoding as well.
llvm-svn: 183610
|
|
|
|
|
|
| |
UNPRED was reported instead of UNDEF
llvm-svn: 183608
|
|
|
|
|
|
|
|
|
| |
These instructions are deprecated oddities, but we still need to be able to
disassemble (and reassemble) them if and when they're encountered.
Patch by Amaury de la Vieuville.
llvm-svn: 183011
|
|
|
|
| |
llvm-svn: 182680
|
|
|
|
|
|
|
|
|
|
| |
There was exactly one caller using this API right, the others were relying on
specific behavior of the default implementation. Since it's too hard to use it
right just remove it and standardize on the default behavior.
Defines away PR16132.
llvm-svn: 182636
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This is a basic first step towards symbolization of disassembled
instructions. This used to be done using externally provided (C API)
callbacks. This patch introduces:
- the MCSymbolizer class, that mimics the same functions that were used
in the X86 and ARM disassemblers to symbolize immediate operands and
to annotate loads based off PC (for things like c string literals).
- the MCExternalSymbolizer class, which implements the old C API.
- the MCRelocationInfo class, which provides a way for targets to
translate relocations (either object::RelocationRef, or disassembler
C API VariantKinds) to MCExprs.
- the MCObjectSymbolizer class, which does symbolization using what it
finds in an object::ObjectFile. This makes simple symbolization (with
no fancy relocation stuff) work for all object formats!
- x86-64 Mach-O and ELF MCRelocationInfos.
- A basic ARM Mach-O MCRelocationInfo, that provides just enough to
support the C API VariantKinds.
Most of what works in otool (the only user of the old symbolization API
that I know of) for x86-64 symbolic disassembly (-tvV) works, namely:
- symbol references: call _foo; jmp 15 <_foo+50>
- relocations: call _foo-_bar; call _foo-4
- __cf?string: leaq 193(%rip), %rax ## literal pool for "hello"
Stub support is the main missing part (because libObject doesn't know,
among other things, about mach-o indirect symbols).
As for the MCSymbolizer API, instead of relying on the disassemblers
to call the tryAdding* methods, maybe this could be done automagically
using InstrInfo? For instance, even though PC-relative LEAs are used
to get the address of string literals in a typical Mach-O file, a MOV
would be used in an ELF file. And right now, the explicit symbolization
only recognizes PC-relative LEAs. InstrInfo should have already have
most of what is needed to know what to symbolize, so this can
definitely be improved.
I'd also like to remove object::RelocationRef::getValueString (it seems
only used by relocation printing in objdump), as simply printing the
created MCExpr is definitely enough (and cleaner than string concats).
llvm-svn: 182625
|
|
|
|
|
|
| |
implemented. I have added these using wrapper methods around the original custom decoder (incidentally - this is a huge poorly written method that should be cleaned up. I have left it as is since the changes would be much to hard to review).
llvm-svn: 182281
|
|
|
|
|
|
| |
registers are half as many, the ARM reference manual mandates the least significant bit to be zeroed out. Failure to do so should result in an undefined instruction. With this change test/MC/Disassembler/ARM/invalid-VQADD-arm.txt is passing (removed XFAIL).
llvm-svn: 182279
|
|
|
|
| |
llvm-svn: 182226
|
|
|
|
|
|
| |
instructions when they are used to write to the APSR. In this case, the destination operand should be APSR_nzcv, and the encoding of the target should be 0b1111 (same as for PC). In pre-UAL syntax, this form used the PC register as a textual target. This is still allowed for backward compatibility.
llvm-svn: 181705
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
"hint" space for Thumb actually overlaps the encoding space of the CPS
instruction. In actuality, hints can be defined as CPS instructions where imod
and M bits are all nil.
Handle decoding of permitted nop-compatible hints (i.e. nop, yield, wfi, wfe,
sev) in DecodeT2CPSInstruction.
This commit adds a proper diagnostic message for Imm0_4 and updates all tests.
Patch by Mihail Popa <Mihail.Popa@arm.com>.
llvm-svn: 180617
|
|
|
|
|
|
| |
Patch from Mihail Popa
llvm-svn: 179854
|
|
|
|
| |
llvm-svn: 179847
|