aboutsummaryrefslogtreecommitdiff
path: root/target-microblaze/op_helper.c
diff options
context:
space:
mode:
Diffstat (limited to 'target-microblaze/op_helper.c')
-rw-r--r--target-microblaze/op_helper.c11
1 files changed, 11 insertions, 0 deletions
diff --git a/target-microblaze/op_helper.c b/target-microblaze/op_helper.c
index d99c564375..7232c71998 100644
--- a/target-microblaze/op_helper.c
+++ b/target-microblaze/op_helper.c
@@ -483,6 +483,17 @@ void helper_memalign(uint32_t addr, uint32_t dr, uint32_t wr, uint32_t mask)
}
}
+void helper_stackprot(uint32_t addr)
+{
+ if (addr < env->slr || addr > env->shr) {
+ qemu_log("Stack protector violation at %x %x %x\n",
+ addr, env->slr, env->shr);
+ env->sregs[SR_EAR] = addr;
+ env->sregs[SR_ESR] = ESR_EC_STACKPROT;
+ helper_raise_exception(EXCP_HW_EXCP);
+ }
+}
+
#if !defined(CONFIG_USER_ONLY)
/* Writes/reads to the MMU's special regs end up here. */
uint32_t helper_mmu_read(uint32_t rn)