aboutsummaryrefslogtreecommitdiff
path: root/target-i386/helper.c
diff options
context:
space:
mode:
authorbellard <bellard@c046a42c-6fe2-441c-8c8c-71466251a162>2008-05-21 17:07:20 +0000
committerbellard <bellard@c046a42c-6fe2-441c-8c8c-71466251a162>2008-05-21 17:07:20 +0000
commitbd7a7b33df84cb053f9d2ac774d77372e4065d5f (patch)
tree0a50cda446062f042d8ee07ae88dc92d6b05bf78 /target-i386/helper.c
parent3bd7da9e1851f024919c07eba4c29acf209ecd6e (diff)
convert eflags manipulation insns to TCG
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@4515 c046a42c-6fe2-441c-8c8c-71466251a162
Diffstat (limited to 'target-i386/helper.c')
-rw-r--r--target-i386/helper.c14
1 files changed, 14 insertions, 0 deletions
diff --git a/target-i386/helper.c b/target-i386/helper.c
index 731d7a328c..d04622ff1c 100644
--- a/target-i386/helper.c
+++ b/target-i386/helper.c
@@ -108,6 +108,20 @@ void helper_unlock(void)
spin_unlock(&global_cpu_lock);
}
+void helper_write_eflags(target_ulong t0, uint32_t update_mask)
+{
+ load_eflags(t0, update_mask);
+}
+
+target_ulong helper_read_eflags(void)
+{
+ uint32_t eflags;
+ eflags = cc_table[CC_OP].compute_all();
+ eflags |= (DF & DF_MASK);
+ eflags |= env->eflags & ~(VM_MASK | RF_MASK);
+ return eflags;
+}
+
/* return non zero if error */
static inline int load_segment(uint32_t *e1_ptr, uint32_t *e2_ptr,
int selector)