Re: [Qemu-devel] [PATCH 1/14] target/mips: Fix MIPS64 MFC0 UserLocal on BE host

2017-07-19 Thread Aurelien Jarno
On 2017-07-19 14:44, James Hogan wrote: > On Wed, Jul 19, 2017 at 12:27:50PM +0200, Aurelien Jarno wrote: > > On 2017-07-18 12:55, James Hogan wrote: > > > Using MFC0 to read CP0_UserLocal uses tcg_gen_ld32s_tl, however > > > CP0_UserLocal is a target_ulong. On a big endian host with a MIPS64 > > >

Re: [Qemu-devel] [PATCH 1/14] target/mips: Fix MIPS64 MFC0 UserLocal on BE host

2017-07-19 Thread James Hogan
On Wed, Jul 19, 2017 at 12:27:50PM +0200, Aurelien Jarno wrote: > On 2017-07-18 12:55, James Hogan wrote: > > Using MFC0 to read CP0_UserLocal uses tcg_gen_ld32s_tl, however > > CP0_UserLocal is a target_ulong. On a big endian host with a MIPS64 > > target this reads and sign extends the more signi

Re: [Qemu-devel] [PATCH 1/14] target/mips: Fix MIPS64 MFC0 UserLocal on BE host

2017-07-19 Thread Aurelien Jarno
On 2017-07-18 12:55, James Hogan wrote: > Using MFC0 to read CP0_UserLocal uses tcg_gen_ld32s_tl, however > CP0_UserLocal is a target_ulong. On a big endian host with a MIPS64 > target this reads and sign extends the more significant half of the > 64-bit register. > > Fix this by using ld_tl to lo

Re: [Qemu-devel] [PATCH 1/14] target/mips: Fix MIPS64 MFC0 UserLocal on BE host

2017-07-18 Thread Yongbok Kim
On 18/07/2017 12:55, James Hogan wrote: > Using MFC0 to read CP0_UserLocal uses tcg_gen_ld32s_tl, however > CP0_UserLocal is a target_ulong. On a big endian host with a MIPS64 > target this reads and sign extends the more significant half of the > 64-bit register. > > Fix this by using ld_tl to

[Qemu-devel] [PATCH 1/14] target/mips: Fix MIPS64 MFC0 UserLocal on BE host

2017-07-18 Thread James Hogan
Using MFC0 to read CP0_UserLocal uses tcg_gen_ld32s_tl, however CP0_UserLocal is a target_ulong. On a big endian host with a MIPS64 target this reads and sign extends the more significant half of the 64-bit register. Fix this by using ld_tl to load the whole target_ulong and ext32s_tl to sign exte