summaryrefslogtreecommitdiffstats
path: root/target-arm/op_helper.c
diff options
context:
space:
mode:
authorPaolo Bonzini2016-03-04 12:30:21 +0100
committerPeter Maydell2016-03-04 12:30:21 +0100
commit9886ecdf31165de2d4b8bccc1a220bd6ac8bc192 (patch)
treedcf7ac4757818aec6738dc97b17e3f2c934ca2ef /target-arm/op_helper.c
parenttarget-arm: introduce tbflag for endianness (diff)
downloadqemu-9886ecdf31165de2d4b8bccc1a220bd6ac8bc192.tar.gz
qemu-9886ecdf31165de2d4b8bccc1a220bd6ac8bc192.tar.xz
qemu-9886ecdf31165de2d4b8bccc1a220bd6ac8bc192.zip
target-arm: implement setend
Since this is not a high-performance path, just use a helper to flip the E bit and force a lookup in the hash table since the flags have changed. Signed-off-by: Paolo Bonzini <pbonzini@redhat.com> Signed-off-by: Peter Crosthwaite <crosthwaite.peter@gmail.com> Reviewed-by: Peter Maydell <peter.maydell@linaro.org> Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
Diffstat (limited to 'target-arm/op_helper.c')
-rw-r--r--target-arm/op_helper.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/target-arm/op_helper.c b/target-arm/op_helper.c
index 4881e34177..92fde0a68c 100644
--- a/target-arm/op_helper.c
+++ b/target-arm/op_helper.c
@@ -296,6 +296,11 @@ uint32_t HELPER(usat16)(CPUARMState *env, uint32_t x, uint32_t shift)
return res;
}
+void HELPER(setend)(CPUARMState *env)
+{
+ env->uncached_cpsr ^= CPSR_E;
+}
+
/* Function checks whether WFx (WFI/WFE) instructions are set up to be trapped.
* The function returns the target EL (1-3) if the instruction is to be trapped;
* otherwise it returns 0 indicating it is not trapped.