Commit 9d0763c4c0bc7840a3113abf39aae6dd87e9be91

Authored by bellard
1 parent 0211e5af

converted BCD ops to TCG

git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@4509 c046a42c-6fe2-441c-8c8c-71466251a162
target-i386/op.c
... ... @@ -165,38 +165,6 @@ void OPPROTO op_cmpxchg8b(void)
165 165  
166 166 #endif
167 167  
168   -/* bcd */
169   -
170   -void OPPROTO op_aam(void)
171   -{
172   - helper_aam(PARAM1);
173   -}
174   -
175   -void OPPROTO op_aad(void)
176   -{
177   - helper_aad(PARAM1);
178   -}
179   -
180   -void OPPROTO op_aaa(void)
181   -{
182   - helper_aaa();
183   -}
184   -
185   -void OPPROTO op_aas(void)
186   -{
187   - helper_aas();
188   -}
189   -
190   -void OPPROTO op_daa(void)
191   -{
192   - helper_daa();
193   -}
194   -
195   -void OPPROTO op_das(void)
196   -{
197   - helper_das();
198   -}
199   -
200 168 /* segment handling */
201 169  
202 170 /* faster VM86 version */
... ...
target-i386/translate.c
... ... @@ -5926,7 +5926,7 @@ static target_ulong disas_insn(DisasContext *s, target_ulong pc_start)
5926 5926 goto illegal_op;
5927 5927 if (s->cc_op != CC_OP_DYNAMIC)
5928 5928 gen_op_set_cc_op(s->cc_op);
5929   - gen_op_daa();
  5929 + tcg_gen_helper_0_0(helper_daa);
5930 5930 s->cc_op = CC_OP_EFLAGS;
5931 5931 break;
5932 5932 case 0x2f: /* das */
... ... @@ -5934,7 +5934,7 @@ static target_ulong disas_insn(DisasContext *s, target_ulong pc_start)
5934 5934 goto illegal_op;
5935 5935 if (s->cc_op != CC_OP_DYNAMIC)
5936 5936 gen_op_set_cc_op(s->cc_op);
5937   - gen_op_das();
  5937 + tcg_gen_helper_0_0(helper_das);
5938 5938 s->cc_op = CC_OP_EFLAGS;
5939 5939 break;
5940 5940 case 0x37: /* aaa */
... ... @@ -5942,7 +5942,7 @@ static target_ulong disas_insn(DisasContext *s, target_ulong pc_start)
5942 5942 goto illegal_op;
5943 5943 if (s->cc_op != CC_OP_DYNAMIC)
5944 5944 gen_op_set_cc_op(s->cc_op);
5945   - gen_op_aaa();
  5945 + tcg_gen_helper_0_0(helper_aaa);
5946 5946 s->cc_op = CC_OP_EFLAGS;
5947 5947 break;
5948 5948 case 0x3f: /* aas */
... ... @@ -5950,7 +5950,7 @@ static target_ulong disas_insn(DisasContext *s, target_ulong pc_start)
5950 5950 goto illegal_op;
5951 5951 if (s->cc_op != CC_OP_DYNAMIC)
5952 5952 gen_op_set_cc_op(s->cc_op);
5953   - gen_op_aas();
  5953 + tcg_gen_helper_0_0(helper_aas);
5954 5954 s->cc_op = CC_OP_EFLAGS;
5955 5955 break;
5956 5956 case 0xd4: /* aam */
... ... @@ -5960,7 +5960,7 @@ static target_ulong disas_insn(DisasContext *s, target_ulong pc_start)
5960 5960 if (val == 0) {
5961 5961 gen_exception(s, EXCP00_DIVZ, pc_start - s->cs_base);
5962 5962 } else {
5963   - gen_op_aam(val);
  5963 + tcg_gen_helper_0_1(helper_aam, tcg_const_i32(val));
5964 5964 s->cc_op = CC_OP_LOGICB;
5965 5965 }
5966 5966 break;
... ... @@ -5968,7 +5968,7 @@ static target_ulong disas_insn(DisasContext *s, target_ulong pc_start)
5968 5968 if (CODE64(s))
5969 5969 goto illegal_op;
5970 5970 val = ldub_code(s->pc++);
5971   - gen_op_aad(val);
  5971 + tcg_gen_helper_0_1(helper_aad, tcg_const_i32(val));
5972 5972 s->cc_op = CC_OP_LOGICB;
5973 5973 break;
5974 5974 /************************/
... ...