1 /* 2 Copyright (C) 1998, 2002 by Red Hat Inc. All rights reserved. 3 4 Permission to use, copy, modify, and distribute this 5 software is freely granted, provided that this notice 6 is preserved. 7 */ 8 /* This file was based on the modified setjmp.S performed by 9 * Joel Sherill (joel@OARcorp.com) which specified the use 10 * of the __USER_LABEL_PREFIX__ and __REGISTER_PREFIX__ macros. 11 ** 12 ** This file is distributed WITHOUT ANY WARRANTY; without even the implied 13 ** warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. 14 */ 15 16 /* These are predefined by new versions of GNU cpp. */ 17 18 #ifndef __USER_LABEL_PREFIX__ 19 #define __USER_LABEL_PREFIX__ _ 20 #endif 21 22 #define __REG_PREFIX__ % 23 24 /* ANSI concatenation macros. */ 25 26 #define CONCAT1(a, b) CONCAT2(a, b) 27 #define CONCAT2(a, b) a##b 28 29 /* Use the right prefix for global labels. */ 30 31 #define SYM(x) CONCAT1(__USER_LABEL_PREFIX__, x) 32 33 /* Use the right prefix for registers. */ 34 35 #define REG(x) CONCAT1(__REG_PREFIX__, x) 36 37 #define eax REG(eax) 38 #define ebx REG(ebx) 39 #define ecx REG(ecx) 40 #define edx REG(edx) 41 #define esi REG(esi) 42 #define edi REG(edi) 43 #define ebp REG(ebp) 44 #define esp REG(esp) 45 46 #define st0 REG(st) 47 #define st1 REG(st(1)) 48 #define st2 REG(st(2)) 49 #define st3 REG(st(3)) 50 #define st4 REG(st(4)) 51 #define st5 REG(st(5)) 52 #define st6 REG(st(6)) 53 #define st7 REG(st(7)) 54 55 #define ax REG(ax) 56 #define bx REG(bx) 57 #define cx REG(cx) 58 #define dx REG(dx) 59 60 #define ah REG(ah) 61 #define bh REG(bh) 62 #define ch REG(ch) 63 #define dh REG(dh) 64 65 #define al REG(al) 66 #define bl REG(bl) 67 #define cl REG(cl) 68 #define dl REG(dl) 69 70 #define mm1 REG(mm1) 71 #define mm2 REG(mm2) 72 #define mm3 REG(mm3) 73 #define mm4 REG(mm4) 74 #define mm5 REG(mm5) 75 #define mm6 REG(mm6) 76 #define mm7 REG(mm7) 77 78 #ifdef _I386MACH_NEED_SOTYPE_FUNCTION 79 #define SOTYPE_FUNCTION(sym) .type SYM(sym),@function 80 #else 81 #define SOTYPE_FUNCTION(sym) 82 #endif 83 84 #ifndef _I386MACH_DISABLE_HW_INTERRUPTS 85 #define __CLI 86 #define __STI 87 #else 88 #define __CLI cli 89 #define __STI sti 90 #endif 91