Search
lxdream.org :: lxdream/src/sh4/ia64abi.h :: diff
lxdream 0.9.1
released Jun 29
Download Now
filename src/sh4/ia64abi.h
changeset 939:6f2302afeb89
prev930:07e5b11419db
next944:a4e31314bee1
author nkeynes
date Sat Jan 03 08:55:15 2009 +0000 (15 years ago)
branchlxdream-mem
permissions -rw-r--r--
last change Implement CORE_EXIT_EXCEPTION for use when direct frame messing about doesn't work
file annotate diff log raw
1.1 --- a/src/sh4/ia64abi.h Mon Dec 22 09:51:11 2008 +0000
1.2 +++ b/src/sh4/ia64abi.h Sat Jan 03 08:55:15 2009 +0000
1.3 @@ -64,6 +64,13 @@
1.4 CALL_r32disp8(preg, disp8);
1.5 }
1.6
1.7 +static inline void call_func1_r32disp8_exc( int preg, uint32_t disp8, int arg1, int pc )
1.8 +{
1.9 + REXW(); MOV_r32_r32(arg1, R_EDI);
1.10 + load_exc_backpatch(R_ESI);
1.11 + CALL_r32disp8(preg, disp8);
1.12 +}
1.13 +
1.14 #define CALL_FUNC2_SIZE 16
1.15 static inline void call_func2( void *ptr, int arg1, int arg2 )
1.16 {
1.17 @@ -79,41 +86,14 @@
1.18 CALL_r32disp8(preg, disp8);
1.19 }
1.20
1.21 -
1.22 -#define MEM_WRITE_DOUBLE_SIZE 35
1.23 -/**
1.24 - * Write a double (64-bit) value into memory, with the first word in arg2a, and
1.25 - * the second in arg2b
1.26 - */
1.27 -static inline void MEM_WRITE_DOUBLE( int addr, int arg2a, int arg2b )
1.28 +static inline void call_func2_r32disp8_exc( int preg, uint32_t disp8, int arg1, int arg2, int pc )
1.29 {
1.30 - PUSH_r32(arg2b);
1.31 - PUSH_r32(addr);
1.32 - call_func2(sh4_write_long, addr, arg2a);
1.33 - POP_r32(R_EDI);
1.34 - POP_r32(R_ESI);
1.35 - ADD_imm8s_r32(4, R_EDI);
1.36 - call_func0(sh4_write_long);
1.37 + REXW(); MOV_r32_r32(arg1, R_EDI);
1.38 + REXW(); MOV_r32_r32(arg2, R_ESI);
1.39 + load_exc_backpatch(R_EDX);
1.40 + CALL_r32disp8(preg, disp8);
1.41 }
1.42
1.43 -#define MEM_READ_DOUBLE_SIZE 43
1.44 -/**
1.45 - * Read a double (64-bit) value from memory, writing the first word into arg2a
1.46 - * and the second into arg2b. The addr must not be in EAX
1.47 - */
1.48 -static inline void MEM_READ_DOUBLE( int addr, int arg2a, int arg2b )
1.49 -{
1.50 - REXW(); SUB_imm8s_r32( 8, R_ESP );
1.51 - PUSH_r32(addr);
1.52 - call_func1(sh4_read_long, addr);
1.53 - POP_r32(R_EDI);
1.54 - PUSH_r32(R_EAX);
1.55 - ADD_imm8s_r32(4, R_EDI);
1.56 - call_func0(sh4_read_long);
1.57 - MOV_r32_r32(R_EAX, arg2b);
1.58 - POP_r32(arg2a);
1.59 - REXW(); ADD_imm8s_r32( 8, R_ESP );
1.60 -}
1.61
1.62
1.63 /**
.