/* Copyright (c) 2001, Stanford University
* All rights reserved.
*
* See the file LICENSE.txt for information on redistributing this software.
*/
#ifndef CR_UNPACK_H
#define CR_UNPACK_H
#include "cr_compiler.h"
#include "cr_spu.h"
#include "cr_protocol.h"
#include "cr_mem.h"
#include "cr_opcodes.h"
#ifdef __cplusplus
extern "C" {
#endif
extern SPUDispatchTable cr_unpackDispatch;
/*extern DLLDATA(const unsigned char *) cr_unpackData;*/
extern DECLEXPORT(const unsigned char *) cr_unpackData;
DECLEXPORT(void) crUnpack( const void *data, const void *opcodes, unsigned int num_opcodes, SPUDispatchTable *table );
DECLEXPORT(void) crUnpackPush(void);
DECLEXPORT(void) crUnpackPop(void);
typedef enum
{
DECLEXPORT(CR_UNPACK_BUFFER_TYPE) crUnpackGetBufferType(const void *opcodes, unsigned int num_opcodes);
extern CRNetworkPointer * return_ptr;
extern CRNetworkPointer * writeback_ptr;
#define CR_UNALIGNED_ACCESS_OKAY
#else
#endif
#ifdef CR_UNALIGNED_ACCESS_OKAY
#else
#endif
( cr_unpackData + (offset) )
/* XXX make this const */
cr_unpackData += (delta)
#define INCR_DATA_PTR_NO_ARGS() \
INCR_DATA_PTR( 4 )
#define INCR_VAR_PTR() \
INCR_DATA_PTR( *((int *) cr_unpackData ) )
} while (0);
} while (0);
#ifdef __cplusplus
}
#endif
#endif /* CR_UNPACK_H */