Subject: strh on a SHARK
To: None <port-arm32@netbsd.org>
From: Richard Earnshaw <rearnsha@arm.com>
List: port-arm32
Date: 08/10/1998 14:40:06
Is the shark port of NetBSD supposed to support the full StrongARM 
instruction set?  I'm using the -current snapshot set of binaries/kernel 
from ftp.netbsd.org?

$ uname -a
NetBSD shark1 1.3F NetBSD 1.3F (SHARK) #0: Fri Jun 26 10:33:59 EDT 1998    
 tv@nc1.home.duh.org:/usr/SRC/netbsd/src/sys/arch/arm32/compile/SHARK arm32

While trying to test out a snapshot of EGCS 1.1 development tree, I tried 
to build the Xemacs package, but the emacs binary seems to be looping 
infinitely into the kernel when trying to execute a strh instruction to 
the first word of a page (I suspect the page is newly allocated, but can't 
be sure).

The offending bit of code is:

(gdb) x/5i $pc-16
0x39cc <make_compiled_function+220>:    str     r2, [r1]
0x39d0 <make_compiled_function+224>:    ldr	r3, 0x3a20 
						<make_compiled_function+304>
0x39d4 <make_compiled_function+228>:    str     r3, [ip]
0x39d8 <make_compiled_function+232>:    mov     r2, #0
0x39dc <make_compiled_function+236>:    strh    r2, [ip, #4]

(gdb) info reg ip
ip             0x1f2ffc 2043900
(gdb) x/4x $ip + 4
0x1f3000 <pure+594436>: 0x00000000      0x00000000      0x00000000      
0x00000000

It seems that every time the cpu tries to execute the strh it faults; the 
kernel then thinks that it has fixed it up, restarts the instruction, but 
faults again.

I can supply more info if you tell me how to extract it.

Richard.