Re: Question about TCG backend correctness

2022-10-19 Thread Alex Bennée
LIU Zhiwei writes: > On 2022/10/18 13:22, Richard Henderson wrote: > > On 10/18/22 01:27, LIU Zhiwei wrote: > > Maybe I can run RISU on qemu-aarch64(x86) and qemu-aarch64(risc-v) to check > the RISC-V backend. > > This is a good start for debugging a tcg backend. > > After fixing some bu

Re: Question about TCG backend correctness

2022-10-19 Thread LIU Zhiwei
On 2022/10/18 13:22, Richard Henderson wrote: On 10/18/22 01:27, LIU Zhiwei wrote: Maybe I can run RISU on qemu-aarch64(x86) and qemu-aarch64(risc-v) to check the RISC-V backend. This is a good start for debugging a tcg backend. After fixing some bugs, RISU can run  some instructions now.

Re: Question about TCG backend correctness

2022-10-18 Thread Richard Henderson
On 10/18/22 19:22, Alex Bennée wrote: I'm not wedded to the idea - but it could be a super simple processor with a lot less extra baggage than a full ISA - purely for throwing TCG ops at rather than decoding any machine code. I'd be surprised if you don't wind up with a similar amount of code a

Re: Question about TCG backend correctness

2022-10-18 Thread Alex Bennée
Richard Henderson writes: > On 10/18/22 01:27, LIU Zhiwei wrote: >> Maybe I can run RISU on qemu-aarch64(x86) and qemu-aarch64(risc-v) >> to check the RISC-V backend. > > This is a good start for debugging a tcg backend. It's not > comprehensive, because RISU executes one instruction at a time

Re: Question about TCG backend correctness

2022-10-17 Thread Richard Henderson
On 10/18/22 01:27, LIU Zhiwei wrote: Maybe I can run RISU on qemu-aarch64(x86) and qemu-aarch64(risc-v) to check the RISC-V backend. This is a good start for debugging a tcg backend. It's not comprehensive, because RISU executes one instruction at a time then raises an exception to check the r

Re: Question about TCG backend correctness

2022-10-17 Thread LIU Zhiwei
On 2022/10/17 18:30, Alex Bennée wrote: LIU Zhiwei writes: Hi folks,     For TCG front end, we can test it with tools, such as RISU. But I don't know if  there are some tools that can help to verify the correctness of a TCG backend.     Can someone share the tools or the experience to de

Re: Question about TCG backend correctness

2022-10-17 Thread Alex Bennée
LIU Zhiwei writes: > Hi folks, > >     For TCG front end, we can test it with tools, such as RISU. But I > don't know if  there are some tools that can help > to verify the correctness of a TCG backend. > >     Can someone share the tools or the experience to debug RISC-V > backend?  Thanks ver

Question about TCG backend correctness

2022-10-17 Thread LIU Zhiwei
Hi folks,     For TCG front end, we can test it with tools, such as RISU. But I don't know if  there are some tools that can help to verify the correctness of a TCG backend.     Can someone share the tools or the experience to debug RISC-V backend?  Thanks very much. Best Regards, Zhiwei