qemu-devel
[Top][All Lists]
Advanced

[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~



reply via email to

[Prev in Thread] Current Thread [Next in Thread]