qemu-e2k/target-sparc/op_mem.h
blueswir1 ce8536e23f Convert ldf/ldfsr and stf/stfsr to TCG
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@4101 c046a42c-6fe2-441c-8c8c-71466251a162
2008-03-22 08:47:14 +00:00

52 lines
1.2 KiB
C

#ifdef TARGET_ABI32
#define ADDR(x) ((x) & 0xffffffff)
#else
#define ADDR(x) (x)
#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 ***/
void OPPROTO glue(op_stdf, MEMSUFFIX) (void)
{
glue(stfq, MEMSUFFIX)(ADDR(T0), DT0);
}
/*** Floating-point load ***/
void OPPROTO glue(op_lddf, MEMSUFFIX) (void)
{
DT0 = glue(ldfq, MEMSUFFIX)(ADDR(T0));
}
#if defined(CONFIG_USER_ONLY)
void OPPROTO glue(op_ldqf, MEMSUFFIX) (void)
{
// XXX add 128 bit load
CPU_QuadU u;
u.ll.upper = glue(ldq, MEMSUFFIX)(ADDR(T0));
u.ll.lower = glue(ldq, MEMSUFFIX)(ADDR(T0 + 8));
QT0 = u.q;
}
void OPPROTO glue(op_stqf, MEMSUFFIX) (void)
{
// XXX add 128 bit store
CPU_QuadU u;
u.q = QT0;
glue(stq, MEMSUFFIX)(ADDR(T0), u.ll.upper);
glue(stq, MEMSUFFIX)(ADDR(T0 + 8), u.ll.lower);
}
#endif
#undef MEMSUFFIX