diff options
author | bellard <bellard@c046a42c-6fe2-441c-8c8c-71466251a162> | 2005-01-03 23:50:08 +0000 |
---|---|---|
committer | bellard <bellard@c046a42c-6fe2-441c-8c8c-71466251a162> | 2005-01-03 23:50:08 +0000 |
commit | 14ce26e755135e80f3726d42a5a887723d615291 (patch) | |
tree | 6d8f3631c3489af3d64182a016e64e55179ab53a /target-i386/ops_mem.h | |
parent | c46878786af930f8f06695371ee80ffa8acf98ef (diff) |
x86_64 target support
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@1197 c046a42c-6fe2-441c-8c8c-71466251a162
Diffstat (limited to 'target-i386/ops_mem.h')
-rw-r--r-- | target-i386/ops_mem.h | 83 |
1 files changed, 67 insertions, 16 deletions
diff --git a/target-i386/ops_mem.h b/target-i386/ops_mem.h index 6a2ad41ee2..284ab71af4 100644 --- a/target-i386/ops_mem.h +++ b/target-i386/ops_mem.h @@ -1,83 +1,134 @@ void OPPROTO glue(glue(op_ldub, MEMSUFFIX), _T0_A0)(void) { - T0 = glue(ldub, MEMSUFFIX)((uint8_t *)A0); + T0 = glue(ldub, MEMSUFFIX)(A0); } void OPPROTO glue(glue(op_ldsb, MEMSUFFIX), _T0_A0)(void) { - T0 = glue(ldsb, MEMSUFFIX)((int8_t *)A0); + T0 = glue(ldsb, MEMSUFFIX)(A0); } void OPPROTO glue(glue(op_lduw, MEMSUFFIX), _T0_A0)(void) { - T0 = glue(lduw, MEMSUFFIX)((uint8_t *)A0); + T0 = glue(lduw, MEMSUFFIX)(A0); } void OPPROTO glue(glue(op_ldsw, MEMSUFFIX), _T0_A0)(void) { - T0 = glue(ldsw, MEMSUFFIX)((int8_t *)A0); + T0 = glue(ldsw, MEMSUFFIX)(A0); } void OPPROTO glue(glue(op_ldl, MEMSUFFIX), _T0_A0)(void) { - T0 = glue(ldl, MEMSUFFIX)((uint8_t *)A0); + T0 = (uint32_t)glue(ldl, MEMSUFFIX)(A0); } void OPPROTO glue(glue(op_ldub, MEMSUFFIX), _T1_A0)(void) { - T1 = glue(ldub, MEMSUFFIX)((uint8_t *)A0); + T1 = glue(ldub, MEMSUFFIX)(A0); } void OPPROTO glue(glue(op_ldsb, MEMSUFFIX), _T1_A0)(void) { - T1 = glue(ldsb, MEMSUFFIX)((int8_t *)A0); + T1 = glue(ldsb, MEMSUFFIX)(A0); } void OPPROTO glue(glue(op_lduw, MEMSUFFIX), _T1_A0)(void) { - T1 = glue(lduw, MEMSUFFIX)((uint8_t *)A0); + T1 = glue(lduw, MEMSUFFIX)(A0); } void OPPROTO glue(glue(op_ldsw, MEMSUFFIX), _T1_A0)(void) { - T1 = glue(ldsw, MEMSUFFIX)((int8_t *)A0); + T1 = glue(ldsw, MEMSUFFIX)(A0); } void OPPROTO glue(glue(op_ldl, MEMSUFFIX), _T1_A0)(void) { - T1 = glue(ldl, MEMSUFFIX)((uint8_t *)A0); + T1 = glue(ldl, MEMSUFFIX)(A0); } void OPPROTO glue(glue(op_stb, MEMSUFFIX), _T0_A0)(void) { - glue(stb, MEMSUFFIX)((uint8_t *)A0, T0); + glue(stb, MEMSUFFIX)(A0, T0); } void OPPROTO glue(glue(op_stw, MEMSUFFIX), _T0_A0)(void) { - glue(stw, MEMSUFFIX)((uint8_t *)A0, T0); + glue(stw, MEMSUFFIX)(A0, T0); } void OPPROTO glue(glue(op_stl, MEMSUFFIX), _T0_A0)(void) { - glue(stl, MEMSUFFIX)((uint8_t *)A0, T0); + glue(stl, MEMSUFFIX)(A0, T0); } #if 0 void OPPROTO glue(glue(op_stb, MEMSUFFIX), _T1_A0)(void) { - glue(stb, MEMSUFFIX)((uint8_t *)A0, T1); + glue(stb, MEMSUFFIX)(A0, T1); } #endif void OPPROTO glue(glue(op_stw, MEMSUFFIX), _T1_A0)(void) { - glue(stw, MEMSUFFIX)((uint8_t *)A0, T1); + glue(stw, MEMSUFFIX)(A0, T1); } void OPPROTO glue(glue(op_stl, MEMSUFFIX), _T1_A0)(void) { - glue(stl, MEMSUFFIX)((uint8_t *)A0, T1); + glue(stl, MEMSUFFIX)(A0, T1); } +/* SSE support */ +void OPPROTO glue(glue(op_ldo, MEMSUFFIX), _env_A0)(void) +{ + XMMReg *p; + p = (XMMReg *)((char *)env + PARAM1); + /* XXX: host endianness ? */ + p->u.q[0] = glue(ldq, MEMSUFFIX)(A0); + p->u.q[1] = glue(ldq, MEMSUFFIX)(A0 + 8); +} + +void OPPROTO glue(glue(op_sto, MEMSUFFIX), _env_A0)(void) +{ + XMMReg *p; + p = (XMMReg *)((char *)env + PARAM1); + /* XXX: host endianness ? */ + glue(stq, MEMSUFFIX)(A0, p->u.q[0]); + glue(stq, MEMSUFFIX)(A0 + 8, p->u.q[1]); +} + +#ifdef TARGET_X86_64 +void OPPROTO glue(glue(op_ldsl, MEMSUFFIX), _T0_A0)(void) +{ + T0 = (int32_t)glue(ldl, MEMSUFFIX)(A0); +} + +void OPPROTO glue(glue(op_ldsl, MEMSUFFIX), _T1_A0)(void) +{ + T1 = (int32_t)glue(ldl, MEMSUFFIX)(A0); +} + +void OPPROTO glue(glue(op_ldq, MEMSUFFIX), _T0_A0)(void) +{ + T0 = glue(ldq, MEMSUFFIX)(A0); +} + +void OPPROTO glue(glue(op_ldq, MEMSUFFIX), _T1_A0)(void) +{ + T1 = glue(ldq, MEMSUFFIX)(A0); +} + +void OPPROTO glue(glue(op_stq, MEMSUFFIX), _T0_A0)(void) +{ + glue(stq, MEMSUFFIX)(A0, T0); +} + +void OPPROTO glue(glue(op_stq, MEMSUFFIX), _T1_A0)(void) +{ + glue(stq, MEMSUFFIX)(A0, T1); +} +#endif + #undef MEMSUFFIX |