diff mbox series

[netbsd] Give a name to the number 0 in sysarch(0, ...)

Message ID 20190619131329.GA28293@SDF.ORG
State New
Headers show
Series [netbsd] Give a name to the number 0 in sysarch(0, ...) | expand

Commit Message

Maya Rashish June 19, 2019, 1:13 p.m. UTC
The definition originates in
https://nxr.netbsd.org/xref/src/sys/arch/arm/include/sysarch.h#58

I've added the prefix SYSARCH to avoid any naming conflict concerns.

It looked a bit like an error on a first impression :-)
* config/arm/netbsd-elf.h (SYSARCH_ARM_SYNC_ICACHE): New definition.
(CLEAR_INSN_CACHE) Use it.
---
 gcc/config/arm/netbsd-elf.h | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

Comments

Jeff Law June 19, 2019, 4:01 p.m. UTC | #1
On 6/19/19 7:13 AM, coypu@sdf.org wrote:
> The definition originates in
> https://nxr.netbsd.org/xref/src/sys/arch/arm/include/sysarch.h#58
> 
> I've added the prefix SYSARCH to avoid any naming conflict concerns.
> 
> It looked a bit like an error on a first impression :-)
> 
> 
> 0001-Give-a-name-to-the-number-0-in-sysarch-0.patch
> 
> * config/arm/netbsd-elf.h (SYSARCH_ARM_SYNC_ICACHE): New definition.
> (CLEAR_INSN_CACHE) Use it.
THanks.  Installed.
jeff
diff mbox series

Patch

diff --git a/gcc/config/arm/netbsd-elf.h b/gcc/config/arm/netbsd-elf.h
index ec68d3fd10f..e42a32f927c 100644
--- a/gcc/config/arm/netbsd-elf.h
+++ b/gcc/config/arm/netbsd-elf.h
@@ -138,6 +138,8 @@ 
 #undef DEFAULT_STRUCTURE_SIZE_BOUNDARY
 #define DEFAULT_STRUCTURE_SIZE_BOUNDARY 8
 
+#define SYSARCH_ARM_SYNC_ICACHE	0
+
 /* Clear the instruction cache from `BEG' to `END'.  This makes a
    call to the ARM_SYNC_ICACHE architecture specific syscall.  */
 #define CLEAR_INSN_CACHE(BEG, END)					\
@@ -151,6 +153,6 @@  do									\
       } s;								\
     s.addr = (unsigned int)(BEG);					\
     s.len = (END) - (BEG);						\
-    (void) sysarch (0, &s);						\
+    (void) sysarch (SYSARCH_ARM_SYNC_ICACHE, &s);			\
   }									\
 while (0)