[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-devel] [PATCH 09/15] target-tricore: Add instructions of SRRS
From: |
Richard Henderson |
Subject: |
Re: [Qemu-devel] [PATCH 09/15] target-tricore: Add instructions of SRRS and SLRO opcode format. |
Date: |
Mon, 07 Jul 2014 13:30:20 -0700 |
User-agent: |
Mozilla/5.0 (X11; Linux x86_64; rv:24.0) Gecko/20100101 Thunderbird/24.6.0 |
On 07/07/2014 11:13 AM, Bastian Koppelmann wrote:
> +/* Functions for load/save to/from memory */
> +#define OP_MEM_INDIRECT(insn) \
> +static inline void gen_indirect_##insn(DisasContext *ctx, TCGv r1, TCGv r2, \
> + int16_t con) \
> +{ \
> + TCGv temp = tcg_temp_new(); \
> + TCGv tempPC = tcg_const_i32(ctx->pc); \
> + tcg_gen_addi_tl(temp, r2, con); \
> + tcg_gen_qemu_##insn(r1, temp, ctx->mem_idx); \
> + tcg_temp_free(tempPC); \
> + tcg_temp_free(temp); \
> +}
> +OP_MEM_INDIRECT(ld8s)
> +OP_MEM_INDIRECT(ld8u)
> +OP_MEM_INDIRECT(ld16s)
> +OP_MEM_INDIRECT(ld16u)
> +OP_MEM_INDIRECT(ld32s)
> +OP_MEM_INDIRECT(ld32u)
Please just rearrange all of your memory operations to use the new TCGMemOp
enumeration and the common tcg_gen_qemu_{ld,st}_tl functions.
I nearly suggested that for patch 8, but it's quite obvious here.
tempPC is unused here.
Why call this "indirect"? A better term would be "offset".
r~
- Re: [Qemu-devel] [PATCH 01/15] target-tricore: Add target stubs and qom-cpu, (continued)
- [Qemu-devel] [PATCH 08/15] target-tricore: Add instructions of SSR opcode format, Bastian Koppelmann, 2014/07/07
- [Qemu-devel] [PATCH 10/15] target-tricore: Add instructions of SB opcode format, Bastian Koppelmann, 2014/07/07
- [Qemu-devel] [PATCH 14/15] target-tricore: Add instructions of SLR, SSRO and SRO opcode format, Bastian Koppelmann, 2014/07/07
- [Qemu-devel] [PATCH 03/15] target-tricore: Add softmmu support, Bastian Koppelmann, 2014/07/07
- [Qemu-devel] [PATCH 09/15] target-tricore: Add instructions of SRRS and SLRO opcode format., Bastian Koppelmann, 2014/07/07
- Re: [Qemu-devel] [PATCH 09/15] target-tricore: Add instructions of SRRS and SLRO opcode format.,
Richard Henderson <=
- [Qemu-devel] [PATCH 07/15] target-tricore: Add instructions of SRR opcode format, Bastian Koppelmann, 2014/07/07
- [Qemu-devel] [PATCH 02/15] target-tricore: Add board for systemmode, Bastian Koppelmann, 2014/07/07