Re: GCC 7 problems

[email protected] Fri, 29 Mar 2019 13:30:17 +0000
Newsgroups gmane.os.netbsd.ports.acorn32
Message-ID <[email protected]>
> I get this when compiling:
> /usr/src/current/sys/arch/arm/arm/bcopyinout.S:717: Error: selected processor does not support `ldrh r3,[r0]' in ARM mode
> /usr/src/current/sys/arch/arm/arm/bcopyinout.S:721: Error: selected processor does not support `strh r3,[r1]' in ARM mode

Looks like badaddr_read is only referenced by files called
something_pci.c, so I suspect it's not necessary.

this would avoid the warning by forcing it to assume armv4 is OK,
(Although I'm not sure how to 'pop' the .arch choice)

Index: arm/arm/bcopyinout.S
===================================================================
RCS file: /cvsroot/src/sys/arch/arm/arm/bcopyinout.S,v
retrieving revision 1.21
diff -u -r1.21 bcopyinout.S
--- arm/arm/bcopyinout.S	24 Jan 2018 09:04:44 -0000	1.21
+++ arm/arm/bcopyinout.S	29 Mar 2019 13:29:30 -0000
@@ -707,6 +707,7 @@
  * else EFAULT if a page fault occurred.
  */
 ENTRY(badaddr_read_2)
+	.arch armv4		/* for ldrh/strb */
 	GET_CURPCB(r2)
 	ldr	ip, [r2, #PCB_ONFAULT]
 	adr	r3, 1f