Subject: tf_pc value
To: None <port-arm32@netbsd.org, port-arm26@netbsd.org>
From: Ben Harris <bjh21@netbsd.org>
List: port-arm32
Date: 03/05/2001 21:47:14
There seems to be some disagreement between arm26 and arm32 over the value
of the tf_pc field in a trapframe, which contains the value of the
user program counter after an exception.

In arm26, I deliberately made sure that it was always the address of the
faulting instruction, so as to avoid confusing myself.  In arm32, it's the
address of the faulting instruction for address and data aborts, and the
address of the next instruction for SWIs and undefined instructions.

I suspect this has an effect on signal handling as well, in that
sigcontext structures are generated directly from trapframes, and are used
to generate the context to return to when a signal handler completes.

What do other people think behaviour in this area should be?  I'm inclined
to go the arm26 way (surprise!) because it seems consistent to me, but I'm
open to persuasion.

-- 
Ben Harris                                                   <bjh21@netbsd.org>
Portmaster, NetBSD/arm26               <URL:http://www.netbsd.org/Ports/arm26/>