[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-devel] [PATCH RFC v3 00/11] Add RX archtecture support
From: |
Yoshinori Sato |
Subject: |
Re: [Qemu-devel] [PATCH RFC v3 00/11] Add RX archtecture support |
Date: |
Fri, 22 Mar 2019 23:14:24 +0900 |
User-agent: |
Wanderlust/2.15.9 (Almost Unreal) SEMI-EPG/1.14.7 (Harue) FLIM/1.14.9 (Gojō) APEL/10.8 EasyPG/1.0.0 Emacs/25.1 (x86_64-pc-linux-gnu) MULE/6.0 (HANACHIRUSATO) |
On Thu, 21 Mar 2019 10:35:07 +0900,
Richard Henderson wrote:
>
> On 3/20/19 7:05 AM, Yoshinori Sato wrote:
> > OK. fixed another way.
> > But RX big-endian mode only data access.
> > So operand value always little-endian order.
>
> Oh that is convenient.
> Therefore the operand can always be put together by pieces. E.g.
>
> -%b4_dsp_16 0:16 !function=dsp16
> -%b4_bdsp 0:24 !function=bdsp_a
> +%b4_dsp16 0:s8 8:8
> +%b4_dsp24 0:s8 8:8 16:8
>
> Also note the 's' qualifier that defines signed fields.
>
> -%b2_bdsp 16:8 !function=bdsp_b
> ...
> address@hidden .... cd:4 .... .... &bcnd dsp=%b2_bdsp sz=2
> address@hidden .... .... .... .... &jdsp dsp=%b2_bdsp sz=2
> address@hidden .... cd:4 dsp:s8 &bcnd sz=2
> address@hidden .... .... dsp:s8 &jdsp sz=2
>
OK.
>
> >>> +/* push rs */
> >>> +static bool trans_PUSH_r(DisasContext *ctx, arg_PUSH_r *a)
> >>> +{
> >>> + if (a->rs != 0) {
> >>> + tcg_gen_subi_i32(cpu_regs[0], cpu_regs[0], 4);
> >>> + rx_gen_ldst(a->sz, RX_MEMORY_ST, cpu_regs[a->rs], cpu_regs[0]);
> >>> + } else {
> >>> + tcg_gen_mov_i32(ctx->src, cpu_regs[a->rs]);
> >>> + tcg_gen_subi_i32(cpu_regs[0], cpu_regs[0], 4);
> >>> + rx_gen_ldst(a->sz, RX_MEMORY_ST, ctx->src, cpu_regs[0]);
> >>> + }
> >>> + return true;
> >>
> >> As far as I can see the THEN and ELSE cases have identical operation.
> >
> > It little different.
> > In the case of r0, the value before decrementing is stored in memory.
> > I added comment.
>
> What I mean is that the sequence that you use for r0 could also be used for
> all
> other rN.
>
> I understand that RX does not have an mmu, but the normal way we handle this
> is
>
> tcg_gen_subi_i32(addr, cpu_regs[0], 4);
> rx_gen_st(a->sz, cpu_regs[a->rs], addr);
> tcg_gen_mov_i32(cpu_regs[0], addr);
>
> so that the stack pointer is not modified if the store raises an exception.
>
r0 is stack pointer.
The push / pop instructions read and write the address indicated by r0.
This part is complicated, so let's fix it a little more.
It should be able to expand into transfer instruction of
pre-decrement and post-increment.
>
> r~
>
--
Yosinori Sato
- Re: [Qemu-devel] [PATCH RFC v3 11/11] MAINTAINERS: Add RX entry., (continued)
- [Qemu-devel] [PATCH RFC v3 02/11] target/rx: TCG helper, Yoshinori Sato, 2019/03/02
- [Qemu-devel] [PATCH RFC v3 05/11] target/rx: miscellaneous functions, Yoshinori Sato, 2019/03/02
- Re: [Qemu-devel] [PATCH RFC v3 00/11] Add RX archtecture support, no-reply, 2019/03/02
- Re: [Qemu-devel] [PATCH RFC v3 00/11] Add RX archtecture support, Philippe Mathieu-Daudé, 2019/03/02
- Re: [Qemu-devel] [PATCH RFC v3 00/11] Add RX archtecture support, Richard Henderson, 2019/03/07
- [Qemu-devel] [PATCH RFC v4 00/12] Add RX archtecture support, Yoshinori Sato, 2019/03/20
- [Qemu-devel] [PATCH RFC v4 10/12] Add rx-softmmu, Yoshinori Sato, 2019/03/20
- [Qemu-devel] [PATCH RFC v4 11/12] MAINTAINERS: Add RX, Yoshinori Sato, 2019/03/20
- [Qemu-devel] [PATCH RFC v4 06/12] hw/intc: RX62N interrupt controller (ICUa), Yoshinori Sato, 2019/03/20
- [Qemu-devel] [PATCH RFC v4 12/12] include/hw/regiserfields.h: Add 8bit and 16bit registers, Yoshinori Sato, 2019/03/20
- [Qemu-devel] [PATCH RFC v4 05/12] target/rx: Miscellaneous files, Yoshinori Sato, 2019/03/20
- [Qemu-devel] [PATCH RFC v4 04/12] target/rx: RX disassembler, Yoshinori Sato, 2019/03/20
- [Qemu-devel] [PATCH RFC v4 03/12] target/rx: CPU definition, Yoshinori Sato, 2019/03/20