Re: [PATCH 1/5] target/mips: Replace GET_OFFSET() macro by get_offset() function

2021-08-18 Thread Richard Henderson
On 8/18/21 11:31 AM, Philippe Mathieu-Daudé wrote:   I think you should drop get_offset() entirely and replace it with     int dir = cpu_is_bigendian(env) ? 1 : -1;     stb(env, arg2 + 1 * dir, data);     stb(env, arg2 + 2 * dir, data); Alternately, bite the bullet and split the function(

Re: [PATCH 1/5] target/mips: Replace GET_OFFSET() macro by get_offset() function

2021-08-18 Thread Philippe Mathieu-Daudé
On 8/18/21 6:56 PM, Richard Henderson wrote: > On 8/18/21 6:43 AM, Philippe Mathieu-Daudé wrote: >> The target endianess information is stored in the BigEndian >> bit of the Config0 register in CP0. >> >> As a first step, replace the GET_OFFSET() macro by an inlined >> get_offset() function, passin

Re: [PATCH 1/5] target/mips: Replace GET_OFFSET() macro by get_offset() function

2021-08-18 Thread Richard Henderson
On 8/18/21 6:43 AM, Philippe Mathieu-Daudé wrote: The target endianess information is stored in the BigEndian bit of the Config0 register in CP0. As a first step, replace the GET_OFFSET() macro by an inlined get_offset() function, passing CPUMIPSState as argument. Signed-off-by: Philippe Mathie

[PATCH 1/5] target/mips: Replace GET_OFFSET() macro by get_offset() function

2021-08-18 Thread Philippe Mathieu-Daudé
The target endianess information is stored in the BigEndian bit of the Config0 register in CP0. As a first step, replace the GET_OFFSET() macro by an inlined get_offset() function, passing CPUMIPSState as argument. Signed-off-by: Philippe Mathieu-Daudé --- target/mips/tcg/ldst_helper.c | 57 +++