From 19dd2b9a34d418643250c63531548a9a0a9f4c07 Mon Sep 17 00:00:00 2001 From: "Artem Jerdev (art_zh)" Date: Tue, 24 May 2011 12:30:12 +0000 Subject: [PATCH] fastcall/syscall instructions should be avoided in future due to possible compatibility problems. git-svn-id: svn://kolibrios.org@1937 a494cfbc-eb01-0410-851d-a64ba20cac60 --- .../tinypy/tinypy/fasm_modules/macros.inc | 26 +---------------- programs/emulator/PrMK/trunk/macros.inc | 24 ---------------- programs/macros.inc | 28 ++----------------- programs/system/MyKey/trunk/macros.inc | 27 +----------------- programs/system/launch/trunk/macros.inc | 24 ---------------- .../system/pcidev/branches/new_api/macros.inc | 25 +---------------- 6 files changed, 5 insertions(+), 149 deletions(-) diff --git a/programs/develop/tinypy/tinypy/fasm_modules/macros.inc b/programs/develop/tinypy/tinypy/fasm_modules/macros.inc index 7568c3afaa..2f3f66a41d 100644 --- a/programs/develop/tinypy/tinypy/fasm_modules/macros.inc +++ b/programs/develop/tinypy/tinypy/fasm_modules/macros.inc @@ -292,8 +292,7 @@ include 'config.inc' ;__CPU_type equ p5 SYSENTER_VAR equ 0 -macro mcall a,b,c,d,e,f { ; mike.dld, updated by Ghost for Fast System Calls - local ..ret_point +macro mcall a,b,c,d,e,f { ; mike.dld __mov eax,a __mov ebx,b __mov ecx,c @@ -301,30 +300,7 @@ macro mcall a,b,c,d,e,f { ; mike.dld, updated by Ghost for Fast System Calls __mov esi,e __mov edi,f - if __CPU_type eq p5 int 0x40 - else - if __CPU_type eq p6 - push ebp - mov ebp, esp - push ..ret_point ; it may be 2 or 5 byte - sysenter - ..ret_point: - pop edx - pop ecx - - else - if __CPU_type eq k6 - push ecx - syscall - pop ecx - else - display 'ERROR : unknown CPU type (set to p5)', 10, 13 - __CPU_type equ p5 - int 0x40 - end if - end if - end if } diff --git a/programs/emulator/PrMK/trunk/macros.inc b/programs/emulator/PrMK/trunk/macros.inc index 8b2870da76..2a485f55bb 100644 --- a/programs/emulator/PrMK/trunk/macros.inc +++ b/programs/emulator/PrMK/trunk/macros.inc @@ -284,7 +284,6 @@ __CPU_type equ p5 SYSENTER_VAR equ 0 macro mcall a,b,c,d,e,f { ; mike.dld, updated by Ghost for Fast System Calls - local ..ret_point __mov eax,a __mov ebx,b __mov ecx,c @@ -292,30 +291,7 @@ macro mcall a,b,c,d,e,f { ; mike.dld, updated by Ghost for Fast System Calls __mov esi,e __mov edi,f - if __CPU_type eq p5 int 0x40 - else - if __CPU_type eq p6 - push ebp - mov ebp, esp - push ..ret_point ; it may be 2 or 5 byte - sysenter - ..ret_point: - pop edx - pop ecx - - else - if __CPU_type eq k6 - push ecx - syscall - pop ecx - else - display 'ERROR : unknown CPU type (set to p5)', 10, 13 - __CPU_type equ p5 - int 0x40 - end if - end if - end if } diff --git a/programs/macros.inc b/programs/macros.inc index 7568c3afaa..829cb30cf4 100644 --- a/programs/macros.inc +++ b/programs/macros.inc @@ -292,8 +292,7 @@ include 'config.inc' ;__CPU_type equ p5 SYSENTER_VAR equ 0 -macro mcall a,b,c,d,e,f { ; mike.dld, updated by Ghost for Fast System Calls - local ..ret_point +macro mcall a,b,c,d,e,f { ; mike.dld __mov eax,a __mov ebx,b __mov ecx,c @@ -301,30 +300,7 @@ macro mcall a,b,c,d,e,f { ; mike.dld, updated by Ghost for Fast System Calls __mov esi,e __mov edi,f - if __CPU_type eq p5 - int 0x40 - else - if __CPU_type eq p6 - push ebp - mov ebp, esp - push ..ret_point ; it may be 2 or 5 byte - sysenter - ..ret_point: - pop edx - pop ecx - - else - if __CPU_type eq k6 - push ecx - syscall - pop ecx - else - display 'ERROR : unknown CPU type (set to p5)', 10, 13 - __CPU_type equ p5 - int 0x40 - end if - end if - end if + int 0x40 } diff --git a/programs/system/MyKey/trunk/macros.inc b/programs/system/MyKey/trunk/macros.inc index d4689a5d31..ec3163d8b6 100644 --- a/programs/system/MyKey/trunk/macros.inc +++ b/programs/system/MyKey/trunk/macros.inc @@ -284,38 +284,13 @@ include 'config.inc' SYSENTER_VAR equ 0 macro mcall a,b,c,d,e,f { ; mike.dld, updated by Ghost for Fast System Calls - local ..ret_point __mov eax,a __mov ebx,b __mov ecx,c __mov edx,d __mov esi,e __mov edi,f - - if __CPU_type eq p5 - int 0x40 - else - if __CPU_type eq p6 - push ebp - mov ebp, esp - push ..ret_point ; it may be 2 or 5 byte - sysenter - ..ret_point: - pop edx - pop ecx - - else - if __CPU_type eq k6 - push ecx - syscall - pop ecx - else - display 'ERROR : unknown CPU type (set to p5)', 10, 13 - __CPU_type equ p5 - int 0x40 - end if - end if - end if + int 0x40 } diff --git a/programs/system/launch/trunk/macros.inc b/programs/system/launch/trunk/macros.inc index 415f26e12e..154a07b060 100755 --- a/programs/system/launch/trunk/macros.inc +++ b/programs/system/launch/trunk/macros.inc @@ -288,7 +288,6 @@ include 'config.inc' SYSENTER_VAR equ 0 macro mcall a,b,c,d,e,f { ; mike.dld, updated by Ghost for Fast System Calls - local ..ret_point __mov eax,a __mov ebx,b __mov ecx,c @@ -296,30 +295,7 @@ macro mcall a,b,c,d,e,f { ; mike.dld, updated by Ghost for Fast System Calls __mov esi,e __mov edi,f - if __CPU_type eq p5 int 0x40 - else - if __CPU_type eq p6 - push ebp - mov ebp, esp - push ..ret_point ; it may be 2 or 5 byte - sysenter - ..ret_point: - pop edx - pop ecx - - else - if __CPU_type eq k6 - push ecx - syscall - pop ecx - else - display 'ERROR : unknown CPU type (set to p5)', 10, 13 - __CPU_type equ p5 - int 0x40 - end if - end if - end if } diff --git a/programs/system/pcidev/branches/new_api/macros.inc b/programs/system/pcidev/branches/new_api/macros.inc index ba07eb1105..1ad6ebdfb0 100644 --- a/programs/system/pcidev/branches/new_api/macros.inc +++ b/programs/system/pcidev/branches/new_api/macros.inc @@ -193,8 +193,7 @@ macro __mov reg,a,b { ; mike.dld __CPU_type equ p5 SYSENTER_VAR equ 0 -macro mcall a,b,c,d,e,f { ; mike.dld, updated by Ghost for Fast System Calls - local ..ret_point +macro mcall a,b,c,d,e,f { ; mike.dld __mov eax,a __mov ebx,b __mov ecx,c @@ -202,29 +201,7 @@ macro mcall a,b,c,d,e,f { ; mike.dld, updated by Ghost for Fast System Calls __mov esi,e __mov edi,f - if __CPU_type eq p5 int 0x40 - else - if __CPU_type eq p6 - push ebp - mov ebp, esp - push ..ret_point ; it may be 2 or 5 byte - sysenter - ..ret_point: - pop edx - pop ecx - - else - if __CPU_type eq k6 - push ecx - syscall - pop ecx - else - display 'ERROR : unknown CPU type' - int 0x40 - end if - end if - end if }