Source-Changes-HG archive

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

[src/trunk]: src/sys/arch/powerpc/include fix build with COPTS=-O0



details:   https://anonhg.NetBSD.org/src/rev/55d7c1d6e1fe
branches:  trunk
changeset: 1024755:55d7c1d6e1fe
user:      ryo <ryo%NetBSD.org@localhost>
date:      Tue Nov 02 11:21:24 2021 +0000

description:
fix build with COPTS=-O0

diffstat:

 sys/arch/powerpc/include/ibm4xx/cpu.h |  10 +++++-----
 sys/arch/powerpc/include/spr.h        |  10 +++++-----
 2 files changed, 10 insertions(+), 10 deletions(-)

diffs (59 lines):

diff -r fd0318f41db2 -r 55d7c1d6e1fe sys/arch/powerpc/include/ibm4xx/cpu.h
--- a/sys/arch/powerpc/include/ibm4xx/cpu.h     Tue Nov 02 10:38:26 2021 +0000
+++ b/sys/arch/powerpc/include/ibm4xx/cpu.h     Tue Nov 02 11:21:24 2021 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: cpu.h,v 1.26 2021/05/31 14:38:56 simonb Exp $  */
+/*     $NetBSD: cpu.h,v 1.27 2021/11/02 11:21:24 ryo Exp $     */
 
 /*
  * Copyright 2002 Wasabi Systems, Inc.
@@ -90,14 +90,14 @@
  * macros because register address is encoded as immediate
  * operand.
  */
-static __inline void
-mtdcr(int reg, uint32_t val)
+static __inline __always_inline void
+mtdcr(const int reg, uint32_t val)
 {
        __asm volatile("mtdcr %0,%1" : : "K"(reg), "r"(val));
 }
 
-static __inline uint32_t
-mfdcr(int reg)
+static __inline __always_inline uint32_t
+mfdcr(const int reg)
 {
        uint32_t val;   
        
diff -r fd0318f41db2 -r 55d7c1d6e1fe sys/arch/powerpc/include/spr.h
--- a/sys/arch/powerpc/include/spr.h    Tue Nov 02 10:38:26 2021 +0000
+++ b/sys/arch/powerpc/include/spr.h    Tue Nov 02 11:21:24 2021 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: spr.h,v 1.53 2020/07/06 10:31:23 rin Exp $     */
+/*     $NetBSD: spr.h,v 1.54 2021/11/02 11:21:24 ryo Exp $     */
 
 /*
  * Copyright (c) 2001, The NetBSD Foundation, Inc.
@@ -72,8 +72,8 @@
 } )
 #endif /* PPC_OEA64_BRIDGE || _ARCH_PPC64 */
 
-static __inline uint64_t
-mfspr32(int reg)
+static __inline __always_inline uint64_t
+mfspr32(const int reg)
 {
        register_t val;
 
@@ -81,8 +81,8 @@
        return val;
 }
 
-static __inline void
-mtspr32(int reg, uint32_t val)
+static __inline __always_inline void
+mtspr32(const int reg, uint32_t val)
 {
 
        __asm volatile("mtspr %0,%1" : : "K"(reg), "r"(val));



Home | Main Index | Thread Index | Old Index