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