[PATCH-for-6.2 0/2] disas/nios2: Simplify endianess conversion

Philippe Mathieu-Daudé posted 2 patches 2 years, 9 months ago
Test checkpatch passed
Patches applied successfully (tree, apply log)
git fetch https://github.com/patchew-project/qemu tags/patchew/20210807110939.95853-1-f4bug@amsat.org
include/disas/dis-asm.h |  3 +-
disas/nios2.c           | 71 ++++++++++++++++-------------------------
target/nios2/cpu.c      |  6 +---
3 files changed, 29 insertions(+), 51 deletions(-)
[PATCH-for-6.2 0/2] disas/nios2: Simplify endianess conversion
Posted by Philippe Mathieu-Daudé 2 years, 9 months ago
After chatting with Richard Henderson and Paolo Bonzini, we
concluded the load/store API is mature enough to have target
code endianess-agnostic.
Thus we could remove the TARGET_WORDS_BIGENDIAN definition from
target-specific code (restricting it to the binary format loaders).

While experimenting, I noticed the Nios2 disassembler is an easy
win. MIPS will follow shortly.

Philippe Mathieu-Daudé (2):
  disas/nios2: Fix style in print_insn_nios2()
  disas/nios2: Simplify endianess conversion

 include/disas/dis-asm.h |  3 +-
 disas/nios2.c           | 71 ++++++++++++++++-------------------------
 target/nios2/cpu.c      |  6 +---
 3 files changed, 29 insertions(+), 51 deletions(-)

-- 
2.31.1

Re: [PATCH-for-6.2 0/2] disas/nios2: Simplify endianess conversion
Posted by Philippe Mathieu-Daudé 2 years, 8 months ago
Cc'ing qemu-trivial@ (series fully reviewed).

On 8/7/21 13:09, Philippe Mathieu-Daudé wrote:
> After chatting with Richard Henderson and Paolo Bonzini, we
> concluded the load/store API is mature enough to have target
> code endianess-agnostic.
> Thus we could remove the TARGET_WORDS_BIGENDIAN definition from
> target-specific code (restricting it to the binary format loaders).
> 
> While experimenting, I noticed the Nios2 disassembler is an easy
> win. MIPS will follow shortly.
> 
> Philippe Mathieu-Daudé (2):
>   disas/nios2: Fix style in print_insn_nios2()
>   disas/nios2: Simplify endianess conversion
> 
>  include/disas/dis-asm.h |  3 +-
>  disas/nios2.c           | 71 ++++++++++++++++-------------------------
>  target/nios2/cpu.c      |  6 +---
>  3 files changed, 29 insertions(+), 51 deletions(-)
> 

Re: [PATCH-for-6.2 0/2] disas/nios2: Simplify endianess conversion
Posted by Laurent Vivier 2 years, 7 months ago
Le 18/09/2021 à 11:19, Philippe Mathieu-Daudé a écrit :
> Cc'ing qemu-trivial@ (series fully reviewed).
>

An Acked-by from one of NiosII maintainers would be welcome.

Thanks,
Laurent

> On 8/7/21 13:09, Philippe Mathieu-Daudé wrote:
>> After chatting with Richard Henderson and Paolo Bonzini, we
>> concluded the load/store API is mature enough to have target
>> code endianess-agnostic.
>> Thus we could remove the TARGET_WORDS_BIGENDIAN definition from
>> target-specific code (restricting it to the binary format loaders).
>>
>> While experimenting, I noticed the Nios2 disassembler is an easy
>> win. MIPS will follow shortly.
>>
>> Philippe Mathieu-Daudé (2):
>>   disas/nios2: Fix style in print_insn_nios2()
>>   disas/nios2: Simplify endianess conversion
>>
>>  include/disas/dis-asm.h |  3 +-
>>  disas/nios2.c           | 71 ++++++++++++++++-------------------------
>>  target/nios2/cpu.c      |  6 +---
>>  3 files changed, 29 insertions(+), 51 deletions(-)
>>
> 


Re: [PATCH-for-6.2 0/2] disas/nios2: Simplify endianess conversion
Posted by Philippe Mathieu-Daudé 2 years, 7 months ago
Hi Cris and Marek, could you help me get this series merged?

On 9/23/21 17:14, Laurent Vivier wrote:
> Le 18/09/2021 à 11:19, Philippe Mathieu-Daudé a écrit :
>> Cc'ing qemu-trivial@ (series fully reviewed).
>>
> 
> An Acked-by from one of NiosII maintainers would be welcome.
> 
> Thanks,
> Laurent
> 
>> On 8/7/21 13:09, Philippe Mathieu-Daudé wrote:
>>> After chatting with Richard Henderson and Paolo Bonzini, we
>>> concluded the load/store API is mature enough to have target
>>> code endianess-agnostic.
>>> Thus we could remove the TARGET_WORDS_BIGENDIAN definition from
>>> target-specific code (restricting it to the binary format loaders).
>>>
>>> While experimenting, I noticed the Nios2 disassembler is an easy
>>> win. MIPS will follow shortly.
>>>
>>> Philippe Mathieu-Daudé (2):
>>>    disas/nios2: Fix style in print_insn_nios2()
>>>    disas/nios2: Simplify endianess conversion
>>>
>>>   include/disas/dis-asm.h |  3 +-
>>>   disas/nios2.c           | 71 ++++++++++++++++-------------------------
>>>   target/nios2/cpu.c      |  6 +---
>>>   3 files changed, 29 insertions(+), 51 deletions(-)
>>>
>>
> 
> 

Re: [PATCH-for-6.2 0/2] disas/nios2: Simplify endianess conversion
Posted by Laurent Vivier 2 years, 7 months ago
Le 07/08/2021 à 13:09, Philippe Mathieu-Daudé a écrit :
> After chatting with Richard Henderson and Paolo Bonzini, we
> concluded the load/store API is mature enough to have target
> code endianess-agnostic.
> Thus we could remove the TARGET_WORDS_BIGENDIAN definition from
> target-specific code (restricting it to the binary format loaders).
> 
> While experimenting, I noticed the Nios2 disassembler is an easy
> win. MIPS will follow shortly.
> 
> Philippe Mathieu-Daudé (2):
>   disas/nios2: Fix style in print_insn_nios2()
>   disas/nios2: Simplify endianess conversion
> 
>  include/disas/dis-asm.h |  3 +-
>  disas/nios2.c           | 71 ++++++++++++++++-------------------------
>  target/nios2/cpu.c      |  6 +---
>  3 files changed, 29 insertions(+), 51 deletions(-)
> 

Applied to my trivial-patches branch.

Thanks,
Laurent