Re: [PATCH v2] target/sparc: Handle FPRS correctly on big-endian hosts

2023-07-17 Thread Mark Cave-Ayland
On 17/07/2023 11:35, Peter Maydell wrote: In CPUSparcState we define the fprs field as uint64_t. However we then refer to it in translate.c via a TCGv_i32 which we set up with tcg_global_mem_new_ptr(). This means that on a big-endian host when the guest does something to writo te the FPRS

Re: [PATCH v2] target/sparc: Handle FPRS correctly on big-endian hosts

2023-07-17 Thread Richard Henderson
On 7/17/23 11:35, Peter Maydell wrote: In CPUSparcState we define the fprs field as uint64_t. However we then refer to it in translate.c via a TCGv_i32 which we set up with tcg_global_mem_new_ptr(). This means that on a big-endian host when the guest does something to writo te the FPRS

Re: [PATCH v2] target/sparc: Handle FPRS correctly on big-endian hosts

2023-07-17 Thread Peter Maydell
On Mon, 17 Jul 2023 at 12:32, Philippe Mathieu-Daudé wrote: > > On 17/7/23 13:30, Philippe Mathieu-Daudé wrote: > > On 17/7/23 12:35, Peter Maydell wrote: > >> In CPUSparcState we define the fprs field as uint64_t. However we > >> then refer to it in translate.c via a TCGv_i32 which we set up

Re: [PATCH v2] target/sparc: Handle FPRS correctly on big-endian hosts

2023-07-17 Thread Philippe Mathieu-Daudé
On 17/7/23 13:30, Philippe Mathieu-Daudé wrote: On 17/7/23 12:35, Peter Maydell wrote: In CPUSparcState we define the fprs field as uint64_t.  However we then refer to it in translate.c via a TCGv_i32 which we set up with tcg_global_mem_new_ptr().  This means that on a big-endian host when the

Re: [PATCH v2] target/sparc: Handle FPRS correctly on big-endian hosts

2023-07-17 Thread Philippe Mathieu-Daudé
On 17/7/23 12:35, Peter Maydell wrote: In CPUSparcState we define the fprs field as uint64_t. However we then refer to it in translate.c via a TCGv_i32 which we set up with tcg_global_mem_new_ptr(). This means that on a big-endian host when the guest does something to writo te the FPRS

[PATCH v2] target/sparc: Handle FPRS correctly on big-endian hosts

2023-07-17 Thread Peter Maydell
In CPUSparcState we define the fprs field as uint64_t. However we then refer to it in translate.c via a TCGv_i32 which we set up with tcg_global_mem_new_ptr(). This means that on a big-endian host when the guest does something to writo te the FPRS register this value ends up in the wrong half of