Commit 226c91327d1eebf9a70b670830c181a46c6c454b

Authored by bellard
1 parent b8bf3e3a

fixed from 2.4.20 kernel


git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@154 c046a42c-6fe2-441c-8c8c-71466251a162
Showing 1 changed file with 10 additions and 0 deletions
linux-user/vm86.c
... ... @@ -141,6 +141,11 @@ static inline void clear_TF(CPUX86State *env)
141 141 env->eflags &= ~TF_MASK;
142 142 }
143 143  
  144 +static inline void clear_AC(CPUX86State *env)
  145 +{
  146 + env->eflags &= ~AC_MASK;
  147 +}
  148 +
144 149 static inline int set_vflags_long(unsigned long eflags, CPUX86State *env)
145 150 {
146 151 TaskState *ts = env->opaque;
... ... @@ -149,6 +154,8 @@ static inline int set_vflags_long(unsigned long eflags, CPUX86State *env)
149 154 set_flags(env->eflags, eflags, SAFE_MASK);
150 155 if (eflags & IF_MASK)
151 156 return set_IF(env);
  157 + else
  158 + clear_IF(env);
152 159 return 0;
153 160 }
154 161  
... ... @@ -160,6 +167,8 @@ static inline int set_vflags_short(unsigned short flags, CPUX86State *env)
160 167 set_flags(env->eflags, flags, SAFE_MASK);
161 168 if (flags & IF_MASK)
162 169 return set_IF(env);
  170 + else
  171 + clear_IF(env);
163 172 return 0;
164 173 }
165 174  
... ... @@ -217,6 +226,7 @@ static void do_int(CPUX86State *env, int intno)
217 226 cpu_x86_load_seg(env, R_CS, segoffs >> 16);
218 227 clear_TF(env);
219 228 clear_IF(env);
  229 + clear_AC(env);
220 230 return;
221 231 cannot_handle:
222 232 #if defined(DEBUG_VM86)
... ...