diff options
author | bellard <bellard@c046a42c-6fe2-441c-8c8c-71466251a162> | 2003-06-30 10:11:50 +0000 |
---|---|---|
committer | bellard <bellard@c046a42c-6fe2-441c-8c8c-71466251a162> | 2003-06-30 10:11:50 +0000 |
commit | 5797fa5d7ef49ce4beec9586af0cc9c63f7a4b3a (patch) | |
tree | 65e1699621d97cf7a9abef99c8ff6ca644e8679d /op-i386.c | |
parent | 8ef9a8ece3aa8c92eccf998aaac5f38d74acb757 (diff) |
first step to fix precise eflags update in case of exception
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@293 c046a42c-6fe2-441c-8c8c-71466251a162
Diffstat (limited to 'op-i386.c')
-rw-r--r-- | op-i386.c | 46 |
1 files changed, 9 insertions, 37 deletions
@@ -80,62 +80,34 @@ static inline int lshift(int x, int n) /* operations with flags */ -void OPPROTO op_addl_T0_T1_cc(void) +/* update flags with T0 and T1 (add/sub case) */ +void OPPROTO op_update2_cc(void) { - CC_SRC = T0; - T0 += T1; + CC_SRC = T1; CC_DST = T0; } -void OPPROTO op_orl_T0_T1_cc(void) +/* update flags with T0 (logic operation case) */ +void OPPROTO op_update1_cc(void) { - T0 |= T1; - CC_DST = T0; -} - -void OPPROTO op_andl_T0_T1_cc(void) -{ - T0 &= T1; CC_DST = T0; } -void OPPROTO op_subl_T0_T1_cc(void) +void OPPROTO op_update_neg_cc(void) { - CC_SRC = T0; - T0 -= T1; - CC_DST = T0; -} - -void OPPROTO op_xorl_T0_T1_cc(void) -{ - T0 ^= T1; + CC_SRC = -T0; CC_DST = T0; } void OPPROTO op_cmpl_T0_T1_cc(void) { - CC_SRC = T0; + CC_SRC = T1; CC_DST = T0 - T1; } -void OPPROTO op_negl_T0_cc(void) -{ - CC_SRC = 0; - T0 = -T0; - CC_DST = T0; -} - -void OPPROTO op_incl_T0_cc(void) -{ - CC_SRC = cc_table[CC_OP].compute_c(); - T0++; - CC_DST = T0; -} - -void OPPROTO op_decl_T0_cc(void) +void OPPROTO op_update_inc_cc(void) { CC_SRC = cc_table[CC_OP].compute_c(); - T0--; CC_DST = T0; } |