annotate vidix/sysdep/AsmMacros_arm32.h @ 24642:bfcf6b2e62d6

Enable SSE on MinGW, many builds out there seem to use it without ill effect.
author diego
date Sat, 29 Sep 2007 19:48:45 +0000
parents 88bed2131f19
children 9c4ad35fabc5
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
4164
2e3262002acb Improved readability and new stuffs
nick
parents:
diff changeset
1 /*
2e3262002acb Improved readability and new stuffs
nick
parents:
diff changeset
2 This file is based on:
2e3262002acb Improved readability and new stuffs
nick
parents:
diff changeset
3 $XFree86: xc/programs/Xserver/hw/xfree86/drivers/chips/util/AsmMacros.h,v 1.1 2001/11/16 21:13:34 tsi Exp $
2e3262002acb Improved readability and new stuffs
nick
parents:
diff changeset
4 Modified for readability by Nick Kurshev
2e3262002acb Improved readability and new stuffs
nick
parents:
diff changeset
5 */
2e3262002acb Improved readability and new stuffs
nick
parents:
diff changeset
6
23934
88bed2131f19 Identifiers starting with underscores are reserved.
diego
parents: 22900
diff changeset
7 #ifndef ASMMACROS_ARM32_H
88bed2131f19 Identifiers starting with underscores are reserved.
diego
parents: 22900
diff changeset
8 #define ASMMACROS_ARM32_H
4164
2e3262002acb Improved readability and new stuffs
nick
parents:
diff changeset
9 unsigned int IOPortBase; /* Memory mapped I/O port area */
2e3262002acb Improved readability and new stuffs
nick
parents:
diff changeset
10
2e3262002acb Improved readability and new stuffs
nick
parents:
diff changeset
11 static __inline__ void outb(short port,char val)
2e3262002acb Improved readability and new stuffs
nick
parents:
diff changeset
12 {
2e3262002acb Improved readability and new stuffs
nick
parents:
diff changeset
13 if ((unsigned short)port >= 0x400) return;
2e3262002acb Improved readability and new stuffs
nick
parents:
diff changeset
14 *(volatile unsigned char*)(((unsigned short)(port))+IOPortBase) = val;
2e3262002acb Improved readability and new stuffs
nick
parents:
diff changeset
15 }
2e3262002acb Improved readability and new stuffs
nick
parents:
diff changeset
16
2e3262002acb Improved readability and new stuffs
nick
parents:
diff changeset
17 static __inline__ void outw(short port,short val)
2e3262002acb Improved readability and new stuffs
nick
parents:
diff changeset
18 {
2e3262002acb Improved readability and new stuffs
nick
parents:
diff changeset
19 if ((unsigned short)port >= 0x400) return;
2e3262002acb Improved readability and new stuffs
nick
parents:
diff changeset
20 *(volatile unsigned short*)(((unsigned short)(port))+IOPortBase) = val;
2e3262002acb Improved readability and new stuffs
nick
parents:
diff changeset
21 }
2e3262002acb Improved readability and new stuffs
nick
parents:
diff changeset
22
2e3262002acb Improved readability and new stuffs
nick
parents:
diff changeset
23 static __inline__ void outl(short port,int val)
2e3262002acb Improved readability and new stuffs
nick
parents:
diff changeset
24 {
2e3262002acb Improved readability and new stuffs
nick
parents:
diff changeset
25 if ((unsigned short)port >= 0x400) return;
2e3262002acb Improved readability and new stuffs
nick
parents:
diff changeset
26 *(volatile unsigned long*)(((unsigned short)(port))+IOPortBase) = val;
2e3262002acb Improved readability and new stuffs
nick
parents:
diff changeset
27 }
2e3262002acb Improved readability and new stuffs
nick
parents:
diff changeset
28
2e3262002acb Improved readability and new stuffs
nick
parents:
diff changeset
29 static __inline__ unsigned int inb(short port)
2e3262002acb Improved readability and new stuffs
nick
parents:
diff changeset
30 {
2e3262002acb Improved readability and new stuffs
nick
parents:
diff changeset
31 if ((unsigned short)port >= 0x400) return((unsigned int)-1);
2e3262002acb Improved readability and new stuffs
nick
parents:
diff changeset
32 return(*(volatile unsigned char*)(((unsigned short)(port))+IOPortBase));
2e3262002acb Improved readability and new stuffs
nick
parents:
diff changeset
33 }
2e3262002acb Improved readability and new stuffs
nick
parents:
diff changeset
34
2e3262002acb Improved readability and new stuffs
nick
parents:
diff changeset
35 static __inline__ unsigned int inw(short port)
2e3262002acb Improved readability and new stuffs
nick
parents:
diff changeset
36 {
2e3262002acb Improved readability and new stuffs
nick
parents:
diff changeset
37 if ((unsigned short)port >= 0x400) return((unsigned int)-1);
2e3262002acb Improved readability and new stuffs
nick
parents:
diff changeset
38 return(*(volatile unsigned short*)(((unsigned short)(port))+IOPortBase));
2e3262002acb Improved readability and new stuffs
nick
parents:
diff changeset
39 }
2e3262002acb Improved readability and new stuffs
nick
parents:
diff changeset
40
2e3262002acb Improved readability and new stuffs
nick
parents:
diff changeset
41 static __inline__ unsigned int inl(short port)
2e3262002acb Improved readability and new stuffs
nick
parents:
diff changeset
42 {
2e3262002acb Improved readability and new stuffs
nick
parents:
diff changeset
43 if ((unsigned short)port >= 0x400) return((unsigned int)-1);
2e3262002acb Improved readability and new stuffs
nick
parents:
diff changeset
44 return(*(volatile unsigned long*)(((unsigned short)(port))+IOPortBase));
2e3262002acb Improved readability and new stuffs
nick
parents:
diff changeset
45 }
2e3262002acb Improved readability and new stuffs
nick
parents:
diff changeset
46
2e3262002acb Improved readability and new stuffs
nick
parents:
diff changeset
47 #define intr_disable()
2e3262002acb Improved readability and new stuffs
nick
parents:
diff changeset
48 #define intr_enable()
2e3262002acb Improved readability and new stuffs
nick
parents:
diff changeset
49
23934
88bed2131f19 Identifiers starting with underscores are reserved.
diego
parents: 22900
diff changeset
50 #endif /* ASMMACROS_ARM32_H */