Search
lxdream.org :: lxdream :: r1146:76c5d1064262
lxdream 0.9.1
released Jun 29
Download Now
changeset1146:76c5d1064262
parent1145:45674791c6ad
child1147:e04e4af64626
authornkeynes
dateMon Nov 08 18:56:11 2010 +1000 (9 years ago)
Fix 32-bit non-fastcall build
src/sh4/sh4x86.in
src/xlat/x86/amd64abi.h
src/xlat/x86/ia32abi.h
1.1 --- a/src/sh4/sh4x86.in Mon Nov 08 14:33:38 2010 +1000
1.2 +++ b/src/sh4/sh4x86.in Mon Nov 08 18:56:11 2010 +1000
1.3 @@ -499,9 +499,9 @@
1.4 uint32_t sh4_translate_end_block_size()
1.5 {
1.6 if( sh4_x86.backpatch_posn <= 3 ) {
1.7 - return EPILOGUE_SIZE + (sh4_x86.backpatch_posn*24);
1.8 + return EPILOGUE_SIZE + (sh4_x86.backpatch_posn*(12+CALL1_PTR_MIN_SIZE));
1.9 } else {
1.10 - return EPILOGUE_SIZE + 72 + (sh4_x86.backpatch_posn-3)*27;
1.11 + return EPILOGUE_SIZE + (3*(12+CALL1_PTR_MIN_SIZE)) + (sh4_x86.backpatch_posn-3)*(15+CALL1_PTR_MIN_SIZE);
1.12 }
1.13 }
1.14
2.1 --- a/src/xlat/x86/amd64abi.h Mon Nov 08 14:33:38 2010 +1000
2.2 +++ b/src/xlat/x86/amd64abi.h Mon Nov 08 18:56:11 2010 +1000
2.3 @@ -42,6 +42,7 @@
2.4 CALL_r32(REG_ECX);
2.5 }
2.6
2.7 +#define CALL1_PTR_MIN_SIZE 12
2.8 static inline void CALL1_ptr_r32( void *ptr, int arg1 )
2.9 {
2.10 if( arg1 != REG_ARG1 ) {
3.1 --- a/src/xlat/x86/ia32abi.h Mon Nov 08 14:33:38 2010 +1000
3.2 +++ b/src/xlat/x86/ia32abi.h Mon Nov 08 18:56:11 2010 +1000
3.3 @@ -44,6 +44,8 @@
3.4 }
3.5
3.6 #ifdef HAVE_FASTCALL
3.7 +#define CALL1_PTR_MIN_SIZE 7
3.8 +
3.9 static inline void CALL1_ptr_r32( void *ptr, int arg1 )
3.10 {
3.11 if( arg1 != REG_ARG1 ) {
3.12 @@ -85,7 +87,10 @@
3.13 #define CALL3_r32disp_r32_r32_r32(preg,disp,arg1,arg2,arg3) CALL2_r32disp_r32_r32(preg,disp,arg1,arg2)
3.14
3.15 #else
3.16 -static inline void CALL1_ptr( void *ptr, int arg1 )
3.17 +
3.18 +#define CALL1_PTR_MIN_SIZE (3+1+7+3)
3.19 +
3.20 +static inline void CALL1_ptr_r32( void *ptr, int arg1 )
3.21 {
3.22 SUBL_imms_r32( 12, REG_ESP );
3.23 PUSH_r32(arg1);
3.24 @@ -125,7 +130,7 @@
3.25 PUSH_r32(arg2);
3.26 PUSH_r32(arg1);
3.27 MOVL_rspdisp_r32( 16, REG_EAX );
3.28 - MOVL_r32_rspdisp( R_EAX, 8 );
3.29 + MOVL_r32_rspdisp( REG_EAX, 8 );
3.30 CALL_r32disp(preg,disp);
3.31 ADDL_imms_r32( 16, REG_ESP );
3.32 }
.