[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-devel] [PATCH 2/8] target-tricore: Add instructions of RR opco
From: |
Richard Henderson |
Subject: |
Re: [Qemu-devel] [PATCH 2/8] target-tricore: Add instructions of RR opcode format, that have 0xb as the first opcode |
Date: |
Fri, 12 Dec 2014 11:49:26 -0800 |
User-agent: |
Mozilla/5.0 (X11; Linux x86_64; rv:31.0) Gecko/20100101 Thunderbird/31.3.0 |
On 12/12/2014 09:31 AM, Bastian Koppelmann wrote:
> +#define SSOV16(env, hw0, hw1) do { \
> + int32_t max_pos = INT16_MAX; \
> + int32_t max_neg = INT16_MIN; \
...
> +#define SUOV16(env, hw0, hw1) do { \
> + int32_t max_pos = UINT16_MAX; \
> + int32_t av0, av1; \
Similarly, make these functions.
Best if you have these functions return the combined word, i.e.
> + return (ret_hw0 & 0xffff) | (ret_hw1 << 16);
so that you don't try to return the two separate inputs via reference.
> +/* ret = (r1 cond r2) ? 0xFFFFFFFF ? 0x00000000;*/
> +static inline void gen_cond_w(TCGCond cond, TCGv ret, TCGv r1, TCGv r2)
> +{
> + TCGv temp = tcg_temp_new();
> +
> + tcg_gen_setcond_tl(cond, temp, r1, r2);
> + tcg_gen_movi_tl(ret, 0);
> + tcg_gen_sub_tl(ret, ret, temp);
tcg_gen_neg_tl, at which point you don't need a temporary.
r~
- Re: [Qemu-devel] [PATCH 5/8] target-tricore: Add instructions of RR opcode format, that have 0x4b as the first opcode, (continued)
- [Qemu-devel] [PATCH 7/8] target-tricore: Fix MFCR/MTCR insn and B format offset., Bastian Koppelmann, 2014/12/12
- [Qemu-devel] [PATCH 8/8] target-tricore: Add instructions of RR1 opcode format, that have 0xb3 as first opcode, Bastian Koppelmann, 2014/12/12
- [Qemu-devel] [PATCH 1/8] target-tricore: Change SSOV/SUOV makro name to SSOV32/SUOV32, Bastian Koppelmann, 2014/12/12
- [Qemu-devel] [PATCH 6/8] target-tricore: Add missing 1.6 insn of BOL opcode format, Bastian Koppelmann, 2014/12/12
- [Qemu-devel] [PATCH 2/8] target-tricore: Add instructions of RR opcode format, that have 0xb as the first opcode, Bastian Koppelmann, 2014/12/12
- Re: [Qemu-devel] [PATCH 2/8] target-tricore: Add instructions of RR opcode format, that have 0xb as the first opcode,
Richard Henderson <=