summaryrefslogtreecommitdiffstats
path: root/target-alpha/op_helper.c
diff options
context:
space:
mode:
authoraurel32 <aurel32@c046a42c-6fe2-441c-8c8c-71466251a162>2008-09-18 00:02:17 +0000
committeraurel32 <aurel32@c046a42c-6fe2-441c-8c8c-71466251a162>2008-09-18 00:02:17 +0000
commit6ad025921c4d6e63e7065ba084ffe6ddf709c4de (patch)
tree07653d52b627662aac5f68a045b4d9004cef8871 /target-alpha/op_helper.c
parentb3249f630e95f3235da438ee1a6cd1b867084e9c (diff)
downloadhqemu-6ad025921c4d6e63e7065ba084ffe6ddf709c4de.zip
hqemu-6ad025921c4d6e63e7065ba084ffe6ddf709c4de.tar.gz
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> git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@5247 c046a42c-6fe2-441c-8c8c-71466251a162
Diffstat (limited to 'target-alpha/op_helper.c')
-rw-r--r--target-alpha/op_helper.c38
1 files changed, 24 insertions, 14 deletions
diff --git a/target-alpha/op_helper.c b/target-alpha/op_helper.c
index 194f410..c6dcead 100644
--- a/target-alpha/op_helper.c
+++ b/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)
OpenPOWER on IntegriCloud