qemu-devel
[Top][All Lists]
Advanced

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

Re: [PATCH v4 10/17] target/m68k: Implement TRAPcc


From: Laurent Vivier
Subject: Re: [PATCH v4 10/17] target/m68k: Implement TRAPcc
Date: Thu, 26 May 2022 02:15:43 +0200
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:91.0) Gecko/20100101 Thunderbird/91.9.0

Le 26/05/2022 à 00:26, Richard Henderson a écrit :
On 5/25/22 14:40, Laurent Vivier wrote:
+DISAS_INSN(trapcc)
+{
+    DisasCompare c;
+
+    /* Consume and discard the immediate operand. */
+    switch (extract32(insn, 0, 3)) {
+    case 2: /* trapcc.w */
+        (void)read_im16(env, s);
+        break;
+    case 3: /* trapcc.l */
+        (void)read_im32(env, s);
+        break;

Do we really need to read the data or do we only need to increment s->pc (as the data are only here to be available for the trap handler)?

We need to read the data to (1) trigger sigsegv when this insn crosses a page and (2) passing to tcg plugins.


For (1) I was wondering if the real CPU is actually doing it.

Nothing is said about it in the instruction definition.

Thanks,
Laurent



reply via email to

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