filename | src/sh4/ia64abi.h |
changeset | 939:6f2302afeb89 |
prev | 930:07e5b11419db |
next | 944:a4e31314bee1 |
author | nkeynes |
date | Sat Jan 03 03:30:26 2009 +0000 (14 years ago) |
branch | lxdream-mem |
permissions | -rw-r--r-- |
last change | MMU work-in-progress * Move SDRAM out into separate sdram.c * Move all page-table management into mmu.c * Convert UTLB management to use the new page-tables * Rip out all calls to mmu_vma_to_phys_* and replace with direct access |
file | annotate | diff | log | raw |
1.1 --- a/src/sh4/ia64abi.h Mon Dec 22 09:51:11 2008 +00001.2 +++ b/src/sh4/ia64abi.h Sat Jan 03 03:30:26 2009 +00001.3 @@ -64,6 +64,13 @@1.4 CALL_r32disp8(preg, disp8);1.5 }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 161.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.21 -1.22 -#define MEM_WRITE_DOUBLE_SIZE 351.23 -/**1.24 - * Write a double (64-bit) value into memory, with the first word in arg2a, and1.25 - * the second in arg2b1.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.43 -#define MEM_READ_DOUBLE_SIZE 431.44 -/**1.45 - * Read a double (64-bit) value from memory, writing the first word into arg2a1.46 - * and the second into arg2b. The addr must not be in EAX1.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.63 /**
.