Board index » delphi » Re: FastCode Libraries 0.5 beta!

Re: FastCode Libraries 0.5 beta!


2006-08-31 05:29:49 PM
delphi73
"Charalabos Michael" <XXXX@XXXXX.COM>wrote
in message news:XXXX@XXXXX.COM...
Quote
Hello Boys and Girls,
I've updated the libraries with the latest routines
and also added a few new ones. Please report anything
you find wrong and remember in the current release
only "FastCodeCPUID" definition will work.
add:
else
raise Exception.Create('Fastcode: Failed to detect
machine type.');
to the bottom of the case:
{$IFDEF FastCodeCPUID}
case FastCodeTarget of
else you get alot of warnings about uninitialized value's
 
 

Re: FastCode Libraries 0.5 beta!

"Charalabos Michael" <XXXX@XXXXX.COM>wrote
in message news:XXXX@XXXXX.COM...
Quote
Hello Boys and Girls,
I've updated the libraries with the latest routines
and also added a few new ones. Please report anything
you find wrong and remember in the current release
only "FastCodeCPUID" definition will work.
FastCodeAddressPatch in FastCodePatch should reset the OriginalProtection,
also the if .. then try with no indenting is a bit evil, it also swallows
the error VirtualProtect might give.
 

Re: FastCode Libraries 0.5 beta!

Hello Dennis,
Quote
I count functions from 12 challenges. We have 50. You are 24% done ;-)
I found only 12 completed which they can replace
RTL routines or there more that I have missed ?
--
Charalabos Michael - [Creation Power] - www.creationpower.com -
www.creationpower.gr
 

Re: FastCode Libraries 0.5 beta!

Hello Jouni,
Quote
I moved file to Yahoo : Files>Libraries>Fastcode library>0.5
Thank you!
--
Charalabos Michael - [Creation Power] - www.creationpower.com -
www.creationpower.gr
 

Re: FastCode Libraries 0.5 beta!

Hello Jouni,
Quote
I used that this logic :
FastcodeCPUID.pas now reads Fastcode.inc and checks if
"FastcodeSizePenalties" is defined there. Based on that it selects
fctIA32 / fctIA32SizePenalty, fctSSE / fctSSESizePenalty.
FastcodeCPUID.pas also checks if FastcodePascal or
FastcodePascalSizePenalty is defined and then selects those as target.
Developer will use a {$DEFINE CodePenalty} in his application.
The the FastCode Units will use the CodePenalty functions
for each target if it exists.
Quote
Charalabos, if you want to make Dennis really happy, please run
replace in all .pas files with "FastCode" ->"Fastcode" :)
Shoot! I thought that "FastCode" looks prettier.
--
Charalabos Michael - [Creation Power] - www.creationpower.com -
www.creationpower.gr
 

Re: FastCode Libraries 0.5 beta!

Hi
The library is not for RTL routines only. It is for all Fastcode functions.
Best regards
Dennis Kjaer Christensen
 

Re: FastCode Libraries 0.5 beta!

"Charalabos Michael" <XXXX@XXXXX.COM>wrote
in message news:XXXX@XXXXX.COM...
Quote
Hello Boys and Girls,
I've updated the libraries with the latest routines
and also added a few new ones. Please report anything
you find wrong and remember in the current release
only "FastCodeCPUID" definition will work.
I have a P4 here but it giving me SSE2
if i look at CPU.Vendor = cvInterl
CPU.EffFamily = $f
CPU.EffModel = 4 !!
0,1,2 is NorthWood
6 is Prestler
but 4 is Prescott, isn't the NorthWood stuff better then the sse2
implementations ?
grt, Bart
 

Re: FastCode Libraries 0.5 beta!

Hi
Quote
I'll include their names above their functions
as the 0.3 had.
All contributor names must be mentioned in the MPL license text.
Best regards
Dennis Kjaer Christensen
 

Re: FastCode Libraries 0.5 beta!

Hello Dennis,
Quote
Aleksandr has the Pascal winners and is contributor
I'll include their names above their functions
as the 0.3 had.
--
Charalabos Michael - [Creation Power] - www.creationpower.com -
www.creationpower.gr
 

Re: FastCode Libraries 0.5 beta!

Hello Dennis,
Quote
Pascal and size penalty targets are missing.
Yonah and Dothan winners are incorrect

FastCodePosPMD: FastCodePosFunction = Pos_JOH_IA32_6;
FastCodePosPMY: FastCodePosFunction = Pos_JOH_IA32_6;

Should be

FastCodePosPMD: FastCodePosFunction = Pos_JOH_SSE2_3;
FastCodePosPMY: FastCodePosFunction = Pos_JOH_SSE2_3;
Thanks, I have correct them.
--
Charalabos Michael - [Creation Power] - www.creationpower.com -
www.creationpower.gr
 

Re: FastCode Libraries 0.5 beta!

Hello Bart,
Quote
{$IFDEF FastCodeCPUID}
case FastCodeTarget of


else you get alot of warnings about uninitialized value's
Fixed.
--
Charalabos Michael - [Creation Power] - www.creationpower.com -
www.creationpower.gr
 

Re: FastCode Libraries 0.5 beta!

Hi
These functions are in the library
Pos, PosEx, LowerCase, UpperCase, CompareStr, CompareMem, CompareText,
StrComp, StrCopy, StrLen,FillChar,AnsiStringReplace;
Taking challenges from our site in alphabetical order and listing the ones
not included in the library
AES, ArcCos, ArcSin, Ceil32, Ceil64, CharPos, CharPosIEx, CharPosEY,
CmplxRectAdd, , CmplxRectSub, CmplxRectMul, CmplxRectDiv, CmplxPolAdd,
CmplxPolSub, CmplxPolToRect, CmplxRectToPol, Floor32, Floor64, GCD32,
Int64Div, Int64Mul, IsPrime, MaxFP, MaxInt, MaxInt64, MinFP, MinInt,
MinInt64, Move, PosIEx, Power, RGBToBGR, Round, RoundToEx, Round32, Trunc,
Trunc32.
These are missing.
Best regards
Dennis Kjaer Christensen
 

Re: FastCode Libraries 0.5 beta!

Hello Bart,
Quote
FastCodeAddressPatch in FastCodePatch should reset the OriginalProtection,
also the if .. then try with no indenting is a bit evil, it also swallows
the error VirtualProtect might give.
You mean something like below ?
procedure FastcodeAddressPatch(const ASource, ADestination: Pointer);
const
Size = SizeOf(TJump);
var
NewJump: PJump;
OldProtect: Cardinal;
begin
if VirtualProtect(ASource, Size, PAGE_EXECUTE_READWRITE, OldProtect) then
begin
NewJump := PJump(ASource);
NewJump.OpCode := $E9;
NewJump.Distance := Pointer(Integer(ADestination) -
Integer(ASource) - 5);
FlushInstructionCache(GetCurrentProcess, ASource, SizeOf(TJump));
VirtualProtect(ASource, Size, OldProtect, @OldProtect);
end;
end;
--
Charalabos Michael - [Creation Power] - www.creationpower.com -
www.creationpower.gr
 

Re: FastCode Libraries 0.5 beta!

Hello Dennis,
Quote
The library is not for RTL routines only. It is
for all Fastcode functions.
Just teasing!
--
Charalabos Michael - [Creation Power] - www.creationpower.com -
www.creationpower.gr
 

Re: FastCode Libraries 0.5 beta!

Hello,
Quote
All contributor names must be mentioned in the MPL license text.
It's easier for me. <g>
--
Charalabos Michael - [Creation Power] - www.creationpower.com -
www.creationpower.gr