diff options
author | Peter Maydell <peter.maydell@linaro.org> | 2014-04-15 19:18:40 +0100 |
---|---|---|
committer | Peter Maydell <peter.maydell@linaro.org> | 2014-04-17 21:34:03 +0100 |
commit | 90e496386fe7fd32c189561f846b7913f95b8cf4 (patch) | |
tree | 7b16f13b257464c0c19bd6de4fc73d152551be54 /target-arm/translate.h | |
parent | 8c6afa6ab158467d1938cc92022135bc7a872006 (diff) | |
download | hqemu-90e496386fe7fd32c189561f846b7913f95b8cf4.zip hqemu-90e496386fe7fd32c189561f846b7913f95b8cf4.tar.gz |
target-arm: A64: Add assertion that FP access was checked
Because unallocated encodings generate different exception syndrome
information from traps due to FP being disabled, we can't do a single
"is fp access disabled" check at a high level in the decode tree.
To help in catching bugs where the access check was forgotten in some
code path, we set this flag when the access check is done, and assert
that it is set at the point where we actually touch the FP regs.
This requires us to pass the DisasContext to the vec_reg_offset
and fp_reg_offset functions.
Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
Reviewed-by: Peter Crosthwaite <peter.crosthwaite@xilinx.com>
Diffstat (limited to 'target-arm/translate.h')
-rw-r--r-- | target-arm/translate.h | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/target-arm/translate.h b/target-arm/translate.h index 4536f82..3f7d5ca 100644 --- a/target-arm/translate.h +++ b/target-arm/translate.h @@ -32,6 +32,14 @@ typedef struct DisasContext { int current_pl; GHashTable *cp_regs; uint64_t features; /* CPU features bits */ + /* Because unallocated encodings generate different exception syndrome + * information from traps due to FP being disabled, we can't do a single + * "is fp access disabled" check at a high level in the decode tree. + * To help in catching bugs where the access check was forgotten in some + * code path, we set this flag when the access check is done, and assert + * that it is set at the point where we actually touch the FP regs. + */ + bool fp_access_checked; #define TMP_A64_MAX 16 int tmp_a64_count; TCGv_i64 tmp_a64[TMP_A64_MAX]; |