diff options
author | Simon Tatham <simon.tatham@arm.com> | 2020-01-23 11:53:27 +0000 |
---|---|---|
committer | Simon Tatham <simon.tatham@arm.com> | 2020-01-23 11:53:52 +0000 |
commit | 772e4931932270a82f38c83d4344c800b2f54eff (patch) | |
tree | 5c43fece7a5fe540c1fa131d0e18590101f8cbd3 /llvm/lib/Target/ARM/Disassembler/ARMDisassembler.cpp | |
parent | e8fc8507dacbab119a1ca14535d7c75f0514a078 (diff) | |
download | llvm-772e4931932270a82f38c83d4344c800b2f54eff.zip llvm-772e4931932270a82f38c83d4344c800b2f54eff.tar.gz llvm-772e4931932270a82f38c83d4344c800b2f54eff.tar.bz2 |
[ARM,MVE] Revise immediate VBIC/VORR to look more like NEON.
Summary:
In NEON, the immediate forms of VBIC and VORR are each represented as
a single MC instruction, which takes its immediate operand already
encoded in a NEON-friendly format: 8 data bits, plus some control bits
indicating how to expand them into a full vector.
In MVE, we represented immediate VBIC and VORR as four separate MC
instructions each, for an 8-bit immediate shifted left by 0, 8, 16 or
24 bits. For each one, the value of the immediate operand is in the
'natural' form, i.e. the numerical value that would actually be BICed
or ORRed into each vector lane (and also the same value shown in
assembly). For example, MVE_VBICIZ16v4i32 takes an operand such as
0xab0000, which NEON would represent as 0xab | (control bits << 8).
The MVE approach is superficially nice (it makes assembly input and
output easy, and it's also nice if you're manually constructing
immediate VBICs). But it turns out that it's better for isel if we
make the NEON and MVE instructions work the same, because the
ARMISD::VBICIMM and VORRIMM node types already encode their immediate
into the NEON format, so it's easier if we can just use it.
Also, this commit reduces the total amount of code rather than
increasing it, which is surely an indication that it really is simpler
to do it this way!
Reviewers: dmgreen, ostannard, miyuki, MarkMurrayARM
Reviewed By: dmgreen
Subscribers: kristof.beyls, hiraditya, llvm-commits
Tags: #llvm
Differential Revision: https://reviews.llvm.org/D73205
Diffstat (limited to 'llvm/lib/Target/ARM/Disassembler/ARMDisassembler.cpp')
-rw-r--r-- | llvm/lib/Target/ARM/Disassembler/ARMDisassembler.cpp | 14 |
1 files changed, 0 insertions, 14 deletions
diff --git a/llvm/lib/Target/ARM/Disassembler/ARMDisassembler.cpp b/llvm/lib/Target/ARM/Disassembler/ARMDisassembler.cpp index d26b045..e640f09 100644 --- a/llvm/lib/Target/ARM/Disassembler/ARMDisassembler.cpp +++ b/llvm/lib/Target/ARM/Disassembler/ARMDisassembler.cpp @@ -538,10 +538,6 @@ template<unsigned MinLog, unsigned MaxLog> static DecodeStatus DecodePowerTwoOperand(MCInst &Inst, unsigned Val, uint64_t Address, const void *Decoder); -template <int shift> -static DecodeStatus DecodeExpandedImmOperand(MCInst &Inst, unsigned Val, - uint64_t Address, - const void *Decoder); template<unsigned start> static DecodeStatus DecodeMVEPairVectorIndexOperand(MCInst &Inst, unsigned Val, uint64_t Address, @@ -6395,16 +6391,6 @@ static DecodeStatus DecodePowerTwoOperand(MCInst &Inst, unsigned Val, return S; } -template <int shift> -static DecodeStatus DecodeExpandedImmOperand(MCInst &Inst, unsigned Val, - uint64_t Address, - const void *Decoder) { - Val <<= shift; - - Inst.addOperand(MCOperand::createImm(Val)); - return MCDisassembler::Success; -} - template<unsigned start> static DecodeStatus DecodeMVEPairVectorIndexOperand(MCInst &Inst, unsigned Val, uint64_t Address, |