VirtualBox

source: vbox/trunk/src/VBox/Additions/x11/x11include/xorg-server-1.7.7/compiler.h@ 49762

Last change on this file since 49762 was 43272, checked in by vboxsync, 12 years ago

Additions/x11: more original X server headers.

  • Property svn:eol-style set to native
File size: 38.3 KB
Line 
1/*
2 * Copyright 1990,91 by Thomas Roell, Dinkelscherben, Germany.
3 *
4 * Permission to use, copy, modify, distribute, and sell this software and its
5 * documentation for any purpose is hereby granted without fee, provided that
6 * the above copyright notice appear in all copies and that both that
7 * copyright notice and this permission notice appear in supporting
8 * documentation, and that the name of Thomas Roell not be used in
9 * advertising or publicity pertaining to distribution of the software without
10 * specific, written prior permission. Thomas Roell makes no representations
11 * about the suitability of this software for any purpose. It is provided
12 * "as is" without express or implied warranty.
13 *
14 * THOMAS ROELL DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE,
15 * INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO
16 * EVENT SHALL THOMAS ROELL BE LIABLE FOR ANY SPECIAL, INDIRECT OR
17 * CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE,
18 * DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER
19 * TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
20 * PERFORMANCE OF THIS SOFTWARE.
21 *
22 */
23/*
24 * Copyright (c) 1994-2003 by The XFree86 Project, Inc.
25 *
26 * Permission is hereby granted, free of charge, to any person obtaining a
27 * copy of this software and associated documentation files (the "Software"),
28 * to deal in the Software without restriction, including without limitation
29 * the rights to use, copy, modify, merge, publish, distribute, sublicense,
30 * and/or sell copies of the Software, and to permit persons to whom the
31 * Software is furnished to do so, subject to the following conditions:
32 *
33 * The above copyright notice and this permission notice shall be included in
34 * all copies or substantial portions of the Software.
35 *
36 * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
37 * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
38 * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
39 * THE COPYRIGHT HOLDER(S) OR AUTHOR(S) BE LIABLE FOR ANY CLAIM, DAMAGES OR
40 * OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
41 * ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
42 * OTHER DEALINGS IN THE SOFTWARE.
43 *
44 * Except as contained in this notice, the name of the copyright holder(s)
45 * and author(s) shall not be used in advertising or otherwise to promote
46 * the sale, use or other dealings in this Software without prior written
47 * authorization from the copyright holder(s) and author(s).
48 */
49
50#ifndef _COMPILER_H
51
52# define _COMPILER_H
53
54#if defined(__SUNPRO_C)
55# define DO_PROTOTYPES
56#endif
57
58/* Map Sun compiler platform defines to gcc-style used in the code */
59#if defined(__amd64) && !defined(__amd64__)
60# define __amd64__
61#endif
62#if defined(__i386) && !defined(__i386__)
63# define __i386__
64#endif
65#if defined(__sparc) && !defined(__sparc__)
66# define __sparc__
67#endif
68#if defined(__sparcv9) && !defined(__sparc64__)
69# define __sparc64__
70#endif
71
72#ifndef _X_EXPORT
73# include <X11/Xfuncproto.h>
74#endif
75
76# include <pixman.h> /* for uint*_t types */
77
78/* Allow drivers to use the GCC-supported __inline__ and/or __inline. */
79# ifndef __inline__
80# if defined(__GNUC__)
81 /* gcc has __inline__ */
82# elif defined(__HIGHC__)
83# define __inline__ _Inline
84# else
85# define __inline__ /**/
86# endif
87# endif /* __inline__ */
88# ifndef __inline
89# if defined(__GNUC__)
90 /* gcc has __inline */
91# elif defined(__HIGHC__)
92# define __inline _Inline
93# else
94# define __inline /**/
95# endif
96# endif /* __inline */
97
98/* Support gcc's __FUNCTION__ for people using other compilers */
99#if !defined(__GNUC__) && !defined(__FUNCTION__)
100# define __FUNCTION__ __func__ /* C99 */
101#endif
102
103# if defined(NO_INLINE) || defined(DO_PROTOTYPES)
104
105# if !defined(__arm__)
106# if !defined(__sparc__) && !defined(__sparc) && !defined(__arm32__) \
107 && !(defined(__alpha__) && defined(linux)) \
108 && !(defined(__ia64__) && defined(linux)) \
109
110extern _X_EXPORT void outb(unsigned short, unsigned char);
111extern _X_EXPORT void outw(unsigned short, unsigned short);
112extern _X_EXPORT void outl(unsigned short, unsigned int);
113extern _X_EXPORT unsigned int inb(unsigned short);
114extern _X_EXPORT unsigned int inw(unsigned short);
115extern _X_EXPORT unsigned int inl(unsigned short);
116
117# else /* __sparc__, __arm32__, __alpha__*/
118
119extern _X_EXPORT void outb(unsigned long, unsigned char);
120extern _X_EXPORT void outw(unsigned long, unsigned short);
121extern _X_EXPORT void outl(unsigned long, unsigned int);
122extern _X_EXPORT unsigned int inb(unsigned long);
123extern _X_EXPORT unsigned int inw(unsigned long);
124extern _X_EXPORT unsigned int inl(unsigned long);
125
126# endif /* __sparc__, __arm32__, __alpha__ */
127# endif /* __arm__ */
128
129# if defined(__powerpc__) && !defined(__OpenBSD__)
130extern unsigned long ldq_u(unsigned long *);
131extern unsigned long ldl_u(unsigned int *);
132extern unsigned long ldw_u(unsigned short *);
133extern void stq_u(unsigned long, unsigned long *);
134extern void stl_u(unsigned long, unsigned int *);
135extern void stw_u(unsigned long, unsigned short *);
136extern void mem_barrier(void);
137extern void write_mem_barrier(void);
138extern void stl_brx(unsigned long, volatile unsigned char *, int);
139extern void stw_brx(unsigned short, volatile unsigned char *, int);
140extern unsigned long ldl_brx(volatile unsigned char *, int);
141extern unsigned short ldw_brx(volatile unsigned char *, int);
142# endif /* __powerpc__ && !__OpenBSD */
143
144# endif /* NO_INLINE || DO_PROTOTYPES */
145
146# ifndef NO_INLINE
147# ifdef __GNUC__
148# ifdef __i386__
149
150# ifdef __SSE__
151# define write_mem_barrier() __asm__ __volatile__ ("sfence" : : : "memory")
152# else
153# define write_mem_barrier() __asm__ __volatile__ ("lock; addl $0,0(%%esp)" : : : "memory")
154# endif
155
156# ifdef __SSE2__
157# define mem_barrier() __asm__ __volatile__ ("mfence" : : : "memory")
158# else
159# define mem_barrier() __asm__ __volatile__ ("lock; addl $0,0(%%esp)" : : : "memory")
160# endif
161
162# elif defined __alpha__
163
164# define mem_barrier() __asm__ __volatile__ ("mb" : : : "memory")
165# define write_mem_barrier() __asm__ __volatile__ ("wmb" : : : "memory")
166
167# elif defined __amd64__
168
169# define mem_barrier() __asm__ __volatile__ ("mfence" : : : "memory")
170# define write_mem_barrier() __asm__ __volatile__ ("sfence" : : : "memory")
171
172# elif defined __ia64__
173
174# ifndef __INTEL_COMPILER
175# define mem_barrier() __asm__ __volatile__ ("mf" : : : "memory")
176# define write_mem_barrier() __asm__ __volatile__ ("mf" : : : "memory")
177# else
178# include "ia64intrin.h"
179# define mem_barrier() __mf()
180# define write_mem_barrier() __mf()
181# endif
182
183# elif defined __mips__
184 /* Note: sync instruction requires MIPS II instruction set */
185# define mem_barrier() \
186 __asm__ __volatile__( \
187 ".set push\n\t" \
188 ".set noreorder\n\t" \
189 ".set mips2\n\t" \
190 "sync\n\t" \
191 ".set pop" \
192 : /* no output */ \
193 : /* no input */ \
194 : "memory")
195# define write_mem_barrier() mem_barrier()
196
197# elif defined __powerpc__
198
199# if defined(linux) && defined(__powerpc64__)
200# include <linux/version.h>
201# if LINUX_VERSION_CODE < KERNEL_VERSION(2, 6, 0)
202# include <asm/memory.h>
203# endif
204# endif /* defined(linux) && defined(__powerpc64__) */
205
206# ifndef eieio /* We deal with arch-specific eieio() routines above... */
207# define eieio() __asm__ __volatile__ ("eieio" ::: "memory")
208# endif /* eieio */
209# define mem_barrier() eieio()
210# define write_mem_barrier() eieio()
211
212# elif defined __sparc__
213
214# define barrier() __asm__ __volatile__ (".word 0x8143e00a" : : : "memory")
215# define mem_barrier() /* XXX: nop for now */
216# define write_mem_barrier() /* XXX: nop for now */
217# endif
218# endif /* __GNUC__ */
219# endif /* NO_INLINE */
220
221# ifndef mem_barrier
222# define mem_barrier() /* NOP */
223# endif
224
225# ifndef write_mem_barrier
226# define write_mem_barrier() /* NOP */
227# endif
228
229
230# ifndef NO_INLINE
231# ifdef __GNUC__
232
233/* Define some packed structures to use with unaligned accesses */
234
235struct __una_u64 { uint64_t x __attribute__((packed)); };
236struct __una_u32 { uint32_t x __attribute__((packed)); };
237struct __una_u16 { uint16_t x __attribute__((packed)); };
238
239/* Elemental unaligned loads */
240
241static __inline__ uint64_t ldq_u(uint64_t *p)
242{
243 const struct __una_u64 *ptr = (const struct __una_u64 *) p;
244 return ptr->x;
245}
246
247static __inline__ uint32_t ldl_u(uint32_t *p)
248{
249 const struct __una_u32 *ptr = (const struct __una_u32 *) p;
250 return ptr->x;
251}
252
253static __inline__ uint16_t ldw_u(uint16_t *p)
254{
255 const struct __una_u16 *ptr = (const struct __una_u16 *) p;
256 return ptr->x;
257}
258
259/* Elemental unaligned stores */
260
261static __inline__ void stq_u(uint64_t val, uint64_t *p)
262{
263 struct __una_u64 *ptr = (struct __una_u64 *) p;
264 ptr->x = val;
265}
266
267static __inline__ void stl_u(uint32_t val, uint32_t *p)
268{
269 struct __una_u32 *ptr = (struct __una_u32 *) p;
270 ptr->x = val;
271}
272
273static __inline__ void stw_u(uint16_t val, uint16_t *p)
274{
275 struct __una_u16 *ptr = (struct __una_u16 *) p;
276 ptr->x = val;
277}
278# else /* !__GNUC__ */
279
280#include <string.h> /* needed for memmove */
281
282static __inline__ uint64_t ldq_u(uint64_t *p)
283{
284 uint64_t ret;
285 memmove(&ret, p, sizeof(*p));
286 return ret;
287}
288
289static __inline__ uint32_t ldl_u(uint32_t *p)
290{
291 uint32_t ret;
292 memmove(&ret, p, sizeof(*p));
293 return ret;
294}
295
296static __inline__ uint16_t ldw_u(uint16_t *p)
297{
298 uint16_t ret;
299 memmove(&ret, p, sizeof(*p));
300 return ret;
301}
302
303static __inline__ void stq_u(uint64_t val, uint64_t *p)
304{
305 uint64_t tmp = val;
306 memmove(p, &tmp, sizeof(*p));
307}
308
309static __inline__ void stl_u(uint32_t val, uint32_t *p)
310{
311 uint32_t tmp = val;
312 memmove(p, &tmp, sizeof(*p));
313}
314
315static __inline__ void stw_u(uint16_t val, uint16_t *p)
316{
317 uint16_t tmp = val;
318 memmove(p, &tmp, sizeof(*p));
319}
320
321# endif /* __GNUC__ */
322# endif /* NO_INLINE */
323
324# ifndef NO_INLINE
325# ifdef __GNUC__
326# if (defined(linux) || defined(__FreeBSD__) || defined(__NetBSD__) || defined(__OpenBSD__)) && (defined(__alpha__))
327
328# ifdef linux
329/* for Linux on Alpha, we use the LIBC _inx/_outx routines */
330/* note that the appropriate setup via "ioperm" needs to be done */
331/* *before* any inx/outx is done. */
332
333extern _X_EXPORT void (*_alpha_outb)(char val, unsigned long port);
334static __inline__ void
335outb(unsigned long port, unsigned char val)
336{
337 _alpha_outb(val, port);
338}
339
340extern _X_EXPORT void (*_alpha_outw)(short val, unsigned long port);
341static __inline__ void
342outw(unsigned long port, unsigned short val)
343{
344 _alpha_outw(val, port);
345}
346
347extern _X_EXPORT void (*_alpha_outl)(int val, unsigned long port);
348static __inline__ void
349outl(unsigned long port, unsigned int val)
350{
351 _alpha_outl(val, port);
352}
353
354extern _X_EXPORT unsigned int (*_alpha_inb)(unsigned long port);
355static __inline__ unsigned int
356inb(unsigned long port)
357{
358 return _alpha_inb(port);
359}
360
361extern _X_EXPORT unsigned int (*_alpha_inw)(unsigned long port);
362static __inline__ unsigned int
363inw(unsigned long port)
364{
365 return _alpha_inw(port);
366}
367
368extern _X_EXPORT unsigned int (*_alpha_inl)(unsigned long port);
369static __inline__ unsigned int
370inl(unsigned long port)
371{
372 return _alpha_inl(port);
373}
374
375# endif /* linux */
376
377# if (defined(__FreeBSD__) || defined(__OpenBSD__)) \
378 && !defined(DO_PROTOTYPES)
379
380/* for FreeBSD and OpenBSD on Alpha, we use the libio (resp. libalpha) */
381/* inx/outx routines */
382/* note that the appropriate setup via "ioperm" needs to be done */
383/* *before* any inx/outx is done. */
384
385extern _X_EXPORT void outb(unsigned int port, unsigned char val);
386extern _X_EXPORT void outw(unsigned int port, unsigned short val);
387extern _X_EXPORT void outl(unsigned int port, unsigned int val);
388extern _X_EXPORT unsigned char inb(unsigned int port);
389extern _X_EXPORT unsigned short inw(unsigned int port);
390extern _X_EXPORT unsigned int inl(unsigned int port);
391
392# endif /* (__FreeBSD__ || __OpenBSD__ ) && !DO_PROTOTYPES */
393
394
395#if defined(__NetBSD__)
396#include <machine/pio.h>
397#endif /* __NetBSD__ */
398
399# elif defined(linux) && defined(__ia64__)
400
401# include <inttypes.h>
402
403# include <sys/io.h>
404
405# undef outb
406# undef outw
407# undef outl
408# undef inb
409# undef inw
410# undef inl
411extern _X_EXPORT void outb(unsigned long port, unsigned char val);
412extern _X_EXPORT void outw(unsigned long port, unsigned short val);
413extern _X_EXPORT void outl(unsigned long port, unsigned int val);
414extern _X_EXPORT unsigned int inb(unsigned long port);
415extern _X_EXPORT unsigned int inw(unsigned long port);
416extern _X_EXPORT unsigned int inl(unsigned long port);
417
418# elif (defined(linux) || defined(__FreeBSD__)) && defined(__amd64__)
419
420# include <inttypes.h>
421
422static __inline__ void
423outb(unsigned short port, unsigned char val)
424{
425 __asm__ __volatile__("outb %0,%1" : :"a" (val), "d" (port));
426}
427
428
429static __inline__ void
430outw(unsigned short port, unsigned short val)
431{
432 __asm__ __volatile__("outw %0,%1" : :"a" (val), "d" (port));
433}
434
435static __inline__ void
436outl(unsigned short port, unsigned int val)
437{
438 __asm__ __volatile__("outl %0,%1" : :"a" (val), "d" (port));
439}
440
441static __inline__ unsigned int
442inb(unsigned short port)
443{
444 unsigned char ret;
445 __asm__ __volatile__("inb %1,%0" :
446 "=a" (ret) :
447 "d" (port));
448 return ret;
449}
450
451static __inline__ unsigned int
452inw(unsigned short port)
453{
454 unsigned short ret;
455 __asm__ __volatile__("inw %1,%0" :
456 "=a" (ret) :
457 "d" (port));
458 return ret;
459}
460
461static __inline__ unsigned int
462inl(unsigned short port)
463{
464 unsigned int ret;
465 __asm__ __volatile__("inl %1,%0" :
466 "=a" (ret) :
467 "d" (port));
468 return ret;
469}
470
471# elif (defined(linux) || defined(sun) || defined(__OpenBSD__) || defined(__FreeBSD__)) && defined(__sparc__)
472
473# ifndef ASI_PL
474# define ASI_PL 0x88
475# endif
476
477static __inline__ void
478outb(unsigned long port, unsigned char val)
479{
480 __asm__ __volatile__("stba %0, [%1] %2"
481 : /* No outputs */
482 : "r" (val), "r" (port), "i" (ASI_PL));
483 barrier();
484}
485
486static __inline__ void
487outw(unsigned long port, unsigned short val)
488{
489 __asm__ __volatile__("stha %0, [%1] %2"
490 : /* No outputs */
491 : "r" (val), "r" (port), "i" (ASI_PL));
492 barrier();
493}
494
495static __inline__ void
496outl(unsigned long port, unsigned int val)
497{
498 __asm__ __volatile__("sta %0, [%1] %2"
499 : /* No outputs */
500 : "r" (val), "r" (port), "i" (ASI_PL));
501 barrier();
502}
503
504static __inline__ unsigned int
505inb(unsigned long port)
506{
507 unsigned int ret;
508 __asm__ __volatile__("lduba [%1] %2, %0"
509 : "=r" (ret)
510 : "r" (port), "i" (ASI_PL));
511 return ret;
512}
513
514static __inline__ unsigned int
515inw(unsigned long port)
516{
517 unsigned int ret;
518 __asm__ __volatile__("lduha [%1] %2, %0"
519 : "=r" (ret)
520 : "r" (port), "i" (ASI_PL));
521 return ret;
522}
523
524static __inline__ unsigned int
525inl(unsigned long port)
526{
527 unsigned int ret;
528 __asm__ __volatile__("lda [%1] %2, %0"
529 : "=r" (ret)
530 : "r" (port), "i" (ASI_PL));
531 return ret;
532}
533
534static __inline__ unsigned char
535xf86ReadMmio8(__volatile__ void *base, const unsigned long offset)
536{
537 unsigned long addr = ((unsigned long)base) + offset;
538 unsigned char ret;
539
540 __asm__ __volatile__("lduba [%1] %2, %0"
541 : "=r" (ret)
542 : "r" (addr), "i" (ASI_PL));
543 return ret;
544}
545
546static __inline__ unsigned short
547xf86ReadMmio16Be(__volatile__ void *base, const unsigned long offset)
548{
549 unsigned long addr = ((unsigned long)base) + offset;
550 unsigned short ret;
551
552 __asm__ __volatile__("lduh [%1], %0"
553 : "=r" (ret)
554 : "r" (addr));
555 return ret;
556}
557
558static __inline__ unsigned short
559xf86ReadMmio16Le(__volatile__ void *base, const unsigned long offset)
560{
561 unsigned long addr = ((unsigned long)base) + offset;
562 unsigned short ret;
563
564 __asm__ __volatile__("lduha [%1] %2, %0"
565 : "=r" (ret)
566 : "r" (addr), "i" (ASI_PL));
567 return ret;
568}
569
570static __inline__ unsigned int
571xf86ReadMmio32Be(__volatile__ void *base, const unsigned long offset)
572{
573 unsigned long addr = ((unsigned long)base) + offset;
574 unsigned int ret;
575
576 __asm__ __volatile__("ld [%1], %0"
577 : "=r" (ret)
578 : "r" (addr));
579 return ret;
580}
581
582static __inline__ unsigned int
583xf86ReadMmio32Le(__volatile__ void *base, const unsigned long offset)
584{
585 unsigned long addr = ((unsigned long)base) + offset;
586 unsigned int ret;
587
588 __asm__ __volatile__("lda [%1] %2, %0"
589 : "=r" (ret)
590 : "r" (addr), "i" (ASI_PL));
591 return ret;
592}
593
594static __inline__ void
595xf86WriteMmio8(__volatile__ void *base, const unsigned long offset,
596 const unsigned int val)
597{
598 unsigned long addr = ((unsigned long)base) + offset;
599
600 __asm__ __volatile__("stba %0, [%1] %2"
601 : /* No outputs */
602 : "r" (val), "r" (addr), "i" (ASI_PL));
603 barrier();
604}
605
606static __inline__ void
607xf86WriteMmio16Be(__volatile__ void *base, const unsigned long offset,
608 const unsigned int val)
609{
610 unsigned long addr = ((unsigned long)base) + offset;
611
612 __asm__ __volatile__("sth %0, [%1]"
613 : /* No outputs */
614 : "r" (val), "r" (addr));
615 barrier();
616}
617
618static __inline__ void
619xf86WriteMmio16Le(__volatile__ void *base, const unsigned long offset,
620 const unsigned int val)
621{
622 unsigned long addr = ((unsigned long)base) + offset;
623
624 __asm__ __volatile__("stha %0, [%1] %2"
625 : /* No outputs */
626 : "r" (val), "r" (addr), "i" (ASI_PL));
627 barrier();
628}
629
630static __inline__ void
631xf86WriteMmio32Be(__volatile__ void *base, const unsigned long offset,
632 const unsigned int val)
633{
634 unsigned long addr = ((unsigned long)base) + offset;
635
636 __asm__ __volatile__("st %0, [%1]"
637 : /* No outputs */
638 : "r" (val), "r" (addr));
639 barrier();
640}
641
642static __inline__ void
643xf86WriteMmio32Le(__volatile__ void *base, const unsigned long offset,
644 const unsigned int val)
645{
646 unsigned long addr = ((unsigned long)base) + offset;
647
648 __asm__ __volatile__("sta %0, [%1] %2"
649 : /* No outputs */
650 : "r" (val), "r" (addr), "i" (ASI_PL));
651 barrier();
652}
653
654static __inline__ void
655xf86WriteMmio8NB(__volatile__ void *base, const unsigned long offset,
656 const unsigned int val)
657{
658 unsigned long addr = ((unsigned long)base) + offset;
659
660 __asm__ __volatile__("stba %0, [%1] %2"
661 : /* No outputs */
662 : "r" (val), "r" (addr), "i" (ASI_PL));
663}
664
665static __inline__ void
666xf86WriteMmio16BeNB(__volatile__ void *base, const unsigned long offset,
667 const unsigned int val)
668{
669 unsigned long addr = ((unsigned long)base) + offset;
670
671 __asm__ __volatile__("sth %0, [%1]"
672 : /* No outputs */
673 : "r" (val), "r" (addr));
674}
675
676static __inline__ void
677xf86WriteMmio16LeNB(__volatile__ void *base, const unsigned long offset,
678 const unsigned int val)
679{
680 unsigned long addr = ((unsigned long)base) + offset;
681
682 __asm__ __volatile__("stha %0, [%1] %2"
683 : /* No outputs */
684 : "r" (val), "r" (addr), "i" (ASI_PL));
685}
686
687static __inline__ void
688xf86WriteMmio32BeNB(__volatile__ void *base, const unsigned long offset,
689 const unsigned int val)
690{
691 unsigned long addr = ((unsigned long)base) + offset;
692
693 __asm__ __volatile__("st %0, [%1]"
694 : /* No outputs */
695 : "r" (val), "r" (addr));
696}
697
698static __inline__ void
699xf86WriteMmio32LeNB(__volatile__ void *base, const unsigned long offset,
700 const unsigned int val)
701{
702 unsigned long addr = ((unsigned long)base) + offset;
703
704 __asm__ __volatile__("sta %0, [%1] %2"
705 : /* No outputs */
706 : "r" (val), "r" (addr), "i" (ASI_PL));
707}
708
709# elif defined(__mips__) || (defined(__arm32__) && !defined(__linux__))
710# ifdef __arm32__
711# define PORT_SIZE long
712# else
713# define PORT_SIZE short
714# endif
715
716_X_EXPORT unsigned int IOPortBase; /* Memory mapped I/O port area */
717
718static __inline__ void
719outb(unsigned PORT_SIZE port, unsigned char val)
720{
721 *(volatile unsigned char*)(((unsigned PORT_SIZE)(port))+IOPortBase) = val;
722}
723
724static __inline__ void
725outw(unsigned PORT_SIZE port, unsigned short val)
726{
727 *(volatile unsigned short*)(((unsigned PORT_SIZE)(port))+IOPortBase) = val;
728}
729
730static __inline__ void
731outl(unsigned PORT_SIZE port, unsigned int val)
732{
733 *(volatile unsigned int*)(((unsigned PORT_SIZE)(port))+IOPortBase) = val;
734}
735
736static __inline__ unsigned int
737inb(unsigned PORT_SIZE port)
738{
739 return *(volatile unsigned char*)(((unsigned PORT_SIZE)(port))+IOPortBase);
740}
741
742static __inline__ unsigned int
743inw(unsigned PORT_SIZE port)
744{
745 return *(volatile unsigned short*)(((unsigned PORT_SIZE)(port))+IOPortBase);
746}
747
748static __inline__ unsigned int
749inl(unsigned PORT_SIZE port)
750{
751 return *(volatile unsigned int*)(((unsigned PORT_SIZE)(port))+IOPortBase);
752}
753
754
755# if defined(__mips__)
756# ifdef linux /* don't mess with other OSs */
757# if X_BYTE_ORDER == X_BIG_ENDIAN
758static __inline__ unsigned int
759xf86ReadMmio32Be(__volatile__ void *base, const unsigned long offset)
760{
761 unsigned long addr = ((unsigned long)base) + offset;
762 unsigned int ret;
763
764 __asm__ __volatile__("lw %0, 0(%1)"
765 : "=r" (ret)
766 : "r" (addr));
767 return ret;
768}
769
770static __inline__ void
771xf86WriteMmio32Be(__volatile__ void *base, const unsigned long offset,
772 const unsigned int val)
773{
774 unsigned long addr = ((unsigned long)base) + offset;
775
776 __asm__ __volatile__("sw %0, 0(%1)"
777 : /* No outputs */
778 : "r" (val), "r" (addr));
779}
780# endif
781# endif /* !linux */
782# endif /* __mips__ */
783
784# elif (defined(linux) || defined(__OpenBSD__) || defined(__NetBSD__) || defined(__FreeBSD__)) && defined(__powerpc__)
785
786# ifndef MAP_FAILED
787# define MAP_FAILED ((void *)-1)
788# endif
789
790extern _X_EXPORT volatile unsigned char *ioBase;
791
792static __inline__ unsigned char
793xf86ReadMmio8(__volatile__ void *base, const unsigned long offset)
794{
795 register unsigned char val;
796 __asm__ __volatile__(
797 "lbzx %0,%1,%2\n\t"
798 "eieio"
799 : "=r" (val)
800 : "b" (base), "r" (offset),
801 "m" (*((volatile unsigned char *)base+offset)));
802 return val;
803}
804
805static __inline__ unsigned short
806xf86ReadMmio16Be(__volatile__ void *base, const unsigned long offset)
807{
808 register unsigned short val;
809 __asm__ __volatile__(
810 "lhzx %0,%1,%2\n\t"
811 "eieio"
812 : "=r" (val)
813 : "b" (base), "r" (offset),
814 "m" (*((volatile unsigned char *)base+offset)));
815 return val;
816}
817
818static __inline__ unsigned short
819xf86ReadMmio16Le(__volatile__ void *base, const unsigned long offset)
820{
821 register unsigned short val;
822 __asm__ __volatile__(
823 "lhbrx %0,%1,%2\n\t"
824 "eieio"
825 : "=r" (val)
826 : "b" (base), "r" (offset),
827 "m" (*((volatile unsigned char *)base+offset)));
828 return val;
829}
830
831static __inline__ unsigned int
832xf86ReadMmio32Be(__volatile__ void *base, const unsigned long offset)
833{
834 register unsigned int val;
835 __asm__ __volatile__(
836 "lwzx %0,%1,%2\n\t"
837 "eieio"
838 : "=r" (val)
839 : "b" (base), "r" (offset),
840 "m" (*((volatile unsigned char *)base+offset)));
841 return val;
842}
843
844static __inline__ unsigned int
845xf86ReadMmio32Le(__volatile__ void *base, const unsigned long offset)
846{
847 register unsigned int val;
848 __asm__ __volatile__(
849 "lwbrx %0,%1,%2\n\t"
850 "eieio"
851 : "=r" (val)
852 : "b" (base), "r" (offset),
853 "m" (*((volatile unsigned char *)base+offset)));
854 return val;
855}
856
857static __inline__ void
858xf86WriteMmioNB8(__volatile__ void *base, const unsigned long offset,
859 const unsigned char val)
860{
861 __asm__ __volatile__(
862 "stbx %1,%2,%3\n\t"
863 : "=m" (*((volatile unsigned char *)base+offset))
864 : "r" (val), "b" (base), "r" (offset));
865}
866
867static __inline__ void
868xf86WriteMmioNB16Le(__volatile__ void *base, const unsigned long offset,
869 const unsigned short val)
870{
871 __asm__ __volatile__(
872 "sthbrx %1,%2,%3\n\t"
873 : "=m" (*((volatile unsigned char *)base+offset))
874 : "r" (val), "b" (base), "r" (offset));
875}
876
877static __inline__ void
878xf86WriteMmioNB16Be(__volatile__ void *base, const unsigned long offset,
879 const unsigned short val)
880{
881 __asm__ __volatile__(
882 "sthx %1,%2,%3\n\t"
883 : "=m" (*((volatile unsigned char *)base+offset))
884 : "r" (val), "b" (base), "r" (offset));
885}
886
887static __inline__ void
888xf86WriteMmioNB32Le(__volatile__ void *base, const unsigned long offset,
889 const unsigned int val)
890{
891 __asm__ __volatile__(
892 "stwbrx %1,%2,%3\n\t"
893 : "=m" (*((volatile unsigned char *)base+offset))
894 : "r" (val), "b" (base), "r" (offset));
895}
896
897static __inline__ void
898xf86WriteMmioNB32Be(__volatile__ void *base, const unsigned long offset,
899 const unsigned int val)
900{
901 __asm__ __volatile__(
902 "stwx %1,%2,%3\n\t"
903 : "=m" (*((volatile unsigned char *)base+offset))
904 : "r" (val), "b" (base), "r" (offset));
905}
906
907static __inline__ void
908xf86WriteMmio8(__volatile__ void *base, const unsigned long offset,
909 const unsigned char val)
910{
911 xf86WriteMmioNB8(base, offset, val);
912 eieio();
913}
914
915static __inline__ void
916xf86WriteMmio16Le(__volatile__ void *base, const unsigned long offset,
917 const unsigned short val)
918{
919 xf86WriteMmioNB16Le(base, offset, val);
920 eieio();
921}
922
923static __inline__ void
924xf86WriteMmio16Be(__volatile__ void *base, const unsigned long offset,
925 const unsigned short val)
926{
927 xf86WriteMmioNB16Be(base, offset, val);
928 eieio();
929}
930
931static __inline__ void
932xf86WriteMmio32Le(__volatile__ void *base, const unsigned long offset,
933 const unsigned int val)
934{
935 xf86WriteMmioNB32Le(base, offset, val);
936 eieio();
937}
938
939static __inline__ void
940xf86WriteMmio32Be(__volatile__ void *base, const unsigned long offset,
941 const unsigned int val)
942{
943 xf86WriteMmioNB32Be(base, offset, val);
944 eieio();
945}
946
947
948static __inline__ void
949outb(unsigned short port, unsigned char value)
950{
951 if(ioBase == MAP_FAILED) return;
952 xf86WriteMmio8((void *)ioBase, port, value);
953}
954
955static __inline__ void
956outw(unsigned short port, unsigned short value)
957{
958 if(ioBase == MAP_FAILED) return;
959 xf86WriteMmio16Le((void *)ioBase, port, value);
960}
961
962static __inline__ void
963outl(unsigned short port, unsigned int value)
964{
965 if(ioBase == MAP_FAILED) return;
966 xf86WriteMmio32Le((void *)ioBase, port, value);
967}
968
969static __inline__ unsigned int
970inb(unsigned short port)
971{
972 if(ioBase == MAP_FAILED) return 0;
973 return xf86ReadMmio8((void *)ioBase, port);
974}
975
976static __inline__ unsigned int
977inw(unsigned short port)
978{
979 if(ioBase == MAP_FAILED) return 0;
980 return xf86ReadMmio16Le((void *)ioBase, port);
981}
982
983static __inline__ unsigned int
984inl(unsigned short port)
985{
986 if(ioBase == MAP_FAILED) return 0;
987 return xf86ReadMmio32Le((void *)ioBase, port);
988}
989
990#elif defined(__arm__) && defined(__linux__)
991
992/* for Linux on ARM, we use the LIBC inx/outx routines */
993/* note that the appropriate setup via "ioperm" needs to be done */
994/* *before* any inx/outx is done. */
995
996#include <sys/io.h>
997
998static __inline__ void
999xf_outb(unsigned short port, unsigned char val)
1000{
1001 outb(val, port);
1002}
1003
1004static __inline__ void
1005xf_outw(unsigned short port, unsigned short val)
1006{
1007 outw(val, port);
1008}
1009
1010static __inline__ void
1011xf_outl(unsigned short port, unsigned int val)
1012{
1013 outl(val, port);
1014}
1015
1016#define outb xf_outb
1017#define outw xf_outw
1018#define outl xf_outl
1019
1020# else /* ix86 */
1021
1022# if !defined(__SUNPRO_C)
1023# if !defined(FAKEIT) && !defined(__mc68000__) && !defined(__arm__) && !defined(__sh__) && !defined(__hppa__) && !defined(__s390__) && !defined(__m32r__)
1024# ifdef GCCUSESGAS
1025
1026/*
1027 * If gcc uses gas rather than the native assembler, the syntax of these
1028 * inlines has to be different. DHD
1029 */
1030
1031static __inline__ void
1032outb(unsigned short port, unsigned char val)
1033{
1034 __asm__ __volatile__("outb %0,%1" : :"a" (val), "d" (port));
1035}
1036
1037
1038static __inline__ void
1039outw(unsigned short port, unsigned short val)
1040{
1041 __asm__ __volatile__("outw %0,%1" : :"a" (val), "d" (port));
1042}
1043
1044static __inline__ void
1045outl(unsigned short port, unsigned int val)
1046{
1047 __asm__ __volatile__("outl %0,%1" : :"a" (val), "d" (port));
1048}
1049
1050static __inline__ unsigned int
1051inb(unsigned short port)
1052{
1053 unsigned char ret;
1054 __asm__ __volatile__("inb %1,%0" :
1055 "=a" (ret) :
1056 "d" (port));
1057 return ret;
1058}
1059
1060static __inline__ unsigned int
1061inw(unsigned short port)
1062{
1063 unsigned short ret;
1064 __asm__ __volatile__("inw %1,%0" :
1065 "=a" (ret) :
1066 "d" (port));
1067 return ret;
1068}
1069
1070static __inline__ unsigned int
1071inl(unsigned short port)
1072{
1073 unsigned int ret;
1074 __asm__ __volatile__("inl %1,%0" :
1075 "=a" (ret) :
1076 "d" (port));
1077 return ret;
1078}
1079
1080# else /* GCCUSESGAS */
1081
1082static __inline__ void
1083outb(unsigned short port, unsigned char val)
1084{
1085 __asm__ __volatile__("out%B0 (%1)" : :"a" (val), "d" (port));
1086}
1087
1088static __inline__ void
1089outw(unsigned short port, unsigned short val)
1090{
1091 __asm__ __volatile__("out%W0 (%1)" : :"a" (val), "d" (port));
1092}
1093
1094static __inline__ void
1095outl(unsigned short port, unsigned int val)
1096{
1097 __asm__ __volatile__("out%L0 (%1)" : :"a" (val), "d" (port));
1098}
1099
1100static __inline__ unsigned int
1101inb(unsigned short port)
1102{
1103 unsigned char ret;
1104 __asm__ __volatile__("in%B0 (%1)" :
1105 "=a" (ret) :
1106 "d" (port));
1107 return ret;
1108}
1109
1110static __inline__ unsigned int
1111inw(unsigned short port)
1112{
1113 unsigned short ret;
1114 __asm__ __volatile__("in%W0 (%1)" :
1115 "=a" (ret) :
1116 "d" (port));
1117 return ret;
1118}
1119
1120static __inline__ unsigned int
1121inl(unsigned short port)
1122{
1123 unsigned int ret;
1124 __asm__ __volatile__("in%L0 (%1)" :
1125 "=a" (ret) :
1126 "d" (port));
1127 return ret;
1128}
1129
1130# endif /* GCCUSESGAS */
1131
1132# else /* !defined(FAKEIT) && !defined(__mc68000__) && !defined(__arm__) && !defined(__sh__) && !defined(__hppa__) && !defined(__m32r__) */
1133
1134static __inline__ void
1135outb(unsigned short port, unsigned char val)
1136{
1137}
1138
1139static __inline__ void
1140outw(unsigned short port, unsigned short val)
1141{
1142}
1143
1144static __inline__ void
1145outl(unsigned short port, unsigned int val)
1146{
1147}
1148
1149static __inline__ unsigned int
1150inb(unsigned short port)
1151{
1152 return 0;
1153}
1154
1155static __inline__ unsigned int
1156inw(unsigned short port)
1157{
1158 return 0;
1159}
1160
1161static __inline__ unsigned int
1162inl(unsigned short port)
1163{
1164 return 0;
1165}
1166
1167# endif /* FAKEIT */
1168# endif /* __SUNPRO_C */
1169
1170# endif /* ix86 */
1171
1172# else /* !GNUC */
1173# if defined(__STDC__) && (__STDC__ == 1)
1174# ifndef asm
1175# define asm __asm
1176# endif
1177# endif
1178# ifndef SCO325
1179# if defined(__UNIXWARE__)
1180# /* avoid including <sys/types.h> for <sys/inline.h> on UnixWare */
1181# define ushort unsigned short
1182# define ushort_t unsigned short
1183# define ulong unsigned long
1184# define ulong_t unsigned long
1185# define uint_t unsigned int
1186# define uchar_t unsigned char
1187# endif /* __UNIXWARE__ */
1188# if !defined(__SUNPRO_C)
1189# include <sys/inline.h>
1190# endif
1191# else
1192# include "scoasm.h"
1193# endif
1194# if !defined(__HIGHC__) && !defined(__SUNPRO_C) || \
1195 defined(__USLC__)
1196# pragma asm partial_optimization outl
1197# pragma asm partial_optimization outw
1198# pragma asm partial_optimization outb
1199# pragma asm partial_optimization inl
1200# pragma asm partial_optimization inw
1201# pragma asm partial_optimization inb
1202# endif
1203# endif /* __GNUC__ */
1204
1205# endif /* NO_INLINE */
1206
1207# ifdef __alpha__
1208/* entry points for Mmio memory access routines */
1209extern _X_EXPORT int (*xf86ReadMmio8)(void *, unsigned long);
1210extern _X_EXPORT int (*xf86ReadMmio16)(void *, unsigned long);
1211# ifndef STANDALONE_MMIO
1212extern _X_EXPORT int (*xf86ReadMmio32)(void *, unsigned long);
1213# else
1214/* Some DRI 3D drivers need MMIO_IN32. */
1215static __inline__ int
1216xf86ReadMmio32(void *Base, unsigned long Offset)
1217{
1218 mem_barrier();
1219 return *(volatile unsigned int*)((unsigned long)Base+(Offset));
1220}
1221# endif
1222extern _X_EXPORT void (*xf86WriteMmio8)(int, void *, unsigned long);
1223extern _X_EXPORT void (*xf86WriteMmio16)(int, void *, unsigned long);
1224extern _X_EXPORT void (*xf86WriteMmio32)(int, void *, unsigned long);
1225extern _X_EXPORT void (*xf86WriteMmioNB8)(int, void *, unsigned long);
1226extern _X_EXPORT void (*xf86WriteMmioNB16)(int, void *, unsigned long);
1227extern _X_EXPORT void (*xf86WriteMmioNB32)(int, void *, unsigned long);
1228extern _X_EXPORT void xf86SlowBCopyFromBus(unsigned char *, unsigned char *, int);
1229extern _X_EXPORT void xf86SlowBCopyToBus(unsigned char *, unsigned char *, int);
1230
1231/* Some macros to hide the system dependencies for MMIO accesses */
1232/* Changed to kill noise generated by gcc's -Wcast-align */
1233# define MMIO_IN8(base, offset) (*xf86ReadMmio8)(base, offset)
1234# define MMIO_IN16(base, offset) (*xf86ReadMmio16)(base, offset)
1235# ifndef STANDALONE_MMIO
1236# define MMIO_IN32(base, offset) (*xf86ReadMmio32)(base, offset)
1237# else
1238# define MMIO_IN32(base, offset) xf86ReadMmio32(base, offset)
1239# endif
1240
1241# define MMIO_OUT32(base, offset, val) \
1242 do { \
1243 write_mem_barrier(); \
1244 *(volatile CARD32 *)(void *)(((CARD8*)(base)) + (offset)) = (val); \
1245 } while (0)
1246# define MMIO_ONB32(base, offset, val) \
1247 *(volatile CARD32 *)(void *)(((CARD8*)(base)) + (offset)) = (val)
1248
1249# define MMIO_OUT8(base, offset, val) \
1250 (*xf86WriteMmio8)((CARD8)(val), base, offset)
1251# define MMIO_OUT16(base, offset, val) \
1252 (*xf86WriteMmio16)((CARD16)(val), base, offset)
1253# define MMIO_ONB8(base, offset, val) \
1254 (*xf86WriteMmioNB8)((CARD8)(val), base, offset)
1255# define MMIO_ONB16(base, offset, val) \
1256 (*xf86WriteMmioNB16)((CARD16)(val), base, offset)
1257# define MMIO_MOVE32(base, offset, val) \
1258 MMIO_OUT32(base, offset, val)
1259
1260# elif defined(__powerpc__)
1261 /*
1262 * we provide byteswapping and no byteswapping functions here
1263 * with byteswapping as default,
1264 * drivers that don't need byteswapping should define PPC_MMIO_IS_BE
1265 */
1266# define MMIO_IN8(base, offset) xf86ReadMmio8(base, offset)
1267# define MMIO_OUT8(base, offset, val) \
1268 xf86WriteMmio8(base, offset, (CARD8)(val))
1269# define MMIO_ONB8(base, offset, val) \
1270 xf86WriteMmioNB8(base, offset, (CARD8)(val))
1271
1272# if defined(PPC_MMIO_IS_BE) /* No byteswapping */
1273# define MMIO_IN16(base, offset) xf86ReadMmio16Be(base, offset)
1274# define MMIO_IN32(base, offset) xf86ReadMmio32Be(base, offset)
1275# define MMIO_OUT16(base, offset, val) \
1276 xf86WriteMmio16Be(base, offset, (CARD16)(val))
1277# define MMIO_OUT32(base, offset, val) \
1278 xf86WriteMmio32Be(base, offset, (CARD32)(val))
1279# define MMIO_ONB16(base, offset, val) \
1280 xf86WriteMmioNB16Be(base, offset, (CARD16)(val))
1281# define MMIO_ONB32(base, offset, val) \
1282 xf86WriteMmioNB32Be(base, offset, (CARD32)(val))
1283# else /* byteswapping is the default */
1284# define MMIO_IN16(base, offset) xf86ReadMmio16Le(base, offset)
1285# define MMIO_IN32(base, offset) xf86ReadMmio32Le(base, offset)
1286# define MMIO_OUT16(base, offset, val) \
1287 xf86WriteMmio16Le(base, offset, (CARD16)(val))
1288# define MMIO_OUT32(base, offset, val) \
1289 xf86WriteMmio32Le(base, offset, (CARD32)(val))
1290# define MMIO_ONB16(base, offset, val) \
1291 xf86WriteMmioNB16Le(base, offset, (CARD16)(val))
1292# define MMIO_ONB32(base, offset, val) \
1293 xf86WriteMmioNB32Le(base, offset, (CARD32)(val))
1294# endif
1295
1296# define MMIO_MOVE32(base, offset, val) \
1297 xf86WriteMmio32Be(base, offset, (CARD32)(val))
1298
1299# elif defined(__sparc__) || defined(sparc) || defined(__sparc)
1300 /*
1301 * Like powerpc, we provide byteswapping and no byteswapping functions
1302 * here with byteswapping as default, drivers that don't need byteswapping
1303 * should define SPARC_MMIO_IS_BE (perhaps create a generic macro so that we
1304 * do not need to use PPC_MMIO_IS_BE and the sparc one in all the same places
1305 * of drivers?).
1306 */
1307# define MMIO_IN8(base, offset) xf86ReadMmio8(base, offset)
1308# define MMIO_OUT8(base, offset, val) \
1309 xf86WriteMmio8(base, offset, (CARD8)(val))
1310# define MMIO_ONB8(base, offset, val) \
1311 xf86WriteMmio8NB(base, offset, (CARD8)(val))
1312
1313# if defined(SPARC_MMIO_IS_BE) /* No byteswapping */
1314# define MMIO_IN16(base, offset) xf86ReadMmio16Be(base, offset)
1315# define MMIO_IN32(base, offset) xf86ReadMmio32Be(base, offset)
1316# define MMIO_OUT16(base, offset, val) \
1317 xf86WriteMmio16Be(base, offset, (CARD16)(val))
1318# define MMIO_OUT32(base, offset, val) \
1319 xf86WriteMmio32Be(base, offset, (CARD32)(val))
1320# define MMIO_ONB16(base, offset, val) \
1321 xf86WriteMmio16BeNB(base, offset, (CARD16)(val))
1322# define MMIO_ONB32(base, offset, val) \
1323 xf86WriteMmio32BeNB(base, offset, (CARD32)(val))
1324# else /* byteswapping is the default */
1325# define MMIO_IN16(base, offset) xf86ReadMmio16Le(base, offset)
1326# define MMIO_IN32(base, offset) xf86ReadMmio32Le(base, offset)
1327# define MMIO_OUT16(base, offset, val) \
1328 xf86WriteMmio16Le(base, offset, (CARD16)(val))
1329# define MMIO_OUT32(base, offset, val) \
1330 xf86WriteMmio32Le(base, offset, (CARD32)(val))
1331# define MMIO_ONB16(base, offset, val) \
1332 xf86WriteMmio16LeNB(base, offset, (CARD16)(val))
1333# define MMIO_ONB32(base, offset, val) \
1334 xf86WriteMmio32LeNB(base, offset, (CARD32)(val))
1335# endif
1336
1337# define MMIO_MOVE32(base, offset, val) \
1338 xf86WriteMmio32Be(base, offset, (CARD32)(val))
1339
1340# else /* !__alpha__ && !__powerpc__ && !__sparc__ */
1341
1342# define MMIO_IN8(base, offset) \
1343 *(volatile CARD8 *)(((CARD8*)(base)) + (offset))
1344# define MMIO_IN16(base, offset) \
1345 *(volatile CARD16 *)(void *)(((CARD8*)(base)) + (offset))
1346# define MMIO_IN32(base, offset) \
1347 *(volatile CARD32 *)(void *)(((CARD8*)(base)) + (offset))
1348# define MMIO_OUT8(base, offset, val) \
1349 *(volatile CARD8 *)(((CARD8*)(base)) + (offset)) = (val)
1350# define MMIO_OUT16(base, offset, val) \
1351 *(volatile CARD16 *)(void *)(((CARD8*)(base)) + (offset)) = (val)
1352# define MMIO_OUT32(base, offset, val) \
1353 *(volatile CARD32 *)(void *)(((CARD8*)(base)) + (offset)) = (val)
1354# define MMIO_ONB8(base, offset, val) MMIO_OUT8(base, offset, val)
1355# define MMIO_ONB16(base, offset, val) MMIO_OUT16(base, offset, val)
1356# define MMIO_ONB32(base, offset, val) MMIO_OUT32(base, offset, val)
1357
1358# define MMIO_MOVE32(base, offset, val) MMIO_OUT32(base, offset, val)
1359
1360# endif /* __alpha__ */
1361
1362/*
1363 * With Intel, the version in os-support/misc/SlowBcopy.s is used.
1364 * This avoids port I/O during the copy (which causes problems with
1365 * some hardware).
1366 */
1367# ifdef __alpha__
1368# define slowbcopy_tobus(src,dst,count) xf86SlowBCopyToBus(src,dst,count)
1369# define slowbcopy_frombus(src,dst,count) xf86SlowBCopyFromBus(src,dst,count)
1370# else /* __alpha__ */
1371# define slowbcopy_tobus(src,dst,count) xf86SlowBcopy(src,dst,count)
1372# define slowbcopy_frombus(src,dst,count) xf86SlowBcopy(src,dst,count)
1373# endif /* __alpha__ */
1374
1375#endif /* _COMPILER_H */
Note: See TracBrowser for help on using the repository browser.

© 2024 Oracle Support Privacy / Do Not Sell My Info Terms of Use Trademark Policy Automated Access Etiquette