aboutsummaryrefslogtreecommitdiff
path: root/target/arm/kvm64.c
diff options
context:
space:
mode:
authorPeter Maydell <peter.maydell@linaro.org>2018-10-24 07:50:18 +0100
committerPeter Maydell <peter.maydell@linaro.org>2018-10-24 07:51:36 +0100
commit64b91e3f890a8c221b65c6820a5ee39107ee40f5 (patch)
tree289b3023def6a132a591230c9227ec094466a638 /target/arm/kvm64.c
parenteadb2febf05452bd8062c4c7823d7d789142500c (diff)
target/arm: New utility function to extract EC from syndrome
Create and use a utility function to extract the EC field from a syndrome, rather than open-coding the shift. Signed-off-by: Peter Maydell <peter.maydell@linaro.org> Reviewed-by: Richard Henderson <richard.henderson@linaro.org> Message-id: 20181012144235.19646-9-peter.maydell@linaro.org
Diffstat (limited to 'target/arm/kvm64.c')
-rw-r--r--target/arm/kvm64.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/target/arm/kvm64.c b/target/arm/kvm64.c
index 5411486491..5de8ff0ac5 100644
--- a/target/arm/kvm64.c
+++ b/target/arm/kvm64.c
@@ -933,7 +933,7 @@ int kvm_arch_remove_sw_breakpoint(CPUState *cs, struct kvm_sw_breakpoint *bp)
bool kvm_arm_handle_debug(CPUState *cs, struct kvm_debug_exit_arch *debug_exit)
{
- int hsr_ec = debug_exit->hsr >> ARM_EL_EC_SHIFT;
+ int hsr_ec = syn_get_ec(debug_exit->hsr);
ARMCPU *cpu = ARM_CPU(cs);
CPUClass *cc = CPU_GET_CLASS(cs);
CPUARMState *env = &cpu->env;