1.1 --- a/src/sh4/ia64abi.h Mon Dec 15 10:44:56 2008 +0000
1.2 +++ b/src/sh4/ia64abi.h Mon Dec 22 09:51:11 2008 +0000
1.5 #define load_ptr( reg, ptr ) load_imm64( reg, (uint64_t)ptr );
1.7 +static inline decode_address( int addr_reg )
1.9 + MOV_r32_r32( addr_reg, R_ECX );
1.10 + SHR_imm8_r32( 12, R_ECX );
1.11 + load_ptr( R_EDI, sh4_address_space );
1.12 + REXW(); OP(0x8B); OP(0x0C); OP(0xCF); // mov.q [%rdi + %rcx*8], %rcx
1.16 * Note: clobbers EAX to make the indirect call - this isn't usually
1.17 * a problem since the callee will usually clobber it anyway.
1.22 +static inline void call_func1_r32disp8( int preg, uint32_t disp8, int arg1 )
1.24 + REXW(); MOV_r32_r32(arg1, R_EDI);
1.25 + CALL_r32disp8(preg, disp8);
1.28 #define CALL_FUNC2_SIZE 16
1.29 static inline void call_func2( void *ptr, int arg1, int arg2 )
1.35 +static inline void call_func2_r32disp8( int preg, uint32_t disp8, int arg1, int arg2 )
1.37 + REXW(); MOV_r32_r32(arg1, R_EDI);
1.38 + REXW(); MOV_r32_r32(arg2, R_ESI);
1.39 + CALL_r32disp8(preg, disp8);
1.43 #define MEM_WRITE_DOUBLE_SIZE 35
1.45 * Write a double (64-bit) value into memory, with the first word in arg2a, and