fixes for host gcc 4.6.1
[zpugcc/jano.git] / toolchain / gcc / newlib / libc / machine / i386 / i386mach.h
blob23c32190d21664a2ac7a6c611bea7a94c067a6cc
1 /* This file was based on the modified setjmp.S performed by
2 * Joel Sherill (joel@OARcorp.com) which specified the use
3 * of the __USER_LABEL_PREFIX__ and __REGISTER_PREFIX__ macros.
4 **
5 ** This file is distributed WITHOUT ANY WARRANTY; without even the implied
6 ** warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
7 */
9 /* These are predefined by new versions of GNU cpp. */
11 #ifndef __USER_LABEL_PREFIX__
12 #define __USER_LABEL_PREFIX__ _
13 #endif
15 #define __REG_PREFIX__ %
17 /* ANSI concatenation macros. */
19 #define CONCAT1(a, b) CONCAT2(a, b)
20 #define CONCAT2(a, b) a##b
22 /* Use the right prefix for global labels. */
24 #define SYM(x) CONCAT1(__USER_LABEL_PREFIX__, x)
26 /* Use the right prefix for registers. */
28 #define REG(x) CONCAT1(__REG_PREFIX__, x)
30 #define eax REG(eax)
31 #define ebx REG(ebx)
32 #define ecx REG(ecx)
33 #define edx REG(edx)
34 #define esi REG(esi)
35 #define edi REG(edi)
36 #define ebp REG(ebp)
37 #define esp REG(esp)
39 #define st0 REG(st)
40 #define st1 REG(st(1))
41 #define st2 REG(st(2))
42 #define st3 REG(st(3))
43 #define st4 REG(st(4))
44 #define st5 REG(st(5))
45 #define st6 REG(st(6))
46 #define st7 REG(st(7))
48 #define ax REG(ax)
49 #define bx REG(bx)
50 #define cx REG(cx)
51 #define dx REG(dx)
53 #define ah REG(ah)
54 #define bh REG(bh)
55 #define ch REG(ch)
56 #define dh REG(dh)
58 #define al REG(al)
59 #define bl REG(bl)
60 #define cl REG(cl)
61 #define dl REG(dl)
63 #define mm1 REG(mm1)
64 #define mm2 REG(mm2)
65 #define mm3 REG(mm3)
66 #define mm4 REG(mm4)
67 #define mm5 REG(mm5)
68 #define mm6 REG(mm6)
69 #define mm7 REG(mm7)
71 #ifdef _I386MACH_NEED_SOTYPE_FUNCTION
72 #define SOTYPE_FUNCTION(sym) .type SYM(sym),@function
73 #else
74 #define SOTYPE_FUNCTION(sym)
75 #endif
77 #ifdef _I386MACH_ALLOW_HW_INTERRUPTS
78 #define __CLI
79 #define __STI
80 #else
81 #define __CLI cli
82 #define __STI sti
83 #endif