From fb602cb726b3ebdd01ef3b1732d74baf9fee7ec9 Mon Sep 17 00:00:00 2001 From: Peter Maydell Date: Thu, 7 Sep 2017 13:54:54 +0100 Subject: target/arm: Implement BXNS, and banked stack pointers Implement the BXNS v8M instruction, which is like BX but will do a jump-and-switch-to-NonSecure if the branch target address has bit 0 clear. This is the first piece of code which implements "switch to the other security state", so the commit also includes the code to switch the stack pointers around, which is the only complicated part of switching security state. BLXNS is more complicated than just "BXNS but set the link register", so we leave it for a separate commit. Signed-off-by: Peter Maydell Reviewed-by: Richard Henderson Message-id: 1503414539-28762-21-git-send-email-peter.maydell@linaro.org --- target/arm/helper.h | 2 ++ 1 file changed, 2 insertions(+) (limited to 'target/arm/helper.h') diff --git a/target/arm/helper.h b/target/arm/helper.h index df86bf7141..64afbac59f 100644 --- a/target/arm/helper.h +++ b/target/arm/helper.h @@ -63,6 +63,8 @@ DEF_HELPER_1(cpsr_read, i32, env) DEF_HELPER_3(v7m_msr, void, env, i32, i32) DEF_HELPER_2(v7m_mrs, i32, env, i32) +DEF_HELPER_2(v7m_bxns, void, env, i32) + DEF_HELPER_4(access_check_cp_reg, void, env, ptr, i32, i32) DEF_HELPER_3(set_cp_reg, void, env, ptr, i32) DEF_HELPER_2(get_cp_reg, i32, env, ptr) -- cgit 1.4.1