aboutsummaryrefslogtreecommitdiffstats
path: root/src/arch/i386/include
diff options
context:
space:
mode:
authorMichael Brown <mcb30@etherboot.org>2008-11-18 16:18:32 -0800
committerMichael Brown <mcb30@etherboot.org>2008-11-19 19:12:53 +0000
commitdc60c2414658f27b88f212bba8a36180ab8657fb (patch)
treed4ad6d883d3fe6d4f7dfb9f75786f2815537d7dd /src/arch/i386/include
parent446b6d5fddb95901e8874475597c75ed3cacfdde (diff)
downloadipxe-dc60c2414658f27b88f212bba8a36180ab8657fb.tar.gz
[i386] Rename __cdecl to __asmcall
__cdecl is a misleading name, since it currently encapsulates both cdecl and regparm(0) attributes. Rename to __asmcall.
Diffstat (limited to 'src/arch/i386/include')
-rw-r--r--src/arch/i386/include/bits/compiler.h11
-rw-r--r--src/arch/i386/include/pxe_call.h2
-rw-r--r--src/arch/i386/include/setjmp.h4
3 files changed, 14 insertions, 3 deletions
diff --git a/src/arch/i386/include/bits/compiler.h b/src/arch/i386/include/bits/compiler.h
new file mode 100644
index 00000000..af796069
--- /dev/null
+++ b/src/arch/i386/include/bits/compiler.h
@@ -0,0 +1,11 @@
+#ifndef _BITS_COMPILER_H
+#define _BITS_COMPILER_H
+
+#ifndef ASSEMBLY
+
+/** Declare a function with standard calling conventions */
+#define __asmcall __attribute__ (( cdecl, regparm(0) ))
+
+#endif /* ASSEMBLY */
+
+#endif /* _BITS_COMPILER_H */
diff --git a/src/arch/i386/include/pxe_call.h b/src/arch/i386/include/pxe_call.h
index 7a38d314..2f3ea15a 100644
--- a/src/arch/i386/include/pxe_call.h
+++ b/src/arch/i386/include/pxe_call.h
@@ -30,6 +30,6 @@ extern void pxe_hook_int1a ( void );
extern int pxe_unhook_int1a ( void );
extern void pxe_init_structures ( void );
extern int pxe_start_nbp ( void );
-extern __cdecl void pxe_api_call ( struct i386_all_regs *ix86 );
+extern __asmcall void pxe_api_call ( struct i386_all_regs *ix86 );
#endif /* _PXE_CALL_H */
diff --git a/src/arch/i386/include/setjmp.h b/src/arch/i386/include/setjmp.h
index bb0a100d..60e4b120 100644
--- a/src/arch/i386/include/setjmp.h
+++ b/src/arch/i386/include/setjmp.h
@@ -6,7 +6,7 @@
#define JBLEN 6
typedef unsigned long jmp_buf[JBLEN];
-extern int __cdecl setjmp (jmp_buf env);
-extern void __cdecl longjmp (jmp_buf env, int val);
+extern int __asmcall setjmp (jmp_buf env);
+extern void __asmcall longjmp (jmp_buf env, int val);
#endif /* ETHERBOOT_SETJMP_H */