Revision 4136f33c target-i386/op.c

b/target-i386/op.c
1138 1138
    CC_OP = PARAM1;
1139 1139
}
1140 1140

  
1141
#define FL_UPDATE_MASK16 (FL_UPDATE_MASK32 & 0xffff)
1141
/* XXX: clear VIF/VIP in all ops ? */
1142 1142

  
1143 1143
void OPPROTO op_movl_eflags_T0(void)
1144 1144
{
1145
    int eflags;
1146
    eflags = T0;
1147
    CC_SRC = eflags & (CC_O | CC_S | CC_Z | CC_A | CC_P | CC_C);
1148
    DF = 1 - (2 * ((eflags >> 10) & 1));
1149
    /* we also update some system flags as in user mode */
1150
    env->eflags = (env->eflags & ~FL_UPDATE_MASK32) | 
1151
        (eflags & FL_UPDATE_MASK32);
1145
    load_eflags(T0, (TF_MASK | AC_MASK | ID_MASK));
1152 1146
}
1153 1147

  
1154 1148
void OPPROTO op_movw_eflags_T0(void)
1155 1149
{
1156
    int eflags;
1157
    eflags = T0;
1158
    CC_SRC = eflags & (CC_O | CC_S | CC_Z | CC_A | CC_P | CC_C);
1159
    DF = 1 - (2 * ((eflags >> 10) & 1));
1160
    /* we also update some system flags as in user mode */
1161
    env->eflags = (env->eflags & ~FL_UPDATE_MASK16) | 
1162
        (eflags & FL_UPDATE_MASK16);
1150
    load_eflags(T0, (TF_MASK | AC_MASK | ID_MASK) & 0xffff);
1151
}
1152

  
1153
void OPPROTO op_movl_eflags_T0_io(void)
1154
{
1155
    load_eflags(T0, (TF_MASK | AC_MASK | ID_MASK | IF_MASK));
1156
}
1157

  
1158
void OPPROTO op_movw_eflags_T0_io(void)
1159
{
1160
    load_eflags(T0, (TF_MASK | AC_MASK | ID_MASK | IF_MASK) & 0xffff);
1163 1161
}
1164 1162

  
1165 1163
void OPPROTO op_movl_eflags_T0_cpl0(void)
1166 1164
{
1167
    load_eflags(T0, FL_UPDATE_CPL0_MASK);
1165
    load_eflags(T0, (TF_MASK | AC_MASK | ID_MASK | IF_MASK | IOPL_MASK));
1168 1166
}
1169 1167

  
1170 1168
void OPPROTO op_movw_eflags_T0_cpl0(void)
1171 1169
{
1172
    load_eflags(T0, FL_UPDATE_CPL0_MASK & 0xffff);
1170
    load_eflags(T0, (TF_MASK | AC_MASK | ID_MASK | IF_MASK | IOPL_MASK) & 0xffff);
1173 1171
}
1174 1172

  
1175 1173
#if 0

Also available in: Unified diff