Temporary fix for i386 host

git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@3994 c046a42c-6fe2-441c-8c8c-71466251a162
This commit is contained in:
blueswir1 2008-02-27 17:44:03 +00:00
parent 77b087cd27
commit b25deda7ca
2 changed files with 27 additions and 0 deletions

View File

@ -4,6 +4,16 @@
#define ADDR(x) (x) #define ADDR(x) (x)
#endif #endif
#ifdef __i386__
/*** Integer store ***/
void OPPROTO glue(op_std, MEMSUFFIX)(void)
{
uint64_t tmp = ((uint64_t)T1 << 32) | (uint64_t)(T2 & 0xffffffff);
glue(stq, MEMSUFFIX)(ADDR(T0), tmp);
}
#endif /* __i386__ */
/*** Floating-point store ***/ /*** Floating-point store ***/
void OPPROTO glue(op_stf, MEMSUFFIX) (void) void OPPROTO glue(op_stf, MEMSUFFIX) (void)
{ {

View File

@ -192,6 +192,9 @@ GEN32(gen_op_store_QT1_fpr, gen_op_store_QT1_fpr_fprf);
#endif #endif
#ifndef CONFIG_USER_ONLY #ifndef CONFIG_USER_ONLY
#ifdef __i386__
OP_LD_TABLE(std);
#endif /* __i386__ */
OP_LD_TABLE(stf); OP_LD_TABLE(stf);
OP_LD_TABLE(stdf); OP_LD_TABLE(stdf);
OP_LD_TABLE(ldf); OP_LD_TABLE(ldf);
@ -231,6 +234,13 @@ static inline void gen_movl_reg_T1(int reg)
gen_movl_reg_TN(reg, cpu_T[1]); gen_movl_reg_TN(reg, cpu_T[1]);
} }
#ifdef __i386__
static inline void gen_movl_reg_T2(int reg)
{
gen_movl_reg_TN(reg, cpu_T[2]);
}
#endif /* __i386__ */
static inline void gen_movl_TN_reg(int reg, TCGv tn) static inline void gen_movl_TN_reg(int reg, TCGv tn)
{ {
if (reg == 0) if (reg == 0)
@ -3275,6 +3285,7 @@ static void disas_sparc_insn(DisasContext * dc)
case 0x7: /* store double word */ case 0x7: /* store double word */
if (rd & 1) if (rd & 1)
goto illegal_insn; goto illegal_insn;
#ifndef __i386__
else { else {
TCGv r_dword, r_low; TCGv r_dword, r_low;
@ -3286,6 +3297,12 @@ static void disas_sparc_insn(DisasContext * dc)
r_low); r_low);
tcg_gen_qemu_st64(r_dword, cpu_T[0], dc->mem_idx); tcg_gen_qemu_st64(r_dword, cpu_T[0], dc->mem_idx);
} }
#else /* __i386__ */
gen_op_check_align_T0_7();
flush_T2(dc);
gen_movl_reg_T2(rd + 1);
gen_op_ldst(std);
#endif /* __i386__ */
break; break;
#if !defined(CONFIG_USER_ONLY) || defined(TARGET_SPARC64) #if !defined(CONFIG_USER_ONLY) || defined(TARGET_SPARC64)
case 0x14: /* store word alternate */ case 0x14: /* store word alternate */