mirror of
https://github.com/qemu/qemu.git
synced 2024-11-28 06:13:46 +08:00
tcg-arm: fix qemu_ld64
Emulating fldl on arm doesn't seem to work too well. It's the way qemu_ld64 is translated to arm instructions. tcg_out_ld32_12(s, COND_AL, data_reg, addr_reg, 0); tcg_out_ld32_12(s, COND_AL, data_reg2, addr_reg, 4); Consider case where data_reg==0, data_reg2==1, and addr_reg==0. First load overwrited addr_reg. So let's put an if (data_ref==addr_reg). (Pablo Virolainen) git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@6808 c046a42c-6fe2-441c-8c8c-71466251a162
This commit is contained in:
parent
506bfcbb14
commit
419bafa517
@ -1011,8 +1011,13 @@ static inline void tcg_out_qemu_ld(TCGContext *s, int cond,
|
||||
case 3:
|
||||
/* TODO: use block load -
|
||||
* check that data_reg2 > data_reg or the other way */
|
||||
tcg_out_ld32_12(s, COND_AL, data_reg, addr_reg, 0);
|
||||
tcg_out_ld32_12(s, COND_AL, data_reg2, addr_reg, 4);
|
||||
if (data_reg == addr_reg) {
|
||||
tcg_out_ld32_12(s, COND_AL, data_reg2, addr_reg, 4);
|
||||
tcg_out_ld32_12(s, COND_AL, data_reg, addr_reg, 0);
|
||||
} else {
|
||||
tcg_out_ld32_12(s, COND_AL, data_reg, addr_reg, 0);
|
||||
tcg_out_ld32_12(s, COND_AL, data_reg2, addr_reg, 4);
|
||||
}
|
||||
break;
|
||||
}
|
||||
#endif
|
||||
|
Loading…
Reference in New Issue
Block a user