phunix/include/minix/compiler-ack.h
Lorenzo Cavallaro a16308efdb cdecl calling convention expects the callee to pop the hidden pointer on
struct return. For example, GCC and LLVM comply with this (tested on IA32).

ACK doesn't seem to follow this convention and expects the caller to clean up
the stack. Compiling hand-written ACK-compliant assembly code (returning a 
struct) with GCC or LLVM used to break things (4-bytes misaligned stack).

The patch fixes this problem.
2010-03-24 17:25:17 +00:00

10 lines
254 B
C

/* Definitions for ACK-specific features. */
#ifndef _MINIX_COMPILER_ACK_H
#define _MINIX_COMPILER_ACK_H
/* ACK expects the caller to pop the hidden pointer on struct return. */
#define BYTES_TO_POP_ON_STRUCT_RETURN
#endif /* _MINIX_COMPILER_ACK_H */