diff options
author | Richard Henderson <richard.henderson@linaro.org> | 2022-04-26 22:19:26 -0700 |
---|---|---|
committer | Peter Maydell <peter.maydell@linaro.org> | 2022-04-28 13:40:16 +0100 |
commit | 8b7a5bbecff7d2128ddf81fe9886692c820b742e (patch) | |
tree | aa31c5a39d96c88d70e84198c54035e1f5eba5a9 /target/arm/debug_helper.c | |
parent | eb851c1151252158ab5b5917c5d386e1d69de3a2 (diff) | |
download | qemu-8b7a5bbecff7d2128ddf81fe9886692c820b742e.zip qemu-8b7a5bbecff7d2128ddf81fe9886692c820b742e.tar.gz qemu-8b7a5bbecff7d2128ddf81fe9886692c820b742e.tar.bz2 |
target/arm: Use field names for accessing DBGWCRn
While defining these names, use the correct field width of 5 not 4 for
DBGWCR.MASK. This typo prevented setting a watchpoint larger than 32k.
Reported-by: Chris Howard <cvz185@web.de>
Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
Reviewed-by: Alex Bennée <alex.bennee@linaro.org>
Message-id: 20220427051926.295223-1-richard.henderson@linaro.org
Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
Diffstat (limited to 'target/arm/debug_helper.c')
-rw-r--r-- | target/arm/debug_helper.c | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/target/arm/debug_helper.c b/target/arm/debug_helper.c index 32f3cae..4689369 100644 --- a/target/arm/debug_helper.c +++ b/target/arm/debug_helper.c @@ -143,9 +143,9 @@ static bool bp_wp_matches(ARMCPU *cpu, int n, bool is_wp) * Non-Secure to simplify the code slightly compared to the full * table in the ARM ARM. */ - pac = extract64(cr, 1, 2); - hmc = extract64(cr, 13, 1); - ssc = extract64(cr, 14, 2); + pac = FIELD_EX64(cr, DBGWCR, PAC); + hmc = FIELD_EX64(cr, DBGWCR, HMC); + ssc = FIELD_EX64(cr, DBGWCR, SSC); switch (ssc) { case 0: @@ -184,8 +184,8 @@ static bool bp_wp_matches(ARMCPU *cpu, int n, bool is_wp) g_assert_not_reached(); } - wt = extract64(cr, 20, 1); - lbn = extract64(cr, 16, 4); + wt = FIELD_EX64(cr, DBGWCR, WT); + lbn = FIELD_EX64(cr, DBGWCR, LBN); if (wt && !linked_bp_matches(cpu, lbn)) { return false; |