Subversion Repositories HelenOS-historic

Compare Revisions

Ignore whitespace Rev 425 → Rev 426

/SPARTAN/trunk/arch/mips32/include/arg.h
29,8 → 29,6
#ifndef __mips32_ARG_H__
#define __mips32_ARG_H__
 
//#include <stackarg.h>
 
#include <arch/types.h>
 
typedef struct va_list {
39,13 → 37,13
} va_list;
 
#define va_start(ap, lst) \
(ap).pos = sizeof(lst); \
(ap).pos = sizeof(lst); \
(ap).last = (__u8 *) &(lst)
 
/**
* va_arg macro for MIPS32 - problem is that 64 bit values must be aligned on an 8-byte boundary (32bit values not)
* To satisfy this, paddings must be sometimes inserted.
*/
* va_arg macro for MIPS32 - problem is that 64 bit values must be aligned on an 8-byte boundary (32bit values not)
* To satisfy this, paddings must be sometimes inserted.
*/
#define va_arg(ap, type) \
(*((type *)((ap).last + ((ap).pos += sizeof(type) + ((sizeof(type)==8)&&(((ap).pos)&(4))?4:0)) - sizeof(type))))