Re: [fpc-pascal] generated assembler

2006-09-22 Thread Vincent Snijders

Florian Klaempfl schreef:



Line 17 generates two assembler instructions. Line 22 generates three
assembler instructions. As far as I can see both high(d) and @d[high(d)]
are constants, because d is a global variable.

Is it possible that line 22 will generate 2 assembler instructions in
the future? Or is this a limitation of the i386 assembler? Or do I make
a mistake in my reasoning?


No, you aren't, however, the problem of this benchmark are the inserted fwaits
which are necessary to get fpu exceptions at correct lines. The best would be to
introduce a switch which prevents the fwaits.


Aha, that explains why explicit subexpression elimination fails too.

using comon expression, less calculations:
distance:=sqrt(sqr(dx)+sqr(dy)+sqr(dz));
mag := dt / (distance*distance*distance);
but this is faster:
distance:=sqrt(sqr(dx)+sqr(dy)+sqr(dz));
mag := dt / (sqrt(sqr(dx)+sqr(dy)+sqr(dz))*(sqr(dx)+sqr(dy)+sqr(dz)));

using comon expression, less calculations:
  b1mag := b1^.mass * mag;
  b2^.vx := b2^.vx + dx * b1mag;
  b2^.vy := b2^.vy + dy * b1mag;
  b2^.vz := b2^.vz + dz * b1mag;
but this is faster:
  b2^.vx := b2^.vx + dx * b1^.mass * mag;
  b2^.vy := b2^.vy + dy * b1^.mass * mag;
  b2^.vz := b2^.vz + dz * b1^.mass * mag;

Vincent
___
fpc-pascal maillist  -  fpc-pascal@lists.freepascal.org
http://lists.freepascal.org/mailman/listinfo/fpc-pascal


RE: [fpc-pascal] Win32 Build Errors

2006-09-22 Thread Tomas Hajny
Lee, John wrote:
> Does this mean we can't do snapshot on win32? Is there a fix planned? Eg
> couldn't we write a fpc version of cp - guess this would only be a few
> lines or is it more complicated than this?

1) Do you get this error too when building Win32 snapshots?

2) It certainly doesn't mean that it isn't possible to create Win32
snapshots. It just means exactly what Peter stated - one needs to use
exported sources (obtained using "svn export") rather than svn checkout.
Note that this can be done even locally when having checked out sources.

Tomas


> -Original Message-
> From: [EMAIL PROTECTED]
> [mailto:[EMAIL PROTECTED] Behalf Of Peter
> Vreman
> Sent: 20 September 2006 16:25
> To: FPC-Pascal users discussions
> Subject: Re: [fpc-pascal] Win32 Build Errors
>
>
>> Greetings.
>>
>> When running 'make zipinstall' under Win32, the process ends with the
>> following error:
>> cp.exe: cannot remove old link to
>> `D:/fpc/../fpc-pack/examples/oracle/.svn/text-
>>
>> base/Makefile.fpc.svn-base': Permission denied
>
> This is a know issue. It is a bug in the non-fpc cp.exe for win32. We
> can't fix this. Use a svn export instead of svn checkout.
>
>
>
> ___
> fpc-pascal maillist  -  fpc-pascal@lists.freepascal.org
> http://lists.freepascal.org/mailman/listinfo/fpc-pascal
>
>
> This e-mail and any attachment is for authorised use by the intended
> recipient(s) only. It may contain proprietary material, confidential
> information and/or be subject to legal privilege. It should not be copied,
> disclosed to, retained or used by, any other party. If you are not an
> intended recipient then please promptly delete this e-mail and any
> attachment and all copies and inform the sender. Thank you.
> ___
> fpc-pascal maillist  -  fpc-pascal@lists.freepascal.org
> http://lists.freepascal.org/mailman/listinfo/fpc-pascal
>

___
fpc-pascal maillist  -  fpc-pascal@lists.freepascal.org
http://lists.freepascal.org/mailman/listinfo/fpc-pascal


RE: [fpc-pascal] Win32 Build Errors

2006-09-22 Thread Peter Vreman
> Does this mean we can't do snapshot on win32? Is there a fix planned? Eg
> couldn't we write a fpc version of cp - guess this would only be a few
> lines or is it more complicated than this?

This situation is there already for years.

___
fpc-pascal maillist  -  fpc-pascal@lists.freepascal.org
http://lists.freepascal.org/mailman/listinfo/fpc-pascal


Re: [fpc-pascal] generated assembler

2006-09-22 Thread Florian Klaempfl
Vincent Snijders wrote:
> Florian Klaempfl schreef:
>>>
>>>
>>> Line 17 generates two assembler instructions. Line 22 generates three
>>> assembler instructions. As far as I can see both high(d) and @d[high(d)]
>>> are constants, because d is a global variable.
>>>
>>> Is it possible that line 22 will generate 2 assembler instructions in
>>> the future? Or is this a limitation of the i386 assembler? Or do I make
>>> a mistake in my reasoning?
>>
>> No, you aren't, however, the problem of this benchmark are the
>> inserted fwaits
>> which are necessary to get fpu exceptions at correct lines. The best
>> would be to
>> introduce a switch which prevents the fwaits.
> 
> Aha, that explains why explicit subexpression elimination fails too.

Yes, an fwait patch would help a lot here :) Even more, because C doesn't insert
these fwaits neither.

> 
> using comon expression, less calculations:
> distance:=sqrt(sqr(dx)+sqr(dy)+sqr(dz));
>   mag := dt / (distance*distance*distance);
> but this is faster:
> distance:=sqrt(sqr(dx)+sqr(dy)+sqr(dz));
>   mag := dt /
> (sqrt(sqr(dx)+sqr(dy)+sqr(dz))*(sqr(dx)+sqr(dy)+sqr(dz)));
> 
> using comon expression, less calculations:
>   b1mag := b1^.mass * mag;
>   b2^.vx := b2^.vx + dx * b1mag;
>   b2^.vy := b2^.vy + dy * b1mag;
>   b2^.vz := b2^.vz + dz * b1mag;
> but this is faster:
>   b2^.vx := b2^.vx + dx * b1^.mass * mag;
>   b2^.vy := b2^.vy + dy * b1^.mass * mag;
>   b2^.vz := b2^.vz + dz * b1^.mass * mag;
> 
> Vincent
> ___
> fpc-pascal maillist  -  fpc-pascal@lists.freepascal.org
> http://lists.freepascal.org/mailman/listinfo/fpc-pascal

___
fpc-pascal maillist  -  fpc-pascal@lists.freepascal.org
http://lists.freepascal.org/mailman/listinfo/fpc-pascal


Re[2]: [fpc-pascal] Win32 Build Errors

2006-09-22 Thread Пётр Косаревский
> > Does this mean we can't do snapshot on win32? Is there a fix planned? Eg
> > couldn't we write a fpc version of cp - guess this would only be a few
> > lines or is it more complicated than this?
> This situation is there already for years.

If I get it right, one is supposed to have CYGWIN for win32 anyway: FP IDE 
absolutely doesn't run without it (it's bad, because, for example, running two 
applications using different CYGWIN libraries simultaneously makes fail at 
least one of them and so on). CYGWIN includes these UNIX style thingies 
(pwd.exe, cp.exe etc.). So that's it (if CYGWIN binaries directory is in the 
search path).

I compile 2.1.x with this batch file:

d:
cd \fpc
ren lastd _lastd   // compiled compiler, previous build
ren tmpsrc _tmpsrc // exported sources of the previous build

cd fpcSVN  // local repository
svn update  // updating repository
svn export . d:\fpc\tmpsrc  // exporting sources, if I mess with local 
repository, I run "svn cleanup" to remove junk

cd ..\tmpsrc  // exported sources, first make will produce (not so) junk here
d:\fpc\2.0.4.rc2\bin\i386-win32\make clean all 
FPC=d:\fpc\2.0.4.rc2\bin\i386-win32\ppc386.exe
  // running some other make may be bad, and I still use 2.0.4rc2 for no 
reason, 
d:\fpc\2.0.4.rc2\bin\i386-win32\make install INSTALL_PREFIX=d:/fpc/lastd 
FPC=d:\fpc\tmpsrc\compiler\ppc386.exe
  // now there must be all native FPC files in d:\fpc\lastd\ (and FP IDE won't 
run without some tuning)


And "make" uses d:\cygwin\bin\ utilities heavily.
___
fpc-pascal maillist  -  fpc-pascal@lists.freepascal.org
http://lists.freepascal.org/mailman/listinfo/fpc-pascal


RE: [fpc-pascal] Win32 Build Errors

2006-09-22 Thread Wolfe, Robert
Technically, this should not happen on ANY version of Windows.  But, I
digress.  I'll just sit here building my Sparc Linux builds and making
them available for download from my site :)


Robert Wolfe ([EMAIL PROTECTED] / [EMAIL PROTECTED])
Computer Programmer/Analyst & Web Programmer
SRDAR, Roswell Park Cancer Institute, Buffalo, New York
716-845-5788 | http://www.srdar.org


> -Original Message-
> From: [EMAIL PROTECTED] [mailto:fpc-pascal-
> [EMAIL PROTECTED] On Behalf Of Lee, John
> Sent: Wednesday, September 20, 2006 11:41 AM
> To: FPC-Pascal users discussions
> Subject: RE: [fpc-pascal] Win32 Build Errors
> 
> The daily v211 & v20 win32 snapshots are currently working ok - they
are
> done on winme which doesn't have this problem, so you could download
the
> snapshot from ftp.freepascal.org .../snapshots/ if that's what you
want.
> 
> Regards John
> > -Original Message-
> > From: [EMAIL PROTECTED]
> > [mailto:[EMAIL PROTECTED] Behalf Of Peter
> > Vreman
> > Sent: 20 September 2006 16:25
> > To: FPC-Pascal users discussions
> > Subject: Re: [fpc-pascal] Win32 Build Errors
> >
> >
> > > Greetings.
> > >
> > > When running 'make zipinstall' under Win32, the process
> > ends with the
> > > following error:
> > > cp.exe: cannot remove old link to
> > > `D:/fpc/../fpc-pack/examples/oracle/.svn/text-
> > >
> > > base/Makefile.fpc.svn-base': Permission denied
> >
> > This is a know issue. It is a bug in the non-fpc cp.exe for win32.
We
> > can't fix this. Use a svn export instead of svn checkout.
> >
> >
> >
> > ___
> > fpc-pascal maillist  -  fpc-pascal@lists.freepascal.org
> > http://lists.freepascal.org/mailman/listinfo/fpc-pascal
> >
> 
> 
> This e-mail and any attachment is for authorised use by the intended
> recipient(s) only. It may contain proprietary material, confidential
> information and/or be subject to legal privilege. It should not be
copied,
> disclosed to, retained or used by, any other party. If you are not an
> intended recipient then please promptly delete this e-mail and any
> attachment and all copies and inform the sender. Thank you.
> ___
> fpc-pascal maillist  -  fpc-pascal@lists.freepascal.org
> http://lists.freepascal.org/mailman/listinfo/fpc-pascal


This email message may contain legally privileged and/or confidential 
information.  If you are not the intended recipient(s), or the employee or 
agent responsible for the delivery of this message to the intended 
recipient(s), you are hereby notified that any disclosure, copying, 
distribution, or use of this email message is prohibited.  If you have received 
this message in error, please notify the sender immediately by e-mail and 
delete this email message from your computer. Thank you.
___
fpc-pascal maillist  -  fpc-pascal@lists.freepascal.org
http://lists.freepascal.org/mailman/listinfo/fpc-pascal


Re: Re[2]: [fpc-pascal] Win32 Build Errors

2006-09-22 Thread Peter Vreman
>> > Does this mean we can't do snapshot on win32? Is there a fix planned?
>> Eg
>> > couldn't we write a fpc version of cp - guess this would only be a few
>> > lines or is it more complicated than this?
>> This situation is there already for years.
>
> If I get it right, one is supposed to have CYGWIN for win32 anyway: FP IDE
> absolutely doesn't run without it (it's bad, because, for example, running
> two applications using different CYGWIN libraries simultaneously makes
> fail at least one of them and so on). CYGWIN includes these UNIX style
> thingies (pwd.exe, cp.exe etc.). So that's it (if CYGWIN binaries
> directory is in the search path).

This is not correct. You don't need cygwin, we provide all the require
unix tools. The makefiles even don't work in cygwin. They can only be run
from the CMD prompt.

That the FP IDE requires the cygwin1.dll is simply because the mingw32 gdb
was not working. If you can remove the dependency on gdb for debugging you
are welcome to provide patches.



___
fpc-pascal maillist  -  fpc-pascal@lists.freepascal.org
http://lists.freepascal.org/mailman/listinfo/fpc-pascal


Re: [fpc-pascal] Sparc Build

2006-09-22 Thread Florian Klaempfl
Wolfe, Robert wrote:
> Greetings all!  When building the Sparc Linux port of 2.1.1 from the
> current (as of this email) SVN code, I get the following messages:

Works here.

> 
> /home/robert/fpc/compiler/ppc1 -Ur -Ur -Xs -O2 -n -Fi../inc -Fi../sparc
> -Fi../un ix
> -Fisparc -FE. -FU/home/robert/fpc/rtl/units/sparc-linux -dsparc
> -dRELEASE -Us
> -Sg system.pp
> thread.inc(290,10) Warning: Function result does not seem to be set
> thread.inc(302,11) Warning: Function result does not seem to be set
> thread.inc(312,11) Warning: Function result does not seem to be set
> thread.inc(317,11) Warning: Function result does not seem to be set
> thread.inc(322,11) Warning: Function result does not seem to be set
> thread.inc(351,10) Warning: Function result does not seem to be set
> thread.inc(370,11) Warning: Function result does not seem to be set
> thread.inc(394,11) Warning: Function result does not seem to be set
> thread.inc(400,11) Warning: Function result does not seem to be set
> /home/robert/fpc/rtl/units/sparc-linux/system.s: Assembler messages:
> /home/robert/fpc/rtl/units/sparc-linux/system.s:4858: Error: bad
> expression
> /home/robert/fpc/rtl/units/sparc-linux/system.s:4858: Error: missing ']'
> /home/robert/fpc/rtl/units/sparc-linux/system.s:4858: Error: Illegal
> operands
> /home/robert/fpc/rtl/units/sparc-linux/system.s:4890: Error: bad
> expression
> /home/robert/fpc/rtl/units/sparc-linux/system.s:4890: Error: missing ']'
> /home/robert/fpc/rtl/units/sparc-linux/system.s:4890: Error: Illegal
> operands
> /home/robert/fpc/rtl/units/sparc-linux/system.s:4891: Error: Illegal
> operands
> threadvr.inc(30,25) Error: Error while assembling exitcode 1
> threadvr.inc(30,25) Fatal: There were 2 errors compiling module,
> stopping
> Fatal: Compilation aborted
> make[7]: *** [system.ppu] Error 1
> make[7]: Leaving directory `/home/robert/fpc/rtl/linux'
> make[6]: *** [linux_all] Error 2
> make[6]: Leaving directory `/home/robert/fpc/rtl'
> make[5]: *** [rtl] Error 2
> make[5]: Leaving directory `/home/robert/fpc/compiler'
> make[4]: *** [next] Error 2
> make[4]: Leaving directory `/home/robert/fpc/compiler'
> make[3]: *** [ppc2] Error 2
> make[3]: Leaving directory `/home/robert/fpc/compiler'
> make[2]: *** [cycle] Error 2
> make[2]: Leaving directory `/home/robert/fpc/compiler'
> make[1]: *** [compiler_cycle] Error 2
> make[1]: Leaving directory `/home/robert/fpc'
> make: *** [build-stamp.sparc-linux] Error 2
> 
> Any ideas?
> 
> Robert Wolfe ([EMAIL PROTECTED] / [EMAIL PROTECTED])
> Computer Programmer/Analyst & Web Programmer
> SRDAR, Roswell Park Cancer Institute, Buffalo, New York
> 716-845-5788 | http://www.srdar.org
> 
> 
> 
> This email message may contain legally privileged and/or confidential 
> information.  If you are not the intended recipient(s), or the employee or 
> agent responsible for the delivery of this message to the intended 
> recipient(s), you are hereby notified that any disclosure, copying, 
> distribution, or use of this email message is prohibited.  If you have 
> received this message in error, please notify the sender immediately by 
> e-mail and delete this email message from your computer. Thank you.
> ___
> fpc-pascal maillist  -  fpc-pascal@lists.freepascal.org
> http://lists.freepascal.org/mailman/listinfo/fpc-pascal

___
fpc-pascal maillist  -  fpc-pascal@lists.freepascal.org
http://lists.freepascal.org/mailman/listinfo/fpc-pascal