projects
/
qemu.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
9c72b68
)
target/arm/translate-a64: Don't underdecode add/sub extended register
author
Peter Maydell
<peter.maydell@linaro.org>
Fri, 1 Feb 2019 14:55:44 +0000
(14:55 +0000)
committer
Peter Maydell
<peter.maydell@linaro.org>
Fri, 1 Feb 2019 14:55:44 +0000
(14:55 +0000)
In the "add/subtract (extended register)" encoding group, the "opt"
field in bits [23:22] must be zero. Correctly UNDEF the unallocated
encodings where this field is not zero.
Reported-by: Laurent Desnogues <laurent.desnogues@gmail.com>
Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
Reviewed-by: Laurent Desnogues <laurent.desnogues@gmail.com>
Message-id:
20190125182626
.9221-6-peter.maydell@linaro.org
target/arm/translate-a64.c
patch
|
blob
|
history
diff --git
a/target/arm/translate-a64.c
b/target/arm/translate-a64.c
index 2cade64ed25cfaf102a07b3f6692cbf9bf465960..94907f0ae977c1cd54a273adc0d247f665a8a038 100644
(file)
--- a/
target/arm/translate-a64.c
+++ b/
target/arm/translate-a64.c
@@
-4201,6
+4201,7
@@
static void disas_add_sub_ext_reg(DisasContext *s, uint32_t insn)
int imm3 = extract32(insn, 10, 3);
int option = extract32(insn, 13, 3);
int rm = extract32(insn, 16, 5);
+ int opt = extract32(insn, 22, 2);
bool setflags = extract32(insn, 29, 1);
bool sub_op = extract32(insn, 30, 1);
bool sf = extract32(insn, 31, 1);
@@
-4209,7
+4210,7
@@
static void disas_add_sub_ext_reg(DisasContext *s, uint32_t insn)
TCGv_i64 tcg_rd;
TCGv_i64 tcg_result;
- if (imm3 > 4) {
+ if (imm3 > 4
|| opt != 0
) {
unallocated_encoding(s);
return;
}