Revert previous wrong fixes
This commit is contained in:
parent
02e3cba4c4
commit
3c64e9a9e7
@ -377,70 +377,57 @@ target_ulong helper_lscbx(CPUPPCState *env, target_ulong addr, uint32_t reg,
|
|||||||
uint64_t helper_lq_le_parallel(CPUPPCState *env, target_ulong addr,
|
uint64_t helper_lq_le_parallel(CPUPPCState *env, target_ulong addr,
|
||||||
uint32_t opidx)
|
uint32_t opidx)
|
||||||
{
|
{
|
||||||
#if HAVE_ATOMIC128 > 0
|
|
||||||
Int128 ret;
|
Int128 ret;
|
||||||
|
|
||||||
|
/* We will have raised EXCP_ATOMIC from the translator. */
|
||||||
|
assert(HAVE_ATOMIC128);
|
||||||
ret = helper_atomic_ldo_le_mmu(env, addr, opidx, GETPC());
|
ret = helper_atomic_ldo_le_mmu(env, addr, opidx, GETPC());
|
||||||
env->retxh = int128_gethi(ret);
|
env->retxh = int128_gethi(ret);
|
||||||
return int128_getlo(ret);
|
return int128_getlo(ret);
|
||||||
#else
|
|
||||||
/* We will have raised EXCP_ATOMIC from the translator. */
|
|
||||||
abort();
|
|
||||||
return 0;
|
|
||||||
#endif
|
|
||||||
}
|
}
|
||||||
|
|
||||||
uint64_t helper_lq_be_parallel(CPUPPCState *env, target_ulong addr,
|
uint64_t helper_lq_be_parallel(CPUPPCState *env, target_ulong addr,
|
||||||
uint32_t opidx)
|
uint32_t opidx)
|
||||||
{
|
{
|
||||||
#if HAVE_ATOMIC128 > 0
|
|
||||||
Int128 ret;
|
Int128 ret;
|
||||||
|
|
||||||
|
/* We will have raised EXCP_ATOMIC from the translator. */
|
||||||
|
assert(HAVE_ATOMIC128);
|
||||||
ret = helper_atomic_ldo_be_mmu(env, addr, opidx, GETPC());
|
ret = helper_atomic_ldo_be_mmu(env, addr, opidx, GETPC());
|
||||||
env->retxh = int128_gethi(ret);
|
env->retxh = int128_gethi(ret);
|
||||||
return int128_getlo(ret);
|
return int128_getlo(ret);
|
||||||
#else
|
|
||||||
/* We will have raised EXCP_ATOMIC from the translator. */
|
|
||||||
abort();
|
|
||||||
return 0;
|
|
||||||
#endif
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void helper_stq_le_parallel(CPUPPCState *env, target_ulong addr,
|
void helper_stq_le_parallel(CPUPPCState *env, target_ulong addr,
|
||||||
uint64_t lo, uint64_t hi, uint32_t opidx)
|
uint64_t lo, uint64_t hi, uint32_t opidx)
|
||||||
{
|
{
|
||||||
#if HAVE_ATOMIC128 > 0
|
|
||||||
Int128 val;
|
Int128 val;
|
||||||
|
|
||||||
|
/* We will have raised EXCP_ATOMIC from the translator. */
|
||||||
|
assert(HAVE_ATOMIC128);
|
||||||
val = int128_make128(lo, hi);
|
val = int128_make128(lo, hi);
|
||||||
helper_atomic_sto_le_mmu(env, addr, val, opidx, GETPC());
|
helper_atomic_sto_le_mmu(env, addr, val, opidx, GETPC());
|
||||||
#else
|
|
||||||
/* We will have raised EXCP_ATOMIC from the translator. */
|
|
||||||
abort();
|
|
||||||
#endif
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void helper_stq_be_parallel(CPUPPCState *env, target_ulong addr,
|
void helper_stq_be_parallel(CPUPPCState *env, target_ulong addr,
|
||||||
uint64_t lo, uint64_t hi, uint32_t opidx)
|
uint64_t lo, uint64_t hi, uint32_t opidx)
|
||||||
{
|
{
|
||||||
#if HAVE_ATOMIC128 > 0
|
|
||||||
Int128 val;
|
Int128 val;
|
||||||
|
|
||||||
|
/* We will have raised EXCP_ATOMIC from the translator. */
|
||||||
|
assert(HAVE_ATOMIC128);
|
||||||
val = int128_make128(lo, hi);
|
val = int128_make128(lo, hi);
|
||||||
helper_atomic_sto_be_mmu(env, addr, val, opidx, GETPC());
|
helper_atomic_sto_be_mmu(env, addr, val, opidx, GETPC());
|
||||||
#else
|
|
||||||
/* We will have raised EXCP_ATOMIC from the translator. */
|
|
||||||
abort();
|
|
||||||
#endif
|
|
||||||
}
|
}
|
||||||
|
|
||||||
uint32_t helper_stqcx_le_parallel(CPUPPCState *env, target_ulong addr,
|
uint32_t helper_stqcx_le_parallel(CPUPPCState *env, target_ulong addr,
|
||||||
uint64_t new_lo, uint64_t new_hi,
|
uint64_t new_lo, uint64_t new_hi,
|
||||||
uint32_t opidx)
|
uint32_t opidx)
|
||||||
{
|
{
|
||||||
#if HAVE_ATOMIC128 > 0
|
|
||||||
bool success = false;
|
bool success = false;
|
||||||
|
|
||||||
|
/* We will have raised EXCP_ATOMIC from the translator. */
|
||||||
|
assert(HAVE_CMPXCHG128);
|
||||||
|
|
||||||
if (likely(addr == env->reserve_addr)) {
|
if (likely(addr == env->reserve_addr)) {
|
||||||
Int128 oldv, cmpv, newv;
|
Int128 oldv, cmpv, newv;
|
||||||
@ -453,20 +440,16 @@ uint32_t helper_stqcx_le_parallel(CPUPPCState *env, target_ulong addr,
|
|||||||
}
|
}
|
||||||
env->reserve_addr = -1;
|
env->reserve_addr = -1;
|
||||||
return env->so + success * CRF_EQ_BIT;
|
return env->so + success * CRF_EQ_BIT;
|
||||||
#else
|
|
||||||
/* We will have raised EXCP_ATOMIC from the translator. */
|
|
||||||
abort();
|
|
||||||
return 0;
|
|
||||||
#endif
|
|
||||||
}
|
}
|
||||||
|
|
||||||
uint32_t helper_stqcx_be_parallel(CPUPPCState *env, target_ulong addr,
|
uint32_t helper_stqcx_be_parallel(CPUPPCState *env, target_ulong addr,
|
||||||
uint64_t new_lo, uint64_t new_hi,
|
uint64_t new_lo, uint64_t new_hi,
|
||||||
uint32_t opidx)
|
uint32_t opidx)
|
||||||
{
|
{
|
||||||
#if HAVE_ATOMIC128 > 0
|
|
||||||
bool success = false;
|
bool success = false;
|
||||||
|
|
||||||
|
/* We will have raised EXCP_ATOMIC from the translator. */
|
||||||
|
assert(HAVE_CMPXCHG128);
|
||||||
|
|
||||||
if (likely(addr == env->reserve_addr)) {
|
if (likely(addr == env->reserve_addr)) {
|
||||||
Int128 oldv, cmpv, newv;
|
Int128 oldv, cmpv, newv;
|
||||||
@ -479,11 +462,6 @@ uint32_t helper_stqcx_be_parallel(CPUPPCState *env, target_ulong addr,
|
|||||||
}
|
}
|
||||||
env->reserve_addr = -1;
|
env->reserve_addr = -1;
|
||||||
return env->so + success * CRF_EQ_BIT;
|
return env->so + success * CRF_EQ_BIT;
|
||||||
#else
|
|
||||||
/* We will have raised EXCP_ATOMIC from the translator. */
|
|
||||||
abort();
|
|
||||||
return 0;
|
|
||||||
#endif
|
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user