Last change
on this file since 444 was
444,
checked in by satin@…, 6 years ago
|
add newlib,libalmos-mkh, restructure shared_syscalls.h and mini-libc
|
File size:
1.7 KB
|
Rev | Line | |
---|
[444] | 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 | */ |
---|
| 8 | |
---|
| 9 | /* These are predefined by new versions of GNU cpp. */ |
---|
| 10 | |
---|
| 11 | #ifndef __USER_LABEL_PREFIX__ |
---|
| 12 | #define __USER_LABEL_PREFIX__ _ |
---|
| 13 | #endif |
---|
| 14 | |
---|
| 15 | #define __REG_PREFIX__ % |
---|
| 16 | |
---|
| 17 | /* ANSI concatenation macros. */ |
---|
| 18 | |
---|
| 19 | #define CONCAT1(a, b) CONCAT2(a, b) |
---|
| 20 | #define CONCAT2(a, b) a##b |
---|
| 21 | |
---|
| 22 | /* Use the right prefix for global labels. */ |
---|
| 23 | |
---|
| 24 | #define SYM(x) CONCAT1(__USER_LABEL_PREFIX__, x) |
---|
| 25 | |
---|
| 26 | /* Use the right prefix for registers. */ |
---|
| 27 | |
---|
| 28 | #define REG(x) CONCAT1(__REG_PREFIX__, x) |
---|
| 29 | |
---|
| 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) |
---|
| 38 | |
---|
| 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)) |
---|
| 47 | |
---|
| 48 | #define ax REG(ax) |
---|
| 49 | #define bx REG(bx) |
---|
| 50 | #define cx REG(cx) |
---|
| 51 | #define dx REG(dx) |
---|
| 52 | |
---|
| 53 | #define ah REG(ah) |
---|
| 54 | #define bh REG(bh) |
---|
| 55 | #define ch REG(ch) |
---|
| 56 | #define dh REG(dh) |
---|
| 57 | |
---|
| 58 | #define al REG(al) |
---|
| 59 | #define bl REG(bl) |
---|
| 60 | #define cl REG(cl) |
---|
| 61 | #define dl REG(dl) |
---|
| 62 | |
---|
| 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) |
---|
| 70 | |
---|
| 71 | #ifdef _I386MACH_NEED_SOTYPE_FUNCTION |
---|
| 72 | #define SOTYPE_FUNCTION(sym) .type SYM(sym),@function |
---|
| 73 | #else |
---|
| 74 | #define SOTYPE_FUNCTION(sym) |
---|
| 75 | #endif |
---|
| 76 | |
---|
| 77 | #ifndef _I386MACH_DISABLE_HW_INTERRUPTS |
---|
| 78 | #define __CLI |
---|
| 79 | #define __STI |
---|
| 80 | #else |
---|
| 81 | #define __CLI cli |
---|
| 82 | #define __STI sti |
---|
| 83 | #endif |
---|
Note: See
TracBrowser
for help on using the repository browser.