Alien-LibJIT

 view release on metacpan or  search on metacpan

libjit/attic/jit-rules-alpha.h  view on Meta::CPAN

	{  "ft5", 15, -1, JIT_REG_ALPHA_FLOAT | JIT_REG_CALL_USED}, \
	{  "fa0", 16, -1, JIT_REG_FIXED}, \
	{  "fa1", 17, -1, JIT_REG_FIXED}, \
	{  "fa2", 18, -1, JIT_REG_FIXED}, \
	{  "fa3", 19, -1, JIT_REG_FIXED}, \
	{  "fa4", 20, -1, JIT_REG_FIXED}, \
	{  "fa5", 21, -1, JIT_REG_FIXED}, \
	{  "fe0", 22, -1, JIT_REG_FIXED}, \
	{  "fe1", 23, -1, JIT_REG_FIXED}, \
	{  "fe2", 24, -1, JIT_REG_FIXED}, \
	{  "fe3", 25, -1, JIT_REG_FIXED}, \
	{  "fe4", 26, -1, JIT_REG_FIXED}, \
	{  "fe5", 27, -1, JIT_REG_FIXED}, \
	{  "fe6", 28, -1, JIT_REG_FIXED}, \
	{  "fe7", 29, -1, JIT_REG_FIXED}, \
	{  "fe8", 30, -1, JIT_REG_FIXED}, \
	{"fzero", 31, -1, JIT_REG_FIXED},

/* 32 floating-point registers + 32 integer registers */
#define JIT_NUM_REGS			64

/*
 * The number of registers that are used for global register 
 * allocation. Set to zero if global register allocation should not be 
 * used.
 */
#define JIT_NUM_GLOBAL_REGS		14

/*
 * Define to 1 if we should always load values into registers
 * before operating on them.  i.e. the CPU does not have reg-mem
 * and mem-reg addressing modes.
 *
 * The maximum number of operands for an alpha instruction is 3,
 * all of which must be registers.
 */
#define JIT_ALWAYS_REG_REG		1

/*
 * The maximum number of bytes to allocate for the prolog.
 * This may be shortened once we know the true prolog size.
 */
#define JIT_PROLOG_SIZE			(7 /* instructions */ * 4 /* bytes per instruction */)

/*
 * Preferred alignment for the start of functions.
 *
 * Use the alignment that gcc uses. See gcc/config/alpha/alpha.h
 */
#define JIT_FUNCTION_ALIGNMENT		32

/*
 * Define this to 1 if the platform allows reads and writes on
 * any byte boundary.  Define to 0 if only properly-aligned
 * memory accesses are allowed.
 *
 * All memory access on alpha must be naturally aligned. There are 
 * unaligned load and store instructions to operate on arbitrary byte 
 * boundaries. However sometimes compilers don't always spot where 
 * to use them due to programming tricks with pointers. The kernel will 
 * do the fetch transparently if the access is unaligned and not done 
 * with the proper instructions. Kernel assisted unaligned accesses 
 * don't change the behavior of the program. 
 *
 * TODO: benchmark this to determine what is more costly... setting
 * up everything to be aligned or dealing with the unaligned accesses.
 */
#define JIT_ALIGN_OVERRIDES		1

/*
 * The jit_extra_gen_state macro can be supplied to add extra fields to 
 * the struct jit_gencode type in jit-rules.h, for extra CPU-specific 
 * code generation state information.
 */
#define jit_extra_gen_state		/* empty */;

/*
 * The jit_extra_gen_init macro initializes this extra information, and 
 * the jit_extra_gen_cleanup macro cleans it up when code generation is 
 * complete.
 */
#define jit_extra_gen_init(gen)		do { ; } while (0)
#define jit_extra_gen_cleanup(gen)	do { ; } while (0)

/*
 * Parameter passing rules.
 */
#define JIT_CDECL_WORD_REG_PARAMS	{16,17,18,19,20,21,-1}
#define JIT_MAX_WORD_REG_PARAMS		6
#define JIT_INITIAL_STACK_OFFSET	(14*8)
#define JIT_INITIAL_FRAME_SIZE 		(sizeof(void*))

#ifdef	__cplusplus
};
#endif

#endif	/* _JIT_RULES_ALPHA_H */



( run in 0.666 second using v1.01-cache-2.11-cpan-cdf2f3d4e48 )