diff options
author | aurel32 <aurel32> | 2008-09-18 00:02:17 +0000 |
---|---|---|
committer | aurel32 <aurel32@c046a42c-6fe2-441c-8c8c-71466251a162> | 2008-09-18 00:02:17 +0000 |
commit | 2e7b5e17c9a9ee0090711077d1ebc9ca0ea9b684 (patch) | |
tree | 37fce04e972bd2ecf5a1afbe5c61eb77bfb98056 /qemu/target-alpha/op_helper.c | |
parent | 443e076a11c9063e3770cec12f6b8d53ea14c617 (diff) |
target-alpha: switch a few helpers to TCG
Switch a few helpers to TCG and implement RC and RS instructions
Signed-off-by: Aurelien Jarno <aurelien@aurel32.net>
Diffstat (limited to 'qemu/target-alpha/op_helper.c')
-rw-r--r-- | qemu/target-alpha/op_helper.c | 38 |
1 files changed, 24 insertions, 14 deletions
diff --git a/qemu/target-alpha/op_helper.c b/qemu/target-alpha/op_helper.c index 194f4108..c6dcead3 100644 --- a/qemu/target-alpha/op_helper.c +++ b/qemu/target-alpha/op_helper.c @@ -58,7 +58,7 @@ void helper_print_mem_EA (target_ulong EA) /*****************************************************************************/ /* Exceptions processing helpers */ -void helper_excp (uint32_t excp, uint32_t error) +void helper_excp (int excp, int error) { env->exception_index = excp; env->error_code = error; @@ -80,15 +80,15 @@ uint64_t helper_amask (uint64_t arg) return arg; } -void helper_load_pcc (void) +uint64_t helper_load_pcc (void) { /* XXX: TODO */ - T0 = 0; + return 0; } -void helper_load_implver (void) +uint64_t helper_load_implver (void) { - T0 = env->implver; + return env->implver; } void helper_load_fpcr (void) @@ -137,20 +137,30 @@ void helper_store_fpcr (void) } } -void helper_load_irf (void) -{ - /* XXX: TODO */ - T0 = 0; -} +spinlock_t intr_cpu_lock = SPIN_LOCK_UNLOCKED; -void helper_set_irf (void) +uint64_t helper_rs(void) { - /* XXX: TODO */ + uint64_t tmp; + + spin_lock(&intr_cpu_lock); + tmp = env->intr_flag; + env->intr_flag = 1; + spin_unlock(&intr_cpu_lock); + + return tmp; } -void helper_clear_irf (void) +uint64_t helper_rc(void) { - /* XXX: TODO */ + uint64_t tmp; + + spin_lock(&intr_cpu_lock); + tmp = env->intr_flag; + env->intr_flag = 0; + spin_unlock(&intr_cpu_lock); + + return tmp; } void helper_addqv (void) |