qemu-devel
[Top][All Lists]
Advanced

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

Re: [RFC PATCH v7 09/29] target/loongarch: Add TLB instruction support


From: Richard Henderson
Subject: Re: [RFC PATCH v7 09/29] target/loongarch: Add TLB instruction support
Date: Mon, 28 Mar 2022 16:50:31 -0600
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:91.0) Gecko/20100101 Thunderbird/91.7.0

On 3/28/22 06:57, Xiaojuan Yang wrote:
+void helper_tlbflush(CPULoongArchState *env)
+{
+    int i, index;
+
+    index = FIELD_EX64(env->CSR_TLBIDX, CSR_TLBIDX, INDEX);
+
+    if (index < LOONGARCH_STLB) {
+        /* STLB. One line per operation */
+        for (i = 0; i < 8; i++) {
+            int index = i * 256 + (index % 256);

Another uninitialized use Werror that you should have seen: You're shadowing the outer 'index' variable, which means this doesn't do what you intended.


r~



reply via email to

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