qemu-devel
[Top][All Lists]
Advanced

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

Re: [PATCH v2 12/22] target/loongarch: Add fixed point extra instruction


From: Richard Henderson
Subject: Re: [PATCH v2 12/22] target/loongarch: Add fixed point extra instruction translation
Date: Mon, 26 Jul 2021 06:42:22 -1000
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:78.0) Gecko/20100101 Thunderbird/78.11.0

On 7/26/21 2:57 AM, Song Gao wrote:

Hi, Richard.

On 07/23/2021 01:12 PM, Richard Henderson wrote:
On 7/20/21 11:53 PM, Song Gao wrote:
+target_ulong helper_cpucfg(CPULoongArchState *env, target_ulong rj)
+{
+    target_ulong r = 0;
+
+    switch (rj) {
+    case 0:
+        r = env->CSR_MCSR0 & 0xffffffff;
+        break;
+    case 1:
+        r = (env->CSR_MCSR0 & 0xffffffff00000000) >> 32;
+        break;

Why do you represent all of these as high and low portions of a 64-bit internal 
value, when the manual describes them as 32-bit values?

This method can reduce variables on env.

The number of variables may increase, but the memory consumed -- which is the metric that is more important -- is still the same.

Also, it is much less confusing to match the description in the manual.


r~



reply via email to

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