qemu-devel
[Top][All Lists]
Advanced

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

Re: [PATCH v2 09/30] tcg/loongarch64: Implement tcg_out_mov and tcg_out_


From: WANG Xuerui
Subject: Re: [PATCH v2 09/30] tcg/loongarch64: Implement tcg_out_mov and tcg_out_movi
Date: Thu, 23 Sep 2021 01:22:49 +0800
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:94.0) Gecko/20100101 Thunderbird/94.0a1

Hi Richard,

On 9/22/21 23:17, Richard Henderson wrote:
On 9/22/21 8:16 AM, WANG Xuerui wrote:
Hi Richard,

On 9/22/21 12:25, Richard Henderson wrote:
On 9/21/21 1:18 PM, WANG Xuerui wrote:
+    /* Test for PC-relative values that can be loaded faster.  */
+    intptr_t pc_offset = val - (uintptr_t)s->code_ptr;

This isn't quite right for split r^x code buffer.
You should have seen this with --enable-debug-tcg...

You need pc_offset = tcg_pcrel_diff(s, (void *)val).
Indeed; I just realized TCG debugging isn't fully enabled with --enable-debug only.

Um... it should be.
Hmm, maybe I was having the wrong impression, I even grepped for CONFIG_DEBUG_TCG and it showed 1, yet my assertions didn't fire during one of my debugging sessions... Maybe I was just asserting at the wrong place. Never mind though, problems are all solved now.



reply via email to

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