diff options
author | Tamar Christina <tamar.christina@arm.com> | 2017-12-19 12:04:13 +0000 |
---|---|---|
committer | Tamar Christina <tamar.christina@arm.com> | 2017-12-19 12:19:15 +0000 |
commit | a3b3345ae62503982698171bcfce0afe23bd8a31 (patch) | |
tree | 3d456a11868c44ea882e3490e6c157d8a6c525f7 /gas/config | |
parent | bef7475fbda88374ca488b0acbbfe1d3d4ab3e5f (diff) | |
download | gdb-a3b3345ae62503982698171bcfce0afe23bd8a31.zip gdb-a3b3345ae62503982698171bcfce0afe23bd8a31.tar.gz gdb-a3b3345ae62503982698171bcfce0afe23bd8a31.tar.bz2 |
Add support for V_4B so we can properly reject it.
Previously parse_vector_type_for_operand was changed to allow the use of 4b
register size for indexed lane instructions. However this had the unintended
side effect of also allowing 4b for normal vector registers.
Because this support was only partial the rest of the tool silently treated
4b as 8b and continued. This patch adds full support for 4b so it can be
properly distinguished from 8b and the correct errors are generated.
With this patch you still can't encode any instruction which actually requires
v<num>.4b but such instructions don't exist so to prevent needing a workaround
in get_vreg_qualifier_from_value this was just omitted.
gas/
PR gas/22529
* config/tc-aarch64.c (vectype_to_qualifier): Support AARCH64_OPND_QLF_V_4B.
* gas/testsuite/gas/aarch64/pr22529.s: New.
* gas/testsuite/gas/aarch64/pr22529.d: New.
* gas/testsuite/gas/aarch64/pr22529.l: New.
include/
PR gas/22529
* opcode/aarch64.h (aarch64_opnd_qualifier): Add AARCH64_OPND_QLF_V_4B.
opcodes/
PR gas/22529
* aarch64-opc.c (aarch64_opnd_qualifiers): Add 4b variant.
Diffstat (limited to 'gas/config')
-rw-r--r-- | gas/config/tc-aarch64.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/gas/config/tc-aarch64.c b/gas/config/tc-aarch64.c index 832f4e8..6b5179e 100644 --- a/gas/config/tc-aarch64.c +++ b/gas/config/tc-aarch64.c @@ -4911,7 +4911,7 @@ vectype_to_qualifier (const struct vector_type_el *vectype) = {1, 2, 4, 8, 16}; const unsigned int ele_base [5] = { - AARCH64_OPND_QLF_V_8B, + AARCH64_OPND_QLF_V_4B, AARCH64_OPND_QLF_V_2H, AARCH64_OPND_QLF_V_2S, AARCH64_OPND_QLF_V_1D, @@ -4946,7 +4946,7 @@ vectype_to_qualifier (const struct vector_type_el *vectype) a vector-type dependent amount. */ shift = 0; if (vectype->type == NT_b) - shift = 4; + shift = 3; else if (vectype->type == NT_h || vectype->type == NT_s) shift = 2; else if (vectype->type >= NT_d) @@ -4955,7 +4955,7 @@ vectype_to_qualifier (const struct vector_type_el *vectype) gas_assert (0); offset = ele_base [vectype->type] + (vectype->width >> shift); - gas_assert (AARCH64_OPND_QLF_V_8B <= offset + gas_assert (AARCH64_OPND_QLF_V_4B <= offset && offset <= AARCH64_OPND_QLF_V_1Q); return offset; } |