1
/* Copyright (C) 1991, 1992, 1993, 1994, 1995, 1996, 1997, 2007
2
Free Software Foundation, Inc.
4
This file is part of the GNU C Library.
6
The GNU C Library is free software; you can redistribute it and/or
7
modify it under the terms of the GNU Lesser General Public
8
License as published by the Free Software Foundation; either
9
version 2.1 of the License, or (at your option) any later version.
11
The GNU C Library is distributed in the hope that it will be useful,
12
but WITHOUT ANY WARRANTY; without even the implied warranty of
13
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
14
Lesser General Public License for more details.
16
You should have received a copy of the GNU Lesser General Public
17
License along with the GNU C Library; if not, see
18
<http://www.gnu.org/licenses/>. */
20
#ifndef _MACH_I386_SYSDEP_H
21
#define _MACH_I386_SYSDEP_H 1
23
/* Defines RTLD_PRIVATE_ERRNO and USE_DL_SYSINFO. */
24
#include <dl-sysdep.h>
27
#define LOSE asm volatile ("hlt")
29
#define SNARF_ARGS(entry_sp, argc, argv, envp) \
33
argc = (int) *entry_sp; \
34
argv = (char **) (entry_sp + 1); \
36
while (*p++ != NULL) \
38
if (p >= (char **) argv[0]) \
43
#define CALL_WITH_SP(fn, info, sp) \
45
void **ptr = (void **) sp; \
46
*--(__typeof (info) *) ptr = info; \
49
asm volatile ("movl %0, %%esp; call %1" : : \
50
"g" (ptr), "m" (*(long int *) (fn)) : "%esp"); \
53
#define RETURN_TO(sp, pc, retval) \
54
asm volatile ("movl %0, %%esp; jmp %*%1 # %2" \
55
: : "g" (sp), "r" (pc), "a" (retval))
58
#define STACK_GROWTH_DOWN
60
/* Get the machine-independent Mach definitions. */
61
#include <sysdeps/mach/sysdep.h>
64
/* This should be rearranged, but at the moment this file provides
65
the most useful definitions for assembler syntax details. */
68
#include <sysdeps/unix/i386/sysdep.h>
70
#endif /* mach/i386/sysdep.h */