qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [PATCH 3/5] target/loongarch: Add amcas[_db].{b/h/w/d}


From: Richard Henderson
Subject: Re: [PATCH 3/5] target/loongarch: Add amcas[_db].{b/h/w/d}
Date: Mon, 23 Oct 2023 16:00:37 -0700
User-agent: Mozilla Thunderbird

On 10/23/23 08:35, Jiajie Chen wrote:
+static bool gen_cas(DisasContext *ctx, arg_rrr *a,
+                    void (*func)(TCGv, TCGv, TCGv, TCGv, TCGArg, MemOp),
+                    MemOp mop)
+{
+    TCGv dest = gpr_dst(ctx, a->rd, EXT_NONE);
+    TCGv addr = gpr_src(ctx, a->rj, EXT_NONE);
+    TCGv val = gpr_src(ctx, a->rk, EXT_NONE);
+
+    addr = make_address_i(ctx, addr, 0);
+

I'm unsure if I can use the same TCGv for the first and the third argument here. If it violates with the assumption, a temporary register can be used.

+    func(dest, addr, dest, val, ctx->mem_idx, mop);

Correct, you cannot use dest in both places.
I just replied to the patch itself with that.  :-)


r~



reply via email to

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