VirtualBox

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

Last change on this file since 35102 was 32163, checked in by vboxsync, 14 years ago

Additions/x11/x11include: additional headers for building drivers for X.Org Server 1.9

  • 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 _outb(unsigned char val, unsigned long port);
334extern _X_EXPORT void _outw(unsigned short val, unsigned long port);
335extern _X_EXPORT void _outl(unsigned int val, unsigned long port);
336extern _X_EXPORT unsigned int _inb(unsigned long port);
337extern _X_EXPORT unsigned int _inw(unsigned long port);
338extern _X_EXPORT unsigned int _inl(unsigned long port);
339
340static __inline__ void
341outb(unsigned long port, unsigned char val)
342{
343 _outb(val, port);
344}
345
346static __inline__ void
347outw(unsigned long port, unsigned short val)
348{
349 _outw(val, port);
350}
351
352static __inline__ void
353outl(unsigned long port, unsigned int val)
354{
355 _outl(val, port);
356}
357
358static __inline__ unsigned int
359inb(unsigned long port)
360{
361 return _inb(port);
362}
363
364static __inline__ unsigned int
365inw(unsigned long port)
366{
367 return _inw(port);
368}
369
370static __inline__ unsigned int
371inl(unsigned long port)
372{
373 return _inl(port);
374}
375
376# endif /* linux */
377
378# if (defined(__FreeBSD__) || defined(__OpenBSD__)) \
379 && !defined(DO_PROTOTYPES)
380
381/* for FreeBSD and OpenBSD on Alpha, we use the libio (resp. libalpha) */
382/* inx/outx routines */
383/* note that the appropriate setup via "ioperm" needs to be done */
384/* *before* any inx/outx is done. */
385
386extern _X_EXPORT void outb(unsigned int port, unsigned char val);
387extern _X_EXPORT void outw(unsigned int port, unsigned short val);
388extern _X_EXPORT void outl(unsigned int port, unsigned int val);
389extern _X_EXPORT unsigned char inb(unsigned int port);
390extern _X_EXPORT unsigned short inw(unsigned int port);
391extern _X_EXPORT unsigned int inl(unsigned int port);
392
393# endif /* (__FreeBSD__ || __OpenBSD__ ) && !DO_PROTOTYPES */
394
395
396#if defined(__NetBSD__)
397#include <machine/pio.h>
398#endif /* __NetBSD__ */
399
400# elif defined(linux) && defined(__ia64__)
401
402# include <inttypes.h>
403
404# include <sys/io.h>
405
406# undef outb
407# undef outw
408# undef outl
409# undef inb
410# undef inw
411# undef inl
412extern _X_EXPORT void outb(unsigned long port, unsigned char val);
413extern _X_EXPORT void outw(unsigned long port, unsigned short val);
414extern _X_EXPORT void outl(unsigned long port, unsigned int val);
415extern _X_EXPORT unsigned int inb(unsigned long port);
416extern _X_EXPORT unsigned int inw(unsigned long port);
417extern _X_EXPORT unsigned int inl(unsigned long port);
418
419# elif (defined(linux) || defined(__FreeBSD__)) && defined(__amd64__)
420
421# include <inttypes.h>
422
423static __inline__ void
424outb(unsigned short port, unsigned char val)
425{
426 __asm__ __volatile__("outb %0,%1" : :"a" (val), "d" (port));
427}
428
429
430static __inline__ void
431outw(unsigned short port, unsigned short val)
432{
433 __asm__ __volatile__("outw %0,%1" : :"a" (val), "d" (port));
434}
435
436static __inline__ void
437outl(unsigned short port, unsigned int val)
438{
439 __asm__ __volatile__("outl %0,%1" : :"a" (val), "d" (port));
440}
441
442static __inline__ unsigned int
443inb(unsigned short port)
444{
445 unsigned char ret;
446 __asm__ __volatile__("inb %1,%0" :
447 "=a" (ret) :
448 "d" (port));
449 return ret;
450}
451
452static __inline__ unsigned int
453inw(unsigned short port)
454{
455 unsigned short ret;
456 __asm__ __volatile__("inw %1,%0" :
457 "=a" (ret) :
458 "d" (port));
459 return ret;
460}
461
462static __inline__ unsigned int
463inl(unsigned short port)
464{
465 unsigned int ret;
466 __asm__ __volatile__("inl %1,%0" :
467 "=a" (ret) :
468 "d" (port));
469 return ret;
470}
471
472# elif (defined(linux) || defined(sun) || defined(__OpenBSD__) || defined(__FreeBSD__)) && defined(__sparc__)
473
474# ifndef ASI_PL
475# define ASI_PL 0x88
476# endif
477
478static __inline__ void
479outb(unsigned long port, unsigned char val)
480{
481 __asm__ __volatile__("stba %0, [%1] %2"
482 : /* No outputs */
483 : "r" (val), "r" (port), "i" (ASI_PL));
484 barrier();
485}
486
487static __inline__ void
488outw(unsigned long port, unsigned short val)
489{
490 __asm__ __volatile__("stha %0, [%1] %2"
491 : /* No outputs */
492 : "r" (val), "r" (port), "i" (ASI_PL));
493 barrier();
494}
495
496static __inline__ void
497outl(unsigned long port, unsigned int val)
498{
499 __asm__ __volatile__("sta %0, [%1] %2"
500 : /* No outputs */
501 : "r" (val), "r" (port), "i" (ASI_PL));
502 barrier();
503}
504
505static __inline__ unsigned int
506inb(unsigned long port)
507{
508 unsigned int ret;
509 __asm__ __volatile__("lduba [%1] %2, %0"
510 : "=r" (ret)
511 : "r" (port), "i" (ASI_PL));
512 return ret;
513}
514
515static __inline__ unsigned int
516inw(unsigned long port)
517{
518 unsigned int ret;
519 __asm__ __volatile__("lduha [%1] %2, %0"
520 : "=r" (ret)
521 : "r" (port), "i" (ASI_PL));
522 return ret;
523}
524
525static __inline__ unsigned int
526inl(unsigned long port)
527{
528 unsigned int ret;
529 __asm__ __volatile__("lda [%1] %2, %0"
530 : "=r" (ret)
531 : "r" (port), "i" (ASI_PL));
532 return ret;
533}
534
535static __inline__ unsigned char
536xf86ReadMmio8(__volatile__ void *base, const unsigned long offset)
537{
538 unsigned long addr = ((unsigned long)base) + offset;
539 unsigned char ret;
540
541 __asm__ __volatile__("lduba [%1] %2, %0"
542 : "=r" (ret)
543 : "r" (addr), "i" (ASI_PL));
544 return ret;
545}
546
547static __inline__ unsigned short
548xf86ReadMmio16Be(__volatile__ void *base, const unsigned long offset)
549{
550 unsigned long addr = ((unsigned long)base) + offset;
551 unsigned short ret;
552
553 __asm__ __volatile__("lduh [%1], %0"
554 : "=r" (ret)
555 : "r" (addr));
556 return ret;
557}
558
559static __inline__ unsigned short
560xf86ReadMmio16Le(__volatile__ void *base, const unsigned long offset)
561{
562 unsigned long addr = ((unsigned long)base) + offset;
563 unsigned short ret;
564
565 __asm__ __volatile__("lduha [%1] %2, %0"
566 : "=r" (ret)
567 : "r" (addr), "i" (ASI_PL));
568 return ret;
569}
570
571static __inline__ unsigned int
572xf86ReadMmio32Be(__volatile__ void *base, const unsigned long offset)
573{
574 unsigned long addr = ((unsigned long)base) + offset;
575 unsigned int ret;
576
577 __asm__ __volatile__("ld [%1], %0"
578 : "=r" (ret)
579 : "r" (addr));
580 return ret;
581}
582
583static __inline__ unsigned int
584xf86ReadMmio32Le(__volatile__ void *base, const unsigned long offset)
585{
586 unsigned long addr = ((unsigned long)base) + offset;
587 unsigned int ret;
588
589 __asm__ __volatile__("lda [%1] %2, %0"
590 : "=r" (ret)
591 : "r" (addr), "i" (ASI_PL));
592 return ret;
593}
594
595static __inline__ void
596xf86WriteMmio8(__volatile__ void *base, const unsigned long offset,
597 const unsigned int val)
598{
599 unsigned long addr = ((unsigned long)base) + offset;
600
601 __asm__ __volatile__("stba %0, [%1] %2"
602 : /* No outputs */
603 : "r" (val), "r" (addr), "i" (ASI_PL));
604 barrier();
605}
606
607static __inline__ void
608xf86WriteMmio16Be(__volatile__ void *base, const unsigned long offset,
609 const unsigned int val)
610{
611 unsigned long addr = ((unsigned long)base) + offset;
612
613 __asm__ __volatile__("sth %0, [%1]"
614 : /* No outputs */
615 : "r" (val), "r" (addr));
616 barrier();
617}
618
619static __inline__ void
620xf86WriteMmio16Le(__volatile__ void *base, const unsigned long offset,
621 const unsigned int val)
622{
623 unsigned long addr = ((unsigned long)base) + offset;
624
625 __asm__ __volatile__("stha %0, [%1] %2"
626 : /* No outputs */
627 : "r" (val), "r" (addr), "i" (ASI_PL));
628 barrier();
629}
630
631static __inline__ void
632xf86WriteMmio32Be(__volatile__ void *base, const unsigned long offset,
633 const unsigned int val)
634{
635 unsigned long addr = ((unsigned long)base) + offset;
636
637 __asm__ __volatile__("st %0, [%1]"
638 : /* No outputs */
639 : "r" (val), "r" (addr));
640 barrier();
641}
642
643static __inline__ void
644xf86WriteMmio32Le(__volatile__ void *base, const unsigned long offset,
645 const unsigned int val)
646{
647 unsigned long addr = ((unsigned long)base) + offset;
648
649 __asm__ __volatile__("sta %0, [%1] %2"
650 : /* No outputs */
651 : "r" (val), "r" (addr), "i" (ASI_PL));
652 barrier();
653}
654
655static __inline__ void
656xf86WriteMmio8NB(__volatile__ void *base, const unsigned long offset,
657 const unsigned int val)
658{
659 unsigned long addr = ((unsigned long)base) + offset;
660
661 __asm__ __volatile__("stba %0, [%1] %2"
662 : /* No outputs */
663 : "r" (val), "r" (addr), "i" (ASI_PL));
664}
665
666static __inline__ void
667xf86WriteMmio16BeNB(__volatile__ void *base, const unsigned long offset,
668 const unsigned int val)
669{
670 unsigned long addr = ((unsigned long)base) + offset;
671
672 __asm__ __volatile__("sth %0, [%1]"
673 : /* No outputs */
674 : "r" (val), "r" (addr));
675}
676
677static __inline__ void
678xf86WriteMmio16LeNB(__volatile__ void *base, const unsigned long offset,
679 const unsigned int val)
680{
681 unsigned long addr = ((unsigned long)base) + offset;
682
683 __asm__ __volatile__("stha %0, [%1] %2"
684 : /* No outputs */
685 : "r" (val), "r" (addr), "i" (ASI_PL));
686}
687
688static __inline__ void
689xf86WriteMmio32BeNB(__volatile__ void *base, const unsigned long offset,
690 const unsigned int val)
691{
692 unsigned long addr = ((unsigned long)base) + offset;
693
694 __asm__ __volatile__("st %0, [%1]"
695 : /* No outputs */
696 : "r" (val), "r" (addr));
697}
698
699static __inline__ void
700xf86WriteMmio32LeNB(__volatile__ void *base, const unsigned long offset,
701 const unsigned int val)
702{
703 unsigned long addr = ((unsigned long)base) + offset;
704
705 __asm__ __volatile__("sta %0, [%1] %2"
706 : /* No outputs */
707 : "r" (val), "r" (addr), "i" (ASI_PL));
708}
709
710# elif defined(__mips__) || (defined(__arm32__) && !defined(__linux__))
711# ifdef __arm32__
712# define PORT_SIZE long
713# else
714# define PORT_SIZE short
715# endif
716
717_X_EXPORT unsigned int IOPortBase; /* Memory mapped I/O port area */
718
719static __inline__ void
720outb(unsigned PORT_SIZE port, unsigned char val)
721{
722 *(volatile unsigned char*)(((unsigned PORT_SIZE)(port))+IOPortBase) = val;
723}
724
725static __inline__ void
726outw(unsigned PORT_SIZE port, unsigned short val)
727{
728 *(volatile unsigned short*)(((unsigned PORT_SIZE)(port))+IOPortBase) = val;
729}
730
731static __inline__ void
732outl(unsigned PORT_SIZE port, unsigned int val)
733{
734 *(volatile unsigned int*)(((unsigned PORT_SIZE)(port))+IOPortBase) = val;
735}
736
737static __inline__ unsigned int
738inb(unsigned PORT_SIZE port)
739{
740 return *(volatile unsigned char*)(((unsigned PORT_SIZE)(port))+IOPortBase);
741}
742
743static __inline__ unsigned int
744inw(unsigned PORT_SIZE port)
745{
746 return *(volatile unsigned short*)(((unsigned PORT_SIZE)(port))+IOPortBase);
747}
748
749static __inline__ unsigned int
750inl(unsigned PORT_SIZE port)
751{
752 return *(volatile unsigned int*)(((unsigned PORT_SIZE)(port))+IOPortBase);
753}
754
755
756# if defined(__mips__)
757# ifdef linux /* don't mess with other OSs */
758# if X_BYTE_ORDER == X_BIG_ENDIAN
759static __inline__ unsigned int
760xf86ReadMmio32Be(__volatile__ void *base, const unsigned long offset)
761{
762 unsigned long addr = ((unsigned long)base) + offset;
763 unsigned int ret;
764
765 __asm__ __volatile__("lw %0, 0(%1)"
766 : "=r" (ret)
767 : "r" (addr));
768 return ret;
769}
770
771static __inline__ void
772xf86WriteMmio32Be(__volatile__ void *base, const unsigned long offset,
773 const unsigned int val)
774{
775 unsigned long addr = ((unsigned long)base) + offset;
776
777 __asm__ __volatile__("sw %0, 0(%1)"
778 : /* No outputs */
779 : "r" (val), "r" (addr));
780}
781# endif
782# endif /* !linux */
783# endif /* __mips__ */
784
785# elif (defined(linux) || defined(__OpenBSD__) || defined(__NetBSD__) || defined(__FreeBSD__)) && defined(__powerpc__)
786
787# ifndef MAP_FAILED
788# define MAP_FAILED ((void *)-1)
789# endif
790
791extern _X_EXPORT volatile unsigned char *ioBase;
792
793static __inline__ unsigned char
794xf86ReadMmio8(__volatile__ void *base, const unsigned long offset)
795{
796 register unsigned char val;
797 __asm__ __volatile__(
798 "lbzx %0,%1,%2\n\t"
799 "eieio"
800 : "=r" (val)
801 : "b" (base), "r" (offset),
802 "m" (*((volatile unsigned char *)base+offset)));
803 return val;
804}
805
806static __inline__ unsigned short
807xf86ReadMmio16Be(__volatile__ void *base, const unsigned long offset)
808{
809 register unsigned short val;
810 __asm__ __volatile__(
811 "lhzx %0,%1,%2\n\t"
812 "eieio"
813 : "=r" (val)
814 : "b" (base), "r" (offset),
815 "m" (*((volatile unsigned char *)base+offset)));
816 return val;
817}
818
819static __inline__ unsigned short
820xf86ReadMmio16Le(__volatile__ void *base, const unsigned long offset)
821{
822 register unsigned short val;
823 __asm__ __volatile__(
824 "lhbrx %0,%1,%2\n\t"
825 "eieio"
826 : "=r" (val)
827 : "b" (base), "r" (offset),
828 "m" (*((volatile unsigned char *)base+offset)));
829 return val;
830}
831
832static __inline__ unsigned int
833xf86ReadMmio32Be(__volatile__ void *base, const unsigned long offset)
834{
835 register unsigned int val;
836 __asm__ __volatile__(
837 "lwzx %0,%1,%2\n\t"
838 "eieio"
839 : "=r" (val)
840 : "b" (base), "r" (offset),
841 "m" (*((volatile unsigned char *)base+offset)));
842 return val;
843}
844
845static __inline__ unsigned int
846xf86ReadMmio32Le(__volatile__ void *base, const unsigned long offset)
847{
848 register unsigned int val;
849 __asm__ __volatile__(
850 "lwbrx %0,%1,%2\n\t"
851 "eieio"
852 : "=r" (val)
853 : "b" (base), "r" (offset),
854 "m" (*((volatile unsigned char *)base+offset)));
855 return val;
856}
857
858static __inline__ void
859xf86WriteMmioNB8(__volatile__ void *base, const unsigned long offset,
860 const unsigned char val)
861{
862 __asm__ __volatile__(
863 "stbx %1,%2,%3\n\t"
864 : "=m" (*((volatile unsigned char *)base+offset))
865 : "r" (val), "b" (base), "r" (offset));
866}
867
868static __inline__ void
869xf86WriteMmioNB16Le(__volatile__ void *base, const unsigned long offset,
870 const unsigned short val)
871{
872 __asm__ __volatile__(
873 "sthbrx %1,%2,%3\n\t"
874 : "=m" (*((volatile unsigned char *)base+offset))
875 : "r" (val), "b" (base), "r" (offset));
876}
877
878static __inline__ void
879xf86WriteMmioNB16Be(__volatile__ void *base, const unsigned long offset,
880 const unsigned short val)
881{
882 __asm__ __volatile__(
883 "sthx %1,%2,%3\n\t"
884 : "=m" (*((volatile unsigned char *)base+offset))
885 : "r" (val), "b" (base), "r" (offset));
886}
887
888static __inline__ void
889xf86WriteMmioNB32Le(__volatile__ void *base, const unsigned long offset,
890 const unsigned int val)
891{
892 __asm__ __volatile__(
893 "stwbrx %1,%2,%3\n\t"
894 : "=m" (*((volatile unsigned char *)base+offset))
895 : "r" (val), "b" (base), "r" (offset));
896}
897
898static __inline__ void
899xf86WriteMmioNB32Be(__volatile__ void *base, const unsigned long offset,
900 const unsigned int val)
901{
902 __asm__ __volatile__(
903 "stwx %1,%2,%3\n\t"
904 : "=m" (*((volatile unsigned char *)base+offset))
905 : "r" (val), "b" (base), "r" (offset));
906}
907
908static __inline__ void
909xf86WriteMmio8(__volatile__ void *base, const unsigned long offset,
910 const unsigned char val)
911{
912 xf86WriteMmioNB8(base, offset, val);
913 eieio();
914}
915
916static __inline__ void
917xf86WriteMmio16Le(__volatile__ void *base, const unsigned long offset,
918 const unsigned short val)
919{
920 xf86WriteMmioNB16Le(base, offset, val);
921 eieio();
922}
923
924static __inline__ void
925xf86WriteMmio16Be(__volatile__ void *base, const unsigned long offset,
926 const unsigned short val)
927{
928 xf86WriteMmioNB16Be(base, offset, val);
929 eieio();
930}
931
932static __inline__ void
933xf86WriteMmio32Le(__volatile__ void *base, const unsigned long offset,
934 const unsigned int val)
935{
936 xf86WriteMmioNB32Le(base, offset, val);
937 eieio();
938}
939
940static __inline__ void
941xf86WriteMmio32Be(__volatile__ void *base, const unsigned long offset,
942 const unsigned int val)
943{
944 xf86WriteMmioNB32Be(base, offset, val);
945 eieio();
946}
947
948
949static __inline__ void
950outb(unsigned short port, unsigned char value)
951{
952 if(ioBase == MAP_FAILED) return;
953 xf86WriteMmio8((void *)ioBase, port, value);
954}
955
956static __inline__ void
957outw(unsigned short port, unsigned short value)
958{
959 if(ioBase == MAP_FAILED) return;
960 xf86WriteMmio16Le((void *)ioBase, port, value);
961}
962
963static __inline__ void
964outl(unsigned short port, unsigned int value)
965{
966 if(ioBase == MAP_FAILED) return;
967 xf86WriteMmio32Le((void *)ioBase, port, value);
968}
969
970static __inline__ unsigned int
971inb(unsigned short port)
972{
973 if(ioBase == MAP_FAILED) return 0;
974 return xf86ReadMmio8((void *)ioBase, port);
975}
976
977static __inline__ unsigned int
978inw(unsigned short port)
979{
980 if(ioBase == MAP_FAILED) return 0;
981 return xf86ReadMmio16Le((void *)ioBase, port);
982}
983
984static __inline__ unsigned int
985inl(unsigned short port)
986{
987 if(ioBase == MAP_FAILED) return 0;
988 return xf86ReadMmio32Le((void *)ioBase, port);
989}
990
991#elif defined(__arm__) && defined(__linux__)
992
993/* for Linux on ARM, we use the LIBC inx/outx routines */
994/* note that the appropriate setup via "ioperm" needs to be done */
995/* *before* any inx/outx is done. */
996
997#include <sys/io.h>
998
999static __inline__ void
1000xf_outb(unsigned short port, unsigned char val)
1001{
1002 outb(val, port);
1003}
1004
1005static __inline__ void
1006xf_outw(unsigned short port, unsigned short val)
1007{
1008 outw(val, port);
1009}
1010
1011static __inline__ void
1012xf_outl(unsigned short port, unsigned int val)
1013{
1014 outl(val, port);
1015}
1016
1017#define outb xf_outb
1018#define outw xf_outw
1019#define outl xf_outl
1020
1021# else /* ix86 */
1022
1023# if !defined(__SUNPRO_C)
1024# if !defined(FAKEIT) && !defined(__mc68000__) && !defined(__arm__) && !defined(__sh__) && !defined(__hppa__) && !defined(__s390__) && !defined(__m32r__)
1025# ifdef GCCUSESGAS
1026
1027/*
1028 * If gcc uses gas rather than the native assembler, the syntax of these
1029 * inlines has to be different. DHD
1030 */
1031
1032static __inline__ void
1033outb(unsigned short port, unsigned char val)
1034{
1035 __asm__ __volatile__("outb %0,%1" : :"a" (val), "d" (port));
1036}
1037
1038
1039static __inline__ void
1040outw(unsigned short port, unsigned short val)
1041{
1042 __asm__ __volatile__("outw %0,%1" : :"a" (val), "d" (port));
1043}
1044
1045static __inline__ void
1046outl(unsigned short port, unsigned int val)
1047{
1048 __asm__ __volatile__("outl %0,%1" : :"a" (val), "d" (port));
1049}
1050
1051static __inline__ unsigned int
1052inb(unsigned short port)
1053{
1054 unsigned char ret;
1055 __asm__ __volatile__("inb %1,%0" :
1056 "=a" (ret) :
1057 "d" (port));
1058 return ret;
1059}
1060
1061static __inline__ unsigned int
1062inw(unsigned short port)
1063{
1064 unsigned short ret;
1065 __asm__ __volatile__("inw %1,%0" :
1066 "=a" (ret) :
1067 "d" (port));
1068 return ret;
1069}
1070
1071static __inline__ unsigned int
1072inl(unsigned short port)
1073{
1074 unsigned int ret;
1075 __asm__ __volatile__("inl %1,%0" :
1076 "=a" (ret) :
1077 "d" (port));
1078 return ret;
1079}
1080
1081# else /* GCCUSESGAS */
1082
1083static __inline__ void
1084outb(unsigned short port, unsigned char val)
1085{
1086 __asm__ __volatile__("out%B0 (%1)" : :"a" (val), "d" (port));
1087}
1088
1089static __inline__ void
1090outw(unsigned short port, unsigned short val)
1091{
1092 __asm__ __volatile__("out%W0 (%1)" : :"a" (val), "d" (port));
1093}
1094
1095static __inline__ void
1096outl(unsigned short port, unsigned int val)
1097{
1098 __asm__ __volatile__("out%L0 (%1)" : :"a" (val), "d" (port));
1099}
1100
1101static __inline__ unsigned int
1102inb(unsigned short port)
1103{
1104 unsigned char ret;
1105 __asm__ __volatile__("in%B0 (%1)" :
1106 "=a" (ret) :
1107 "d" (port));
1108 return ret;
1109}
1110
1111static __inline__ unsigned int
1112inw(unsigned short port)
1113{
1114 unsigned short ret;
1115 __asm__ __volatile__("in%W0 (%1)" :
1116 "=a" (ret) :
1117 "d" (port));
1118 return ret;
1119}
1120
1121static __inline__ unsigned int
1122inl(unsigned short port)
1123{
1124 unsigned int ret;
1125 __asm__ __volatile__("in%L0 (%1)" :
1126 "=a" (ret) :
1127 "d" (port));
1128 return ret;
1129}
1130
1131# endif /* GCCUSESGAS */
1132
1133# else /* !defined(FAKEIT) && !defined(__mc68000__) && !defined(__arm__) && !defined(__sh__) && !defined(__hppa__) && !defined(__m32r__) */
1134
1135static __inline__ void
1136outb(unsigned short port, unsigned char val)
1137{
1138}
1139
1140static __inline__ void
1141outw(unsigned short port, unsigned short val)
1142{
1143}
1144
1145static __inline__ void
1146outl(unsigned short port, unsigned int val)
1147{
1148}
1149
1150static __inline__ unsigned int
1151inb(unsigned short port)
1152{
1153 return 0;
1154}
1155
1156static __inline__ unsigned int
1157inw(unsigned short port)
1158{
1159 return 0;
1160}
1161
1162static __inline__ unsigned int
1163inl(unsigned short port)
1164{
1165 return 0;
1166}
1167
1168# endif /* FAKEIT */
1169# endif /* __SUNPRO_C */
1170
1171# endif /* ix86 */
1172
1173# else /* !GNUC */
1174# if defined(__STDC__) && (__STDC__ == 1)
1175# ifndef asm
1176# define asm __asm
1177# endif
1178# endif
1179# ifndef SCO325
1180# if defined(__UNIXWARE__)
1181# /* avoid including <sys/types.h> for <sys/inline.h> on UnixWare */
1182# define ushort unsigned short
1183# define ushort_t unsigned short
1184# define ulong unsigned long
1185# define ulong_t unsigned long
1186# define uint_t unsigned int
1187# define uchar_t unsigned char
1188# endif /* __UNIXWARE__ */
1189# if !defined(__SUNPRO_C)
1190# include <sys/inline.h>
1191# endif
1192# else
1193# include "scoasm.h"
1194# endif
1195# if !defined(__HIGHC__) && !defined(__SUNPRO_C) || \
1196 defined(__USLC__)
1197# pragma asm partial_optimization outl
1198# pragma asm partial_optimization outw
1199# pragma asm partial_optimization outb
1200# pragma asm partial_optimization inl
1201# pragma asm partial_optimization inw
1202# pragma asm partial_optimization inb
1203# endif
1204# endif /* __GNUC__ */
1205
1206# endif /* NO_INLINE */
1207
1208# ifdef __alpha__
1209/* entry points for Mmio memory access routines */
1210extern _X_EXPORT int (*xf86ReadMmio8)(void *, unsigned long);
1211extern _X_EXPORT int (*xf86ReadMmio16)(void *, unsigned long);
1212# ifndef STANDALONE_MMIO
1213extern _X_EXPORT int (*xf86ReadMmio32)(void *, unsigned long);
1214# else
1215/* Some DRI 3D drivers need MMIO_IN32. */
1216static __inline__ int
1217xf86ReadMmio32(void *Base, unsigned long Offset)
1218{
1219 mem_barrier();
1220 return *(volatile unsigned int*)((unsigned long)Base+(Offset));
1221}
1222# endif
1223extern _X_EXPORT void (*xf86WriteMmio8)(int, void *, unsigned long);
1224extern _X_EXPORT void (*xf86WriteMmio16)(int, void *, unsigned long);
1225extern _X_EXPORT void (*xf86WriteMmio32)(int, void *, unsigned long);
1226extern _X_EXPORT void (*xf86WriteMmioNB8)(int, void *, unsigned long);
1227extern _X_EXPORT void (*xf86WriteMmioNB16)(int, void *, unsigned long);
1228extern _X_EXPORT void (*xf86WriteMmioNB32)(int, void *, unsigned long);
1229extern _X_EXPORT void xf86SlowBCopyFromBus(unsigned char *, unsigned char *, int);
1230extern _X_EXPORT void xf86SlowBCopyToBus(unsigned char *, unsigned char *, int);
1231
1232/* Some macros to hide the system dependencies for MMIO accesses */
1233/* Changed to kill noise generated by gcc's -Wcast-align */
1234# define MMIO_IN8(base, offset) (*xf86ReadMmio8)(base, offset)
1235# define MMIO_IN16(base, offset) (*xf86ReadMmio16)(base, offset)
1236# ifndef STANDALONE_MMIO
1237# define MMIO_IN32(base, offset) (*xf86ReadMmio32)(base, offset)
1238# else
1239# define MMIO_IN32(base, offset) xf86ReadMmio32(base, offset)
1240# endif
1241
1242# define MMIO_OUT32(base, offset, val) \
1243 do { \
1244 write_mem_barrier(); \
1245 *(volatile CARD32 *)(void *)(((CARD8*)(base)) + (offset)) = (val); \
1246 } while (0)
1247# define MMIO_ONB32(base, offset, val) \
1248 *(volatile CARD32 *)(void *)(((CARD8*)(base)) + (offset)) = (val)
1249
1250# define MMIO_OUT8(base, offset, val) \
1251 (*xf86WriteMmio8)((CARD8)(val), base, offset)
1252# define MMIO_OUT16(base, offset, val) \
1253 (*xf86WriteMmio16)((CARD16)(val), base, offset)
1254# define MMIO_ONB8(base, offset, val) \
1255 (*xf86WriteMmioNB8)((CARD8)(val), base, offset)
1256# define MMIO_ONB16(base, offset, val) \
1257 (*xf86WriteMmioNB16)((CARD16)(val), base, offset)
1258# define MMIO_MOVE32(base, offset, val) \
1259 MMIO_OUT32(base, offset, val)
1260
1261# elif defined(__powerpc__)
1262 /*
1263 * we provide byteswapping and no byteswapping functions here
1264 * with byteswapping as default,
1265 * drivers that don't need byteswapping should define PPC_MMIO_IS_BE
1266 */
1267# define MMIO_IN8(base, offset) xf86ReadMmio8(base, offset)
1268# define MMIO_OUT8(base, offset, val) \
1269 xf86WriteMmio8(base, offset, (CARD8)(val))
1270# define MMIO_ONB8(base, offset, val) \
1271 xf86WriteMmioNB8(base, offset, (CARD8)(val))
1272
1273# if defined(PPC_MMIO_IS_BE) /* No byteswapping */
1274# define MMIO_IN16(base, offset) xf86ReadMmio16Be(base, offset)
1275# define MMIO_IN32(base, offset) xf86ReadMmio32Be(base, offset)
1276# define MMIO_OUT16(base, offset, val) \
1277 xf86WriteMmio16Be(base, offset, (CARD16)(val))
1278# define MMIO_OUT32(base, offset, val) \
1279 xf86WriteMmio32Be(base, offset, (CARD32)(val))
1280# define MMIO_ONB16(base, offset, val) \
1281 xf86WriteMmioNB16Be(base, offset, (CARD16)(val))
1282# define MMIO_ONB32(base, offset, val) \
1283 xf86WriteMmioNB32Be(base, offset, (CARD32)(val))
1284# else /* byteswapping is the default */
1285# define MMIO_IN16(base, offset) xf86ReadMmio16Le(base, offset)
1286# define MMIO_IN32(base, offset) xf86ReadMmio32Le(base, offset)
1287# define MMIO_OUT16(base, offset, val) \
1288 xf86WriteMmio16Le(base, offset, (CARD16)(val))
1289# define MMIO_OUT32(base, offset, val) \
1290 xf86WriteMmio32Le(base, offset, (CARD32)(val))
1291# define MMIO_ONB16(base, offset, val) \
1292 xf86WriteMmioNB16Le(base, offset, (CARD16)(val))
1293# define MMIO_ONB32(base, offset, val) \
1294 xf86WriteMmioNB32Le(base, offset, (CARD32)(val))
1295# endif
1296
1297# define MMIO_MOVE32(base, offset, val) \
1298 xf86WriteMmio32Be(base, offset, (CARD32)(val))
1299
1300# elif defined(__sparc__) || defined(sparc) || defined(__sparc)
1301 /*
1302 * Like powerpc, we provide byteswapping and no byteswapping functions
1303 * here with byteswapping as default, drivers that don't need byteswapping
1304 * should define SPARC_MMIO_IS_BE (perhaps create a generic macro so that we
1305 * do not need to use PPC_MMIO_IS_BE and the sparc one in all the same places
1306 * of drivers?).
1307 */
1308# define MMIO_IN8(base, offset) xf86ReadMmio8(base, offset)
1309# define MMIO_OUT8(base, offset, val) \
1310 xf86WriteMmio8(base, offset, (CARD8)(val))
1311# define MMIO_ONB8(base, offset, val) \
1312 xf86WriteMmio8NB(base, offset, (CARD8)(val))
1313
1314# if defined(SPARC_MMIO_IS_BE) /* No byteswapping */
1315# define MMIO_IN16(base, offset) xf86ReadMmio16Be(base, offset)
1316# define MMIO_IN32(base, offset) xf86ReadMmio32Be(base, offset)
1317# define MMIO_OUT16(base, offset, val) \
1318 xf86WriteMmio16Be(base, offset, (CARD16)(val))
1319# define MMIO_OUT32(base, offset, val) \
1320 xf86WriteMmio32Be(base, offset, (CARD32)(val))
1321# define MMIO_ONB16(base, offset, val) \
1322 xf86WriteMmio16BeNB(base, offset, (CARD16)(val))
1323# define MMIO_ONB32(base, offset, val) \
1324 xf86WriteMmio32BeNB(base, offset, (CARD32)(val))
1325# else /* byteswapping is the default */
1326# define MMIO_IN16(base, offset) xf86ReadMmio16Le(base, offset)
1327# define MMIO_IN32(base, offset) xf86ReadMmio32Le(base, offset)
1328# define MMIO_OUT16(base, offset, val) \
1329 xf86WriteMmio16Le(base, offset, (CARD16)(val))
1330# define MMIO_OUT32(base, offset, val) \
1331 xf86WriteMmio32Le(base, offset, (CARD32)(val))
1332# define MMIO_ONB16(base, offset, val) \
1333 xf86WriteMmio16LeNB(base, offset, (CARD16)(val))
1334# define MMIO_ONB32(base, offset, val) \
1335 xf86WriteMmio32LeNB(base, offset, (CARD32)(val))
1336# endif
1337
1338# define MMIO_MOVE32(base, offset, val) \
1339 xf86WriteMmio32Be(base, offset, (CARD32)(val))
1340
1341# else /* !__alpha__ && !__powerpc__ && !__sparc__ */
1342
1343# define MMIO_IN8(base, offset) \
1344 *(volatile CARD8 *)(((CARD8*)(base)) + (offset))
1345# define MMIO_IN16(base, offset) \
1346 *(volatile CARD16 *)(void *)(((CARD8*)(base)) + (offset))
1347# define MMIO_IN32(base, offset) \
1348 *(volatile CARD32 *)(void *)(((CARD8*)(base)) + (offset))
1349# define MMIO_OUT8(base, offset, val) \
1350 *(volatile CARD8 *)(((CARD8*)(base)) + (offset)) = (val)
1351# define MMIO_OUT16(base, offset, val) \
1352 *(volatile CARD16 *)(void *)(((CARD8*)(base)) + (offset)) = (val)
1353# define MMIO_OUT32(base, offset, val) \
1354 *(volatile CARD32 *)(void *)(((CARD8*)(base)) + (offset)) = (val)
1355# define MMIO_ONB8(base, offset, val) MMIO_OUT8(base, offset, val)
1356# define MMIO_ONB16(base, offset, val) MMIO_OUT16(base, offset, val)
1357# define MMIO_ONB32(base, offset, val) MMIO_OUT32(base, offset, val)
1358
1359# define MMIO_MOVE32(base, offset, val) MMIO_OUT32(base, offset, val)
1360
1361# endif /* __alpha__ */
1362
1363/*
1364 * With Intel, the version in os-support/misc/SlowBcopy.s is used.
1365 * This avoids port I/O during the copy (which causes problems with
1366 * some hardware).
1367 */
1368# ifdef __alpha__
1369# define slowbcopy_tobus(src,dst,count) xf86SlowBCopyToBus(src,dst,count)
1370# define slowbcopy_frombus(src,dst,count) xf86SlowBCopyFromBus(src,dst,count)
1371# else /* __alpha__ */
1372# define slowbcopy_tobus(src,dst,count) xf86SlowBcopy(src,dst,count)
1373# define slowbcopy_frombus(src,dst,count) xf86SlowBcopy(src,dst,count)
1374# endif /* __alpha__ */
1375
1376#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