Re: [fpc-pascal] fast integer multiplication and one asm questio

2005-08-02 Thread Gerhard Scholz
August 2005 17:22 Betreff: [fpc-pascal] fast integer multiplication and one asm questio > Hi, the UI32x32To64 function is great but is amazingly short. How can I > Specify which varriables in function will be accessed. In this function for > example it accesses a and b but source says mull

[fpc-pascal] fast integer multiplication and one asm questio

2005-08-02 Thread Pianoman
apptype gui} or use the -WG parameter. For the > compiler > it is not known if the application needs a console or not. > > > Peter > Lazarus is already compiled with -WG Jesus Reyes A. __________________ Correo Yahoo! Espacio para todos tus men

Re: [fpc-pascal] fast integer multiplication

2005-08-01 Thread Gerhard Scholz
... >>The code generated for the above sample is: >># [16] c:=a*b; >>movlU_P$PROJECT1_A,%edx >>movlU_P$PROJECT1_B,%eax >>mull%edx >>movl$0,%edx >>movl%eax,U_P$PROJECT1_C >>movl%edx,U_P$PROJECT1_C+4 >> >>What I want is the above code, but without the "

Re: [fpc-pascal] fast integer multiplication

2005-07-29 Thread Peter Vreman
> Now, concerning "both fpc and delphi". That Delphi code can be > compiled with FPC is rather good thing but FPC has not to follow > Delphi. The future of Pascal is not Delphi, it is FreePascal. And, > no, for once, I am not joking. :-) Most users expect the same behaviour in delphi and fpc. We g

Re: [fpc-pascal] fast integer multiplication

2005-07-29 Thread Marcel Martin
Peter Vreman a écrit : Since you ask the question, I suppose you cannot simply suppress the "movl $0,%edx" line generation [*]. What about using a compiler directive, something like {$EXTENDEDMUL ON/OFF} for instance? I don't like this. This means we have to add directives for all kind of speci

Re: [fpc-pascal] fast integer multiplication

2005-07-29 Thread Peter Vreman
>>>Since you ask the question, I suppose you cannot simply >>>suppress the "movl $0,%edx" line generation [*]. What about >>>using a compiler directive, something like {$EXTENDEDMUL ON/OFF} >>>for instance? >> >> I don't like this. This means we have to add directives for all kind of >> special cpu

Re: [fpc-pascal] fast integer multiplication

2005-07-29 Thread Jonas Maebe
On 29 Jul 2005, at 11:36, Marcel Martin wrote: But it is a special case because FPC makes it special. No, it's simply a consequence of the fact that Pascal performs all calculations using the native integer type by default. Jonas ___ fpc-pasca

Re: [fpc-pascal] fast integer multiplication

2005-07-29 Thread Marcel Martin
Peter Vreman a écrit : >Marcel Martin wrote : Since you ask the question, I suppose you cannot simply suppress the "movl $0,%edx" line generation [*]. What about using a compiler directive, something like {$EXTENDEDMUL ON/OFF} for instance? I don't like this. This means we have to add directiv

Re: [fpc-pascal] fast integer multiplication

2005-07-29 Thread Florian Klaempfl
Peter Vreman wrote: >>Florian Klaempfl a écrit : >> >>>Vincent Snijders wrote: >>> >>> >>> Hi, Suppose I have the following code: var a,b: dword; c: qword; begin a := 1000; b := 2000; c := a * b; writeln(c); end. Now

Re: [fpc-pascal] fast integer multiplication

2005-07-28 Thread Peter Vreman
> Florian Klaempfl a écrit : >> Vincent Snijders wrote: >> >> >>>Hi, >>> >>>Suppose I have the following code: >>> >>>var >>> a,b: dword; >>> c: qword; >>> >>>begin >>> a := 1000; >>> b := 2000; >>> c := a * b; >>> writeln(c); >>>end. >>> >>>Now, although c is large enough to contain

Re: [fpc-pascal] fast integer multiplication

2005-07-28 Thread Nikolay Nikolov
Florian Klaempfl wrote: Vincent Snijders wrote: Hi, Suppose I have the following code: var a,b: dword; c: qword; begin a := 1000; b := 2000; c := a * b; writeln(c); end. Now, although c is large enough to contain the result only the lower dword is filled. I can force corre

Re: [fpc-pascal] fast integer multiplication

2005-07-28 Thread Marcel Martin
Florian Klaempfl a écrit : Vincent Snijders wrote: Hi, Suppose I have the following code: var a,b: dword; c: qword; begin a := 1000; b := 2000; c := a * b; writeln(c); end. Now, although c is large enough to contain the result only the lower dword is filled. I can force corre

Re: [fpc-pascal] fast integer multiplication

2005-07-23 Thread Marcel Martin
Florian Klaempfl a écrit : Vincent Snijders wrote: Hi, Suppose I have the following code: var a,b: dword; c: qword; begin a := 1000; b := 2000; c := a * b; writeln(c); end. Now, although c is large enough to contain the result only the lower dword is filled. I can force corre

Re: [fpc-pascal] fast integer multiplication

2005-07-22 Thread Florian Klaempfl
Vincent Snijders wrote: > Hi, > > Suppose I have the following code: > > var > a,b: dword; > c: qword; > > begin > a := 1000; > b := 2000; > c := a * b; > writeln(c); > end. > > Now, although c is large enough to contain the result only the lower > dword is filled. I can fo

[fpc-pascal] fast integer multiplication

2005-07-21 Thread Vincent Snijders
Hi, Suppose I have the following code: var a,b: dword; c: qword; begin a := 1000; b := 2000; c := a * b; writeln(c); end. Now, although c is large enough to contain the result only the lower dword is filled. I can force correct results by using c := qword(a) * b, but the