Mon Jul 6 08:20:40 2020 UTC ()
Consistently use _LP64 instead of __LP64__, although both are defined for
powerpc64.

No binary changes intended.


(rin)
diff -r1.51 -r1.52 src/sys/arch/powerpc/include/asm.h

cvs diff -r1.51 -r1.52 src/sys/arch/powerpc/include/asm.h (expand / switch to unified diff)

--- src/sys/arch/powerpc/include/asm.h 2020/04/18 10:37:37 1.51
+++ src/sys/arch/powerpc/include/asm.h 2020/07/06 08:20:40 1.52
@@ -1,14 +1,14 @@ @@ -1,14 +1,14 @@
1/* $NetBSD: asm.h,v 1.51 2020/04/18 10:37:37 joerg Exp $ */ 1/* $NetBSD: asm.h,v 1.52 2020/07/06 08:20:40 rin Exp $ */
2 2
3/* 3/*
4 * Copyright (C) 1995, 1996 Wolfgang Solfrank. 4 * Copyright (C) 1995, 1996 Wolfgang Solfrank.
5 * Copyright (C) 1995, 1996 TooLs GmbH. 5 * Copyright (C) 1995, 1996 TooLs GmbH.
6 * All rights reserved. 6 * All rights reserved.
7 * 7 *
8 * Redistribution and use in source and binary forms, with or without 8 * Redistribution and use in source and binary forms, with or without
9 * modification, are permitted provided that the following conditions 9 * modification, are permitted provided that the following conditions
10 * are met: 10 * are met:
11 * 1. Redistributions of source code must retain the above copyright 11 * 1. Redistributions of source code must retain the above copyright
12 * notice, this list of conditions and the following disclaimer. 12 * notice, this list of conditions and the following disclaimer.
13 * 2. Redistributions in binary form must reproduce the above copyright 13 * 2. Redistributions in binary form must reproduce the above copyright
14 * notice, this list of conditions and the following disclaimer in the 14 * notice, this list of conditions and the following disclaimer in the
@@ -71,27 +71,27 @@ @@ -71,27 +71,27 @@
71# define PIC_GOT(x) XXX 71# define PIC_GOT(x) XXX
72# define PIC_GOTOFF(x) XXX 72# define PIC_GOTOFF(x) XXX
73# endif /* __STDC__ */ 73# endif /* __STDC__ */
74# else /* !__PIC__ */ 74# else /* !__PIC__ */
75# define PIC_PROLOGUE 75# define PIC_PROLOGUE
76# define PIC_EPILOGUE 76# define PIC_EPILOGUE
77# define PIC_PLT(x) x 77# define PIC_PLT(x) x
78# define PIC_GOT(x) x 78# define PIC_GOT(x) x
79# define PIC_GOTOFF(x) x 79# define PIC_GOTOFF(x) x
80# define PIC_GOTSETUP(r) 80# define PIC_GOTSETUP(r)
81# define PIC_TOCSETUP(n, r) 81# define PIC_TOCSETUP(n, r)
82# endif /* __PIC__ */ 82# endif /* __PIC__ */
83 83
84#endif /* __LP64__ */ 84#endif /* _LP64 */
85 85
86#define _C_LABEL(x) x 86#define _C_LABEL(x) x
87#define _ASM_LABEL(x) x 87#define _ASM_LABEL(x) x
88 88
89#define _GLOBAL(x) \ 89#define _GLOBAL(x) \
90 .data; .align 2; .globl x; x: 90 .data; .align 2; .globl x; x:
91 91
92#ifdef GPROF 92#ifdef GPROF
93# define _PROF_PROLOGUE mflr 0; stw 0,4(1); bl _mcount 93# define _PROF_PROLOGUE mflr 0; stw 0,4(1); bl _mcount
94#else 94#else
95# define _PROF_PROLOGUE 95# define _PROF_PROLOGUE
96#endif 96#endif
97 97
@@ -138,27 +138,27 @@ y: .quad .##y,.TOC.@tocbase,0; \ @@ -138,27 +138,27 @@ y: .quad .##y,.TOC.@tocbase,0; \
138 138
139# define _XENTRY(x) .align 2; .globl x; .type x,@function; x: 139# define _XENTRY(x) .align 2; .globl x; .type x,@function; x:
140# define _ENTRY(x) .text; _XENTRY(x) 140# define _ENTRY(x) .text; _XENTRY(x)
141 141
142# define ENTRY(y) _ENTRY(_C_LABEL(y)); _PROF_PROLOGUE 142# define ENTRY(y) _ENTRY(_C_LABEL(y)); _PROF_PROLOGUE
143 143
144# define END(y) .size _C_LABEL(y),.-_C_LABEL(y) 144# define END(y) .size _C_LABEL(y),.-_C_LABEL(y)
145 145
146# define CALL(y) \ 146# define CALL(y) \
147 bl y 147 bl y
148 148
149# define ENTRY_NOPROFILE(y) _ENTRY(_C_LABEL(y)) 149# define ENTRY_NOPROFILE(y) _ENTRY(_C_LABEL(y))
150# define ASENTRY(y) _ENTRY(_ASM_LABEL(y)); _PROF_PROLOGUE 150# define ASENTRY(y) _ENTRY(_ASM_LABEL(y)); _PROF_PROLOGUE
151#endif /* __LP64__ */ 151#endif /* _LP64 */
152 152
153#define GLOBAL(y) _GLOBAL(_C_LABEL(y)) 153#define GLOBAL(y) _GLOBAL(_C_LABEL(y))
154 154
155#define ASMSTR .asciz 155#define ASMSTR .asciz
156 156
157#undef __RCSID 157#undef __RCSID
158#define RCSID(x) __RCSID(x) 158#define RCSID(x) __RCSID(x)
159#define __RCSID(x) .pushsection ".ident","MS",@progbits,1; \ 159#define __RCSID(x) .pushsection ".ident","MS",@progbits,1; \
160 .asciz x; \ 160 .asciz x; \
161 .popsection 161 .popsection
162 162
163#ifdef __ELF__ 163#ifdef __ELF__
164# define WEAK_ALIAS(alias,sym) \ 164# define WEAK_ALIAS(alias,sym) \
@@ -359,27 +359,27 @@ y: .quad .##y,.TOC.@tocbase,0; \ @@ -359,27 +359,27 @@ y: .quad .##y,.TOC.@tocbase,0; \
359# define cmpptr cmpw 359# define cmpptr cmpw
360# define cmplong cmpw 360# define cmplong cmpw
361# define cmpreg cmpw 361# define cmpreg cmpw
362# define cmpptri cmpwi 362# define cmpptri cmpwi
363# define cmplongi cmpwi 363# define cmplongi cmpwi
364# define cmpregi cmpwi 364# define cmpregi cmpwi
365# define cmpptrl cmplw 365# define cmpptrl cmplw
366# define cmplongl cmplw 366# define cmplongl cmplw
367# define cmpregl cmplw 367# define cmpregl cmplw
368# define cmpptrli cmplwi 368# define cmpptrli cmplwi
369# define cmplongli cmplwi 369# define cmplongli cmplwi
370# define cmpregli cmplwi 370# define cmpregli cmplwi
371 371
372#else /* __LP64__ */ 372#else /* _LP64 */
373 373
374# define ldlong ld /* load "C" long */ 374# define ldlong ld /* load "C" long */
375# define ldlongu ldu /* load "C" long with update */ 375# define ldlongu ldu /* load "C" long with update */
376# define stlong std /* store "C" long */ 376# define stlong std /* store "C" long */
377# define stlongu stdu /* store "C" long with update */ 377# define stlongu stdu /* store "C" long with update */
378# define ldptr ld /* load "C" pointer */ 378# define ldptr ld /* load "C" pointer */
379# define ldptru ldu /* load "C" pointer with update */ 379# define ldptru ldu /* load "C" pointer with update */
380# define stptr std /* store "C" pointer */ 380# define stptr std /* store "C" pointer */
381# define stptru stdu /* store "C" pointer with update */ 381# define stptru stdu /* store "C" pointer with update */
382# define ldreg ld /* load PPC general register */ 382# define ldreg ld /* load PPC general register */
383# define ldregu ldu /* load PPC general register with update */ 383# define ldregu ldu /* load PPC general register with update */
384# define streg std /* store PPC general register */ 384# define streg std /* store PPC general register */
385# define stregu stdu /* store PPC general register with update */ 385# define stregu stdu /* store PPC general register with update */
@@ -404,48 +404,48 @@ y: .quad .##y,.TOC.@tocbase,0; \ @@ -404,48 +404,48 @@ y: .quad .##y,.TOC.@tocbase,0; \
404# define cmpptr cmpd 404# define cmpptr cmpd
405# define cmplong cmpd 405# define cmplong cmpd
406# define cmpreg cmpd 406# define cmpreg cmpd
407# define cmpptri cmpdi 407# define cmpptri cmpdi
408# define cmplongi cmpdi 408# define cmplongi cmpdi
409# define cmpregi cmpdi 409# define cmpregi cmpdi
410# define cmpptrl cmpld 410# define cmpptrl cmpld
411# define cmplongl cmpld 411# define cmplongl cmpld
412# define cmpregl cmpld 412# define cmpregl cmpld
413# define cmpptrli cmpldi 413# define cmpptrli cmpldi
414# define cmplongli cmpldi 414# define cmplongli cmpldi
415# define cmpregli cmpldi 415# define cmpregli cmpldi
416 416
417#endif /* __LP64__ */ 417#endif /* _LP64 */
418 418
419#ifdef _LOCORE 419#ifdef _LOCORE
420.macro stmd r,dst 420.macro stmd r,dst
421 i = 0 421 i = 0
422 .rept 32-\r 422 .rept 32-\r
423 std i+\r, i*8+\dst 423 std i+\r, i*8+\dst
424 i = i + 1 424 i = i + 1
425 .endr 425 .endr
426.endm 426.endm
427 427
428.macro lmd r,dst 428.macro lmd r,dst
429 i = 0 429 i = 0
430 .rept 32-\r 430 .rept 32-\r
431 ld i+\r, i*8+\dst 431 ld i+\r, i*8+\dst
432 i = i + 1 432 i = i + 1
433 .endr 433 .endr
434.endm 434.endm
435#endif /* _LOCORE */ 435#endif /* _LOCORE */
436 436
437#if defined(IBM405_ERRATA77) || \ 437#if defined(IBM405_ERRATA77) || \
438 ((defined(_MODULE) || !defined(_KERNEL)) && !defined(__LP64__)) 438 ((defined(_MODULE) || !defined(_KERNEL)) && !defined(_LP64))
439/* 439/*
440 * Workaround for IBM405 Errata 77 (CPU_210): interrupted stwcx. may 440 * Workaround for IBM405 Errata 77 (CPU_210): interrupted stwcx. may
441 * errantly write data to memory 441 * errantly write data to memory
442 * 442 *
443 * (1) Insert dcbt before every stwcx. instruction 443 * (1) Insert dcbt before every stwcx. instruction
444 * (2) Insert sync before every rfi/rfci instruction 444 * (2) Insert sync before every rfi/rfci instruction
445 */ 445 */
446#define IBM405_ERRATA77_DCBT(ra, rb) dcbt ra,rb 446#define IBM405_ERRATA77_DCBT(ra, rb) dcbt ra,rb
447#define IBM405_ERRATA77_SYNC sync 447#define IBM405_ERRATA77_SYNC sync
448#else 448#else
449#define IBM405_ERRATA77_DCBT(ra, rb) /* nothing */ 449#define IBM405_ERRATA77_DCBT(ra, rb) /* nothing */
450#define IBM405_ERRATA77_SYNC /* nothing */ 450#define IBM405_ERRATA77_SYNC /* nothing */
451#endif 451#endif