qemu-arm
[Top][All Lists]
Advanced

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

Re: [PATCH 37/67] target/arm: Convert CLS, CLZ (vector) to decodetree


From: Richard Henderson
Subject: Re: [PATCH 37/67] target/arm: Convert CLS, CLZ (vector) to decodetree
Date: Fri, 6 Dec 2024 09:52:11 -0600
User-agent: Mozilla Thunderbird

On 12/6/24 08:40, Peter Maydell wrote:
@@ -9219,13 +9233,6 @@ static void handle_2misc_64(DisasContext *s, int opcode, 
bool u,
      TCGCond cond;

      switch (opcode) {
-    case 0x4: /* CLS, CLZ */
-        if (u) {
-            tcg_gen_clzi_i64(tcg_rd, tcg_rn, 64);
-        } else {
-            tcg_gen_clrsb_i64(tcg_rd, tcg_rn);
-        }
-        break;
      case 0x5: /* NOT */

This was dead code, right? We only call handle_2misc_64()
for size == 3, but size == 3 is an unallocated encoding for
"CLS/CLZ (vector)", which only deals with elements sizes up
to 32 bits. Worth mentioning in the commit message, I think.

(I was wondering why the new code doesn't have any cases for
operating on 64-bit elements whereas this old code did seem
to handle it.)

I had been wondering if I had failed to remove it earlier, but this has been dead code since the day it was added: b05c3068577.


r~




reply via email to

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