[fpc-devel] how to compile RTL for ARM-Linux since r8006

2007-07-10 Thread Bernd Mueller

Hello,

can anyone please tell me, how to compile the RTL for ARM-Linux since 
revision 8006?


I tried to verify the bug fix 8967 (thank you Yury Sidorov) on my 
system, but I am not able to compile the RTL anymore.
Adding the -Sg switch seems to be required to compile softfpu, but I get 
now:


PPU Loading ..\..\rtl\units\arm-linux\dos.ppu
Trying to use a unit which was compiled with a different FPU mode
objects.pp(734,9) Fatal: Can't find unit dos used by Objects
Fatal: Compilation aborted

I would like to compile with softfloat disabled.

So far, I used following make call:

make CPU_TAGET=arm OS_TARGET=linux PP=ppcrossarm OPT="-Tlinux -CX -Sg"

Regards, Bernd.
___
fpc-devel maillist  -  fpc-devel@lists.freepascal.org
http://lists.freepascal.org/mailman/listinfo/fpc-devel


Re: [fpc-devel] how to compile RTL for ARM-Linux since r8006

2007-07-10 Thread Yury Sidorov

From: "Bernd Mueller" <[EMAIL PROTECTED]>

Hello,

can anyone please tell me, how to compile the RTL for ARM-Linux 
since revision 8006?


I tried to verify the bug fix 8967 (thank you Yury Sidorov) on my 
system, but I am not able to compile the RTL anymore.
Adding the -Sg switch seems to be required to compile softfpu, but I 
get now:


PPU Loading ..\..\rtl\units\arm-linux\dos.ppu
Trying to use a unit which was compiled with a different FPU mode
objects.pp(734,9) Fatal: Can't find unit dos used by Objects
Fatal: Compilation aborted

I would like to compile with softfloat disabled.

So far, I used following make call:

make CPU_TAGET=arm OS_TARGET=linux PP=ppcrossarm 
OPT="-Tlinux -CX -Sg"


Try to force hardware FPU mode by using -CfFPA switch.

Yury. 
___

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


Re: [fpc-devel] how to compile RTL for ARM-Linux since r8006

2007-07-10 Thread Bernd Mueller

Yury Sidorov wrote:

From: "Bernd Mueller" <[EMAIL PROTECTED]>

Hello,

can anyone please tell me, how to compile the RTL for ARM-Linux since 
revision 8006?


I tried to verify the bug fix 8967 (thank you Yury Sidorov) on my 
system, but I am not able to compile the RTL anymore.
Adding the -Sg switch seems to be required to compile softfpu, but I 
get now:


PPU Loading ..\..\rtl\units\arm-linux\dos.ppu
Trying to use a unit which was compiled with a different FPU mode
objects.pp(734,9) Fatal: Can't find unit dos used by Objects
Fatal: Compilation aborted

I would like to compile with softfloat disabled.

So far, I used following make call:

make CPU_TAGET=arm OS_TARGET=linux PP=ppcrossarm OPT="-Tlinux -CX -Sg"


Try to force hardware FPU mode by using -CfFPA switch.


no, it does not help. I get exactly the same error. Perhaps something 
changed in the build process for the cross compiler? I still use FPC 
2.0.4 as starting compiler to build the cross compiler.


I am building the cross compiler with following make call:
make clean
make PPC_TARGET=arm

Regards, Bernd.

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


Re: [fpc-devel] how to compile RTL for ARM-Linux since r8006

2007-07-10 Thread Marco van de Voort
> >> So far, I used following make call:
> >>
> >> make CPU_TAGET=arm OS_TARGET=linux PP=ppcrossarm OPT="-Tlinux -CX -Sg"
> > 
> > Try to force hardware FPU mode by using -CfFPA switch.
> 
> no, it does not help. I get exactly the same error. Perhaps something 
> changed in the build process for the cross compiler? I still use FPC 
> 2.0.4 as starting compiler to build the cross compiler.
> 
> I am building the cross compiler with following make call:
> make clean
> make PPC_TARGET=arm

Did you also recompile the RTL with soft support?
___
fpc-devel maillist  -  fpc-devel@lists.freepascal.org
http://lists.freepascal.org/mailman/listinfo/fpc-devel


Re: [fpc-devel] how to compile RTL for ARM-Linux since r8006

2007-07-10 Thread Bernd Mueller

Marco van de Voort wrote:

So far, I used following make call:

make CPU_TAGET=arm OS_TARGET=linux PP=ppcrossarm OPT="-Tlinux -CX -Sg"

Try to force hardware FPU mode by using -CfFPA switch.
no, it does not help. I get exactly the same error. Perhaps something 
changed in the build process for the cross compiler? I still use FPC 
2.0.4 as starting compiler to build the cross compiler.


I am building the cross compiler with following make call:
make clean
make PPC_TARGET=arm


Did you also recompile the RTL with soft support?


this compiles without errors. But I would like to get a hardfloat 
enabled RTL again.


Thank you for your help.

Regards, Bernd.


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


Re: [fpc-devel] Comparison FPC 2.2 - Delphi 7

2007-07-10 Thread Martin Schreiber
On Thursday 05 July 2007 10.18, Jonas Maebe wrote:
> On 05 Jul 2007, at 10:15, Florian Klaempfl wrote:
> > For build related crashes it is accepted if it can be reproduced by a
> > few simple steps like get this source, compile with that command,
> > touch
> > that file, rebuild.
>
> Indeed. At least Peter and I have already fixed quite a few MSEIde-
> related build crashes which were reported this way iirc.
>
I erred, sorry. Since I deleted all *.ppu files in the FPC and MSEgui source 
trees the FPC 2.2 compiler crashes without -B vanished.
Good work, thanks.  :-)

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


[fpc-devel] win32 debugging broken in fixes_2_2?

2007-07-10 Thread Martin Schreiber
Hi,
Every program compiled with fixes_2_2 rev. 8006 crashes
in gdb:
"
GNU gdb 6.6
Copyright (C) 2006 Free Software Foundation, Inc.
GDB is free software, covered by the GNU General Public License, and you are
welcome to change it and/or distribute copies of it under certain conditions.
Type "show copying" to see the conditions.
There is absolutely no warranty for GDB.  Type "show warranty" for details.
This GDB was configured as "i686-pc-mingw32"...
(gdb) run
Starting program: G:\testcase\mse\console/console.exe
Loaded symbols for C:\WINNT\system32\KERNEL32.DLL
Loaded symbols for C:\WINNT\system32\OLEAUT32.DLL
Loaded symbols for C:\WINNT\system32\OLE32.DLL
Loaded symbols for C:\WINNT\system32\rpcrt4.dll
Loaded symbols for C:\WINNT\system32\ADVAPI32.DLL
Loaded symbols for C:\WINNT\system32\GDI32.DLL
Loaded symbols for C:\WINNT\system32\USER32.DLL

Program received signal SIGILL, Illegal instruction.
0x00402091 in SYSTEM_FPC_CPUCODEINIT ()
(gdb) bt
#0  0x00402091 in SYSTEM_FPC_CPUCODEINIT ()
#1  0x0040a504 in SYSTEM_init ()
#2  0x00406114 in fpc_initializeunits ()
#3  0x7ffdf000 in ?? ()
#4  0x in ?? ()
(gdb)
"
The programs work without gdb.
System: win2000, PII.
The problem seems not to exist on another PC with win2000 and an AMD Athlon.
Any hints?

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


Re: [fpc-devel] win32 debugging broken in fixes_2_2?

2007-07-10 Thread vsnijders


- Original Message -
From: Martin Schreiber <[EMAIL PROTECTED]>
Date: Tuesday, July 10, 2007 2:38 pm
Subject: [fpc-devel] win32 debugging broken in fixes_2_2?

> Hi,
> Every program compiled with fixes_2_2 rev. 8006 crashes
> in gdb:
> "
> GNU gdb 6.6
> Copyright (C) 2006 Free Software Foundation, Inc.
> GDB is free software, covered by the GNU General Public License, 
> and you are
> welcome to change it and/or distribute copies of it under certain 
> conditions.Type "show copying" to see the conditions.
> There is absolutely no warranty for GDB.  Type "show warranty" for 
> details.This GDB was configured as "i686-pc-mingw32"...
> (gdb) run
> Starting program: G:\testcase\mse\console/console.exe
> Loaded symbols for C:\WINNT\system32\KERNEL32.DLL
> Loaded symbols for C:\WINNT\system32\OLEAUT32.DLL
> Loaded symbols for C:\WINNT\system32\OLE32.DLL
> Loaded symbols for C:\WINNT\system32\rpcrt4.dll
> Loaded symbols for C:\WINNT\system32\ADVAPI32.DLL
> Loaded symbols for C:\WINNT\system32\GDI32.DLL
> Loaded symbols for C:\WINNT\system32\USER32.DLL
> 
> Program received signal SIGILL, Illegal instruction.
> 0x00402091 in SYSTEM_FPC_CPUCODEINIT ()
> (gdb) bt
> #0  0x00402091 in SYSTEM_FPC_CPUCODEINIT ()
> #1  0x0040a504 in SYSTEM_init ()
> #2  0x00406114 in fpc_initializeunits ()
> #3  0x7ffdf000 in ?? ()
> #4  0x in ?? ()
> (gdb)
> "
> The programs work without gdb.
> System: win2000, PII.
> The problem seems not to exist on another PC with win2000 and an 
> AMD Athlon.
> Any hints?

It has to to with SSE2 detection. AFAIK the only reliable way to detect it, is 
execute a SSE2 instruction and capture the exection which it causes if it is 
not supported.

I don't know, how it can be circumvented (except for using a newer processor).

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


Re: [fpc-devel] win32 debugging broken in fixes_2_2?

2007-07-10 Thread Jonas Maebe


On 10 Jul 2007, at 14:38, Martin Schreiber wrote:


Every program compiled with fixes_2_2 rev. 8006 crashes
in gdb:
Program received signal SIGILL, Illegal instruction.
0x00402091 in SYSTEM_FPC_CPUCODEINIT ()
(gdb) bt
#0  0x00402091 in SYSTEM_FPC_CPUCODEINIT ()
#1  0x0040a504 in SYSTEM_init ()
#2  0x00406114 in fpc_initializeunits ()
#3  0x7ffdf000 in ?? ()
#4  0x in ?? ()
(gdb)
"
The programs work without gdb.
System: win2000, PII.
The problem seems not to exist on another PC with win2000 and an  
AMD Athlon.

Any hints?


The rtl checks on startup whether or not your cpu supports SSE. It  
does so by executing an SSE instruction, catching the "illegal  
instruction" exception if it occurs and if so, setting a boolean to  
false.


So just type "continue" in gdb to continue the program.


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


Re: [fpc-devel] how to compile RTL for ARM-Linux since r8006

2007-07-10 Thread Yury Sidorov

From: "Bernd Mueller" <[EMAIL PROTECTED]>

Marco van de Voort wrote:

So far, I used following make call:

make CPU_TAGET=arm OS_TARGET=linux PP=ppcrossarm 
OPT="-Tlinux -CX -Sg"

Try to force hardware FPU mode by using -CfFPA switch.
no, it does not help. I get exactly the same error. Perhaps 
something changed in the build process for the cross compiler? I 
still use FPC 2.0.4 as starting compiler to build the cross 
compiler.


I am building the cross compiler with following make call:
make clean
make PPC_TARGET=arm


Did you also recompile the RTL with soft support?


this compiles without errors. But I would like to get a hardfloat 
enabled RTL again.


What host OS do you use?

Yury. 
___

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


Re: [fpc-devel] win32 debugging broken in fixes_2_2?

2007-07-10 Thread Yury Sidorov

From: "Martin Schreiber" <[EMAIL PROTECTED]>

Hi,
Every program compiled with fixes_2_2 rev. 8006 crashes
in gdb:
"
GNU gdb 6.6
Copyright (C) 2006 Free Software Foundation, Inc.
GDB is free software, covered by the GNU General Public License, and 
you are
welcome to change it and/or distribute copies of it under certain 
conditions.

Type "show copying" to see the conditions.
There is absolutely no warranty for GDB.  Type "show warranty" for 
details.

This GDB was configured as "i686-pc-mingw32"...
(gdb) run
Starting program: G:\testcase\mse\console/console.exe
Loaded symbols for C:\WINNT\system32\KERNEL32.DLL
Loaded symbols for C:\WINNT\system32\OLEAUT32.DLL
Loaded symbols for C:\WINNT\system32\OLE32.DLL
Loaded symbols for C:\WINNT\system32\rpcrt4.dll
Loaded symbols for C:\WINNT\system32\ADVAPI32.DLL
Loaded symbols for C:\WINNT\system32\GDI32.DLL
Loaded symbols for C:\WINNT\system32\USER32.DLL

Program received signal SIGILL, Illegal instruction.
0x00402091 in SYSTEM_FPC_CPUCODEINIT ()
(gdb) bt
#0  0x00402091 in SYSTEM_FPC_CPUCODEINIT ()
#1  0x0040a504 in SYSTEM_init ()
#2  0x00406114 in fpc_initializeunits ()
#3  0x7ffdf000 in ?? ()
#4  0x in ?? ()
(gdb)
"
The programs work without gdb.
System: win2000, PII.
The problem seems not to exist on another PC with win2000 and an AMD 
Athlon.

Any hints?


If CPU have no SSE support an exception occurs, but it handled 
properly by program. If running under gdb, it catches this exception.


Maybe other way to detect SSE support exists...

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


Re: [fpc-devel] win32 debugging broken in fixes_2_2?

2007-07-10 Thread Martin Schreiber
On Tuesday 10 July 2007 14.34, Jonas Maebe wrote:
> The rtl checks on startup whether or not your cpu supports SSE. It
> does so by executing an SSE instruction, catching the "illegal
> instruction" exception if it occurs and if so, setting a boolean to
> false.
>
> So just type "continue" in gdb to continue the program.
>
And what should I do in MSEide? Disable SIGILL reporting by gdb?
How does Lazarus handle the problem?

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


Re: [fpc-devel] how to compile RTL for ARM-Linux since r8006

2007-07-10 Thread Bernd Mueller


this compiles without errors. But I would like to get a hardfloat 
enabled RTL again.


What host OS do you use?

I am using Windows 98SE for cross compiling.

Regards, Bernd.
___
fpc-devel maillist  -  fpc-devel@lists.freepascal.org
http://lists.freepascal.org/mailman/listinfo/fpc-devel


Re: [fpc-devel] win32 debugging broken in fixes_2_2?

2007-07-10 Thread Vinzent Hoefler
On Tuesday 10 July 2007 12:40, Yury Sidorov wrote:

> Maybe other way to detect SSE support exists...

CPUID?


Vinzent.

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


Re: [fpc-devel] how to compile RTL for ARM-Linux since r8006

2007-07-10 Thread Yury Sidorov

From: "Bernd Mueller" <[EMAIL PROTECTED]>


this compiles without errors. But I would like to get a hardfloat 
enabled RTL again.


What host OS do you use?

I am using Windows 98SE for cross compiling.


Where arm-linux cross binutils for win32 can be downloaded?

Yury. 
___

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


Re: [fpc-devel] win32 debugging broken in fixes_2_2?

2007-07-10 Thread vsnijders


- Original Message -
From: Martin Schreiber <[EMAIL PROTECTED]>
Date: Tuesday, July 10, 2007 2:44 pm
Subject: Re: [fpc-devel] win32 debugging broken in fixes_2_2?

> On Tuesday 10 July 2007 14.34, Jonas Maebe wrote:
> > The rtl checks on startup whether or not your cpu supports SSE. It
> > does so by executing an SSE instruction, catching the "illegal
> > instruction" exception if it occurs and if so, setting a boolean to
> > false.
> >
> > So just type "continue" in gdb to continue the program.
> >
> And what should I do in MSEide? Disable SIGILL reporting by gdb?
> How does Lazarus handle the problem?
> 

It does not handle it. If you handle it in MSEIDE, please let us know how you 
did it.

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


Re: [fpc-devel] win32 debugging broken in fixes_2_2?

2007-07-10 Thread Vinzent Hoefler
On Tuesday 10 July 2007 09:58, Vinzent Hoefler wrote:
> On Tuesday 10 July 2007 12:40, Yury Sidorov wrote:
> > Maybe other way to detect SSE support exists...
>
> CPUID?

To be more precise, the way recommended by Intel:

"To make this check, execute the CPUID instruction with an argument of 1 
in the EAX register, and check that bit 25 (SSE) and/or bit 26 (SSE2) 
are set to 1."

  -- IA32 Software Developer's Manual,
 Volume 3: System Programming Guide

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


Re: [fpc-devel] how to compile RTL for ARM-Linux since r8006

2007-07-10 Thread Bernd Mueller

Yury Sidorov wrote:

From: "Bernd Mueller" <[EMAIL PROTECTED]>


this compiles without errors. But I would like to get a hardfloat 
enabled RTL again.


What host OS do you use?

I am using Windows 98SE for cross compiling.


Where arm-linux cross binutils for win32 can be downloaded?
I lost the source ;-( but I am going to seek for the download location 
again.


Shall I upload/mail (2.5 MB zipped) the binutils somewhere?

Regards, Bernd.
___
fpc-devel maillist  -  fpc-devel@lists.freepascal.org
http://lists.freepascal.org/mailman/listinfo/fpc-devel


Re: [fpc-devel] win32 debugging broken in fixes_2_2?

2007-07-10 Thread Martin Schreiber
On Tuesday 10 July 2007 14.53, [EMAIL PROTECTED] wrote:
> > And what should I do in MSEide? Disable SIGILL reporting by gdb?
> > How does Lazarus handle the problem?
>
> It does not handle it. If you handle it in MSEIDE, please let us know how
> you did it.
>
The IDE must check where the SIGILL is created, prevent error reporting and 
restart the program if the SIGILL is raised in the FPC SSE checking code...

Question to the FPC developers:
Is there really no other method to check for SSE support?

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


Re: [fpc-devel] win32 debugging broken in fixes_2_2?

2007-07-10 Thread Jonas Maebe


On 10 Jul 2007, at 15:11, Martin Schreiber wrote:


Question to the FPC developers:
Is there really no other method to check for SSE support?


According to the comments of Florian in the code, there is no other  
way which works everywhere.



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


Re: [fpc-devel] how to compile RTL for ARM-Linux since r8006

2007-07-10 Thread Yury Sidorov

From: "Bernd Mueller" <[EMAIL PROTECTED]>

Yury Sidorov wrote:

From: "Bernd Mueller" <[EMAIL PROTECTED]>


this compiles without errors. But I would like to get a 
hardfloat enabled RTL again.


What host OS do you use?

I am using Windows 98SE for cross compiling.


Where arm-linux cross binutils for win32 can be downloaded?
I lost the source ;-( but I am going to seek for the download 
location again.


Shall I upload/mail (2.5 MB zipped) the binutils somewhere?


I compiled binutils myself and yes, the problem is present.
It does not happen when doing make cycle on real arm-linux box.
I will fix this issue.

Yury. 
___

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


Re: [fpc-devel] how to compile RTL for ARM-Linux since r8006

2007-07-10 Thread Bernd Mueller

Yury Sidorov wrote:


I compiled binutils myself and yes, the problem is present.
It does not happen when doing make cycle on real arm-linux box.
I will fix this issue.


thank you very much.

Regards, Bernd.
___
fpc-devel maillist  -  fpc-devel@lists.freepascal.org
http://lists.freepascal.org/mailman/listinfo/fpc-devel


Re: [fpc-devel] how to compile RTL for ARM-Linux since r8006

2007-07-10 Thread Yury Sidorov

From: "Bernd Mueller" <[EMAIL PROTECTED]>

Yury Sidorov wrote:


I compiled binutils myself and yes, the problem is present.
It does not happen when doing make cycle on real arm-linux box.
I will fix this issue.


thank you very much.


Fixed in r8008.

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


Re: [fpc-devel] win32 debugging broken in fixes_2_2?

2007-07-10 Thread Martin Schreiber
On Tuesday 10 July 2007 15.13, Jonas Maebe wrote:
> On 10 Jul 2007, at 15:11, Martin Schreiber wrote:
> > Question to the FPC developers:
> > Is there really no other method to check for SSE support?
>
> According to the comments of Florian in the code, there is no other
> way which works everywhere.
>
Are there other places where SIGILL for checking purposes could be raised out 
of "SYSTEM_FPC_CPUCODEINIT"?
Are there other possible signals which must be handled by the IDE?

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


Re: [fpc-devel] win32 debugging broken in fixes_2_2?

2007-07-10 Thread Jonas Maebe


On 10 Jul 2007, at 15:39, Martin Schreiber wrote:


On Tuesday 10 July 2007 15.13, Jonas Maebe wrote:

On 10 Jul 2007, at 15:11, Martin Schreiber wrote:

Question to the FPC developers:
Is there really no other method to check for SSE support?


According to the comments of Florian in the code, there is no other
way which works everywhere.


Are there other places where SIGILL for checking purposes could be  
raised out

of "SYSTEM_FPC_CPUCODEINIT"?


Not at this time, afaik.


Are there other possible signals which must be handled by the IDE?


I don't think so.


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


Re: [fpc-devel] win32 debugging broken in fixes_2_2?

2007-07-10 Thread Martin Schreiber
On Tuesday 10 July 2007 14.34, Jonas Maebe wrote:
> The rtl checks on startup whether or not your cpu supports SSE. It
> does so by executing an SSE instruction, catching the "illegal
> instruction" exception if it occurs and if so, setting a boolean to
> false.
>
> So just type "continue" in gdb to continue the program.
>
Continue does not work:
"
GNU gdb 6.6
Copyright (C) 2006 Free Software Foundation, Inc.
GDB is free software, covered by the GNU General Public License, and you are
welcome to change it and/or distribute copies of it under certain conditions.
Type "show copying" to see the conditions.
There is absolutely no warranty for GDB.  Type "show warranty" for details.
This GDB was configured as "i686-pc-mingw32"...
(gdb) run
Starting program: G:\testcase\mse\console/console.exe
Loaded symbols for C:\WINNT\system32\KERNEL32.DLL
Loaded symbols for C:\WINNT\system32\OLEAUT32.DLL
Loaded symbols for C:\WINNT\system32\OLE32.DLL
Loaded symbols for C:\WINNT\system32\rpcrt4.dll
Loaded symbols for C:\WINNT\system32\ADVAPI32.DLL
Loaded symbols for C:\WINNT\system32\GDI32.DLL
Loaded symbols for C:\WINNT\system32\USER32.DLL

Program received signal SIGILL, Illegal instruction.
0x00402091 in SYSTEM_FPC_CPUCODEINIT ()
(gdb) c
Continuing.

Program received signal SIGILL, Illegal instruction.
0x00402091 in SYSTEM_FPC_CPUCODEINIT ()
(gdb) c
Continuing.

Program exited with code 0200.
(gdb)
"
And now what to do?

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


Re: [fpc-devel] win32 debugging broken in fixes_2_2?

2007-07-10 Thread Jonas Maebe


On 10 Jul 2007, at 16:39, Martin Schreiber wrote:


Program received signal SIGILL, Illegal instruction.
0x00402091 in SYSTEM_FPC_CPUCODEINIT ()
(gdb) c
Continuing.

Program exited with code 0200.
(gdb)
"
And now what to do?


It seems that either your specific gdb is broken, or that gdb for  
win32 is broken in this regard. By default, gdb's setting for SIGILL  
should be:


(gdb) info handle SIGILL
SignalStop  Print   Pass to program Description
SIGILLYes   Yes Yes Illegal instruction

This means that when a SIGILL occurs, gdb will stop the program and  
print the fact that a SIGILL occurred, but that if you continue it  
should be passed on to the program. The program's exception handler  
will then catch it. E.g., under Linux/i386 on a cpu which does not  
support SSE instructions:


(gdb) r
Starting program: /home/jmaebe/lnxhome/fpc/test/tt2
Reading symbols from shared object read from target memory...done.
Loaded system supplied DSO at 0xb53000

Program received signal SIGILL, Illegal instruction.
FPC_CPUCODEINIT () at i386.inc:1244
1244i386.inc: No such file or directory.
in i386.inc
(gdb) c
Continuing.
0.01
0.01

You can also disable gdb catching SIGILL from the start of the  
program using "handle SIGILL nostop noprint" (in case gdb for win32  
is broken in this respect), but then you should re-enable it later on  
(unless you don't want the debugger to break when an illegal  
instruction is executed).



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


Re: [fpc-devel] win32 debugging broken in fixes_2_2?

2007-07-10 Thread Martin Schreiber
On Tuesday 10 July 2007 17.04, Jonas Maebe wrote:
> It seems that either your specific gdb is broken, or that gdb for
> win32 is broken in this regard. By default, gdb's setting for SIGILL
> should be:
>
> (gdb) info handle SIGILL
> SignalStop  Print   Pass to program Description
> SIGILLYes   Yes Yes Illegal instruction
>
Same with the FPC supplied gdb:
"
G:\testcase\mse\console>E:\FPC\2.0.4\bin\i386-win32\gdb.exe console.exe
GNU gdb 6.2.1
Copyright 2004 Free Software Foundation, Inc.
GDB is free software, covered by the GNU General Public License, and you are
welcome to change it and/or distribute copies of it under certain conditions.
Type "show copying" to see the conditions.
There is absolutely no warranty for GDB.  Type "show warranty" for details.
This GDB was configured as "i686-pc-cygwin"...
(gdb) r
Starting program: /cygdrive/g/testcase/mse/console/console.exe

Program received signal SIGILL, Illegal instruction.
$00402091 in SYSTEM_FPC_CPUCODEINIT ()
(gdb) c
Continuing.

Program received signal SIGILL, Illegal instruction.
$00402091 in SYSTEM_FPC_CPUCODEINIT ()
(gdb) c
Continuing.

Program exited with code 0200.
(gdb) info signal SIGILL
SignalStop  Print   Pass to program Description
SIGILLYes   Yes Yes Illegal instruction
(gdb)
"
Is someone able to reproduce on a PII Windows box?
The test program is attached.

Martin
program console;
{$ifdef FPC}{$mode objfpc}{$h+}{$INTERFACES CORBA}{$endif}
{$ifdef mswindows}{$apptype console}{$endif}
uses
 {$ifdef FPC}{$ifdef linux}cthreads,{$endif}{$endif}
 sysutils;
begin
 writeln('abcde');
end.
___
fpc-devel maillist  -  fpc-devel@lists.freepascal.org
http://lists.freepascal.org/mailman/listinfo/fpc-devel


Re: [fpc-devel] win32 debugging broken in fixes_2_2?

2007-07-10 Thread Jonas Maebe


On 10 Jul 2007, at 17:42, Martin Schreiber wrote:


On Tuesday 10 July 2007 17.04, Jonas Maebe wrote:

It seems that either your specific gdb is broken, or that gdb for
win32 is broken in this regard. By default, gdb's setting for SIGILL
should be:

(gdb) info handle SIGILL
SignalStop  Print   Pass to program Description
SIGILLYes   Yes Yes Illegal instruction


Same with the FPC supplied gdb:


It's quite possible this simply doesn't work properly with gdb for  
Windows. It doesn't either with gdb for Mac OS X, due to gdb  
interfering in the translation of mach signals to unix signals. There  
may be a similar problem with gdb for Windows.



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


Re: [fpc-devel] win32 debugging broken in fixes_2_2?

2007-07-10 Thread Florian Klaempfl
Martin Schreiber schrieb:
> On Tuesday 10 July 2007 14.53, [EMAIL PROTECTED] wrote:
>>> And what should I do in MSEide? Disable SIGILL reporting by gdb?
>>> How does Lazarus handle the problem?
>> It does not handle it. If you handle it in MSEIDE, please let us know how
>> you did it.
>>
> The IDE must check where the SIGILL is created, prevent error reporting and 
> restart the program if the SIGILL is raised in the FPC SSE checking code...
> 
> Question to the FPC developers:
> Is there really no other method to check for SSE support?

No, silly enough. Checking some cpuid result is enough to check if the
CPU supports it. But CPU support doesn't mean OS support. And to check
if the OS supports SSE you've to execute an sse instruction and handle
the exception.
___
fpc-devel maillist  -  fpc-devel@lists.freepascal.org
http://lists.freepascal.org/mailman/listinfo/fpc-devel


Re: [fpc-devel] win32 debugging broken in fixes_2_2?

2007-07-10 Thread Florian Klaempfl
Vinzent Hoefler schrieb:
> On Tuesday 10 July 2007 09:58, Vinzent Hoefler wrote:
>> On Tuesday 10 July 2007 12:40, Yury Sidorov wrote:
>>> Maybe other way to detect SSE support exists...
>> CPUID?
> 
> To be more precise, the way recommended by Intel:
> 
> "To make this check, execute the CPUID instruction with an argument of 1 
> in the EAX register, and check that bit 25 (SSE) and/or bit 26 (SSE2) 
> are set to 1."
> 
>   -- IA32 Software Developer's Manual,
>  Volume 3: System Programming Guide

This gives you only the information that the CPU supports it but not if
the OS supports it.
___
fpc-devel maillist  -  fpc-devel@lists.freepascal.org
http://lists.freepascal.org/mailman/listinfo/fpc-devel


Re: [fpc-devel] win32 debugging broken in fixes_2_2?

2007-07-10 Thread Yury Sidorov

From: "Florian Klaempfl" <[EMAIL PROTECTED]>

Martin Schreiber schrieb:

On Tuesday 10 July 2007 14.53, [EMAIL PROTECTED] wrote:

And what should I do in MSEide? Disable SIGILL reporting by gdb?
How does Lazarus handle the problem?
It does not handle it. If you handle it in MSEIDE, please let us 
know how

you did it.

The IDE must check where the SIGILL is created, prevent error 
reporting and
restart the program if the SIGILL is raised in the FPC SSE checking 
code...


Question to the FPC developers:
Is there really no other method to check for SSE support?


No, silly enough. Checking some cpuid result is enough to check if 
the
CPU supports it. But CPU support doesn't mean OS support. And to 
check
if the OS supports SSE you've to execute an sse instruction and 
handle

the exception.


Florian, to prevent SIGILL on non SSE CPUs we can first check CPUID 
and execute sse instruction only if CPUID reports SSE support.


Yury. 
___

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


Re: [fpc-devel] win32 debugging broken in fixes_2_2?

2007-07-10 Thread Sergei Gorelkin
Wednesday, July 11, 2007, 12:06:51 AM, Florian wrote:

FK> Vinzent Hoefler schrieb:
>> On Tuesday 10 July 2007 09:58, Vinzent Hoefler wrote:
>>> On Tuesday 10 July 2007 12:40, Yury Sidorov wrote:
 Maybe other way to detect SSE support exists...
>>> CPUID?
>> 
>> To be more precise, the way recommended by Intel:
>> 
>> "To make this check, execute the CPUID instruction with an argument of 1 
>> in the EAX register, and check that bit 25 (SSE) and/or bit 26 (SSE2) 
>> are set to 1."
>> 
>>   -- IA32 Software Developer's Manual,
>>  Volume 3: System Programming Guide

> This gives you only the information that the CPU supports it but not if
> the OS supports it.

But, if CPU has no SSE2 support, then OS is unable to support it, too?
And if CPU has SSE2 support, modern OSes probably tend to support it.
Thus, by checking CPUID before attempting to execute an SSE2
instruction you'll be able to exclude exceptions in vast majority of
cases.

-- 
Best regards,
 Sergei


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


[fpc-devel] Merging 7644

2007-07-10 Thread Felipe Monteiro de Carvalho

Hi Jonas,

Was 7644 (force utf-8 encoding on darwin) merged to 2.1.5?

If not, could you do it?

thanks,
--
Felipe Monteiro de Carvalho
___
fpc-devel maillist  -  fpc-devel@lists.freepascal.org
http://lists.freepascal.org/mailman/listinfo/fpc-devel


[fpc-devel] Re: win32 debugging broken in fixes_2_2?

2007-07-10 Thread David Fuchs
Here's a partial work-around:  First, check if CPUID says there's SSE hardware 
support.  If and only if it says "yes", then check for OS support by executing 
an SSE instruction.  This will fix support for systems that don't have SSE 
support in hardware; and it also works for systems with full SSE support.  It 
only leaves problems for systems with SSE hardware support but no OS support 
and a faulty GDB.  That should be a relative minority.
   
  -David Fuchs

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


Re: [fpc-devel] win32 debugging broken in fixes_2_2?

2007-07-10 Thread Martin Schreiber
On Tuesday 10 July 2007 17.04, Jonas Maebe wrote:
> You can also disable gdb catching SIGILL from the start of the
> program using "handle SIGILL nostop noprint" (in case gdb for win32
> is broken in this respect), but then you should re-enable it later on
> (unless you don't want the debugger to break when an illegal
> instruction is executed).
>
Does not work:
"
GNU gdb 6.6
Copyright (C) 2006 Free Software Foundation, Inc.
GDB is free software, covered by the GNU General Public License, and you are
welcome to change it and/or distribute copies of it under certain conditions.
Type "show copying" to see the conditions.
There is absolutely no warranty for GDB.  Type "show warranty" for details.
This GDB was configured as "i686-pc-mingw32"...
(gdb) handle SIGILL nostop noprint
SignalStop  Print   Pass to program Description
SIGILLNoNo  Yes Illegal instruction
(gdb) r
Starting program: G:\msegui\testcase\mse\console/console.exe
Loaded symbols for C:\WINNT\system32\KERNEL32.DLL
Loaded symbols for C:\WINNT\system32\OLEAUT32.DLL
Loaded symbols for C:\WINNT\system32\OLE32.DLL
Loaded symbols for C:\WINNT\system32\rpcrt4.dll
Loaded symbols for C:\WINNT\system32\ADVAPI32.DLL
Loaded symbols for C:\WINNT\system32\GDI32.DLL
Loaded symbols for C:\WINNT\system32\USER32.DLL

Program exited with code 0200.
(gdb)
"
It seems to be a blocking issue for developing with FPC 2.2 on win32 with PII 
processor.

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


Re: [fpc-devel] win32 debugging broken in fixes_2_2?

2007-07-10 Thread Florian Klaempfl
Sergei Gorelkin schrieb:
> Wednesday, July 11, 2007, 12:06:51 AM, Florian wrote:
> 
> FK> Vinzent Hoefler schrieb:
>>> On Tuesday 10 July 2007 09:58, Vinzent Hoefler wrote:
 On Tuesday 10 July 2007 12:40, Yury Sidorov wrote:
> Maybe other way to detect SSE support exists...
 CPUID?
>>> To be more precise, the way recommended by Intel:
>>>
>>> "To make this check, execute the CPUID instruction with an argument of 1 
>>> in the EAX register, and check that bit 25 (SSE) and/or bit 26 (SSE2) 
>>> are set to 1."
>>>
>>>   -- IA32 Software Developer's Manual,
>>>  Volume 3: System Programming Guide
> 
>> This gives you only the information that the CPU supports it but not if
>> the OS supports it.
> 
> But, if CPU has no SSE2 support, then OS is unable to support it, too?
> And if CPU has SSE2 support, modern OSes probably tend to support it.
> Thus, by checking CPUID before attempting to execute an SSE2
> instruction you'll be able to exclude exceptions in vast majority of
> cases.
> 

That's a point though I thought we could safe this extra check because I
didn't expect that a lot of people are still using PII :)

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


Re: [fpc-devel] win32 debugging broken in fixes_2_2?

2007-07-10 Thread Micha Nelissen

Yury Sidorov wrote:

CPU supports it. But CPU support doesn't mean OS support. And to check
if the OS supports SSE you've to execute an sse instruction and handle
the exception.


Florian, to prevent SIGILL on non SSE CPUs we can first check CPUID and 
execute sse instruction only if CPUID reports SSE support.


What happens then if OS doesn't support it ?

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


Re: [fpc-devel] win32 debugging broken in fixes_2_2?

2007-07-10 Thread Florian Klaempfl
Micha Nelissen schrieb:
> Yury Sidorov wrote:
>>> CPU supports it. But CPU support doesn't mean OS support. And to check
>>> if the OS supports SSE you've to execute an sse instruction and handle
>>> the exception.
>>
>> Florian, to prevent SIGILL on non SSE CPUs we can first check CPUID
>> and execute sse instruction only if CPUID reports SSE support.
> 
> What happens then if OS doesn't support it ?

SIGILL on the first sse instruction.
___
fpc-devel maillist  -  fpc-devel@lists.freepascal.org
http://lists.freepascal.org/mailman/listinfo/fpc-devel


Re: [fpc-devel] win32 debugging broken in fixes_2_2?

2007-07-10 Thread Martin Schreiber
On Wednesday 11 July 2007 08.39, Florian Klaempfl wrote:
>
> That's a point though I thought we could safe this extra check because I
> didn't expect that a lot of people are still using PII :)
>
A PII with 256MB ram is my main development machine. Do you see why 
MSEide+MSEgui is so fast? ;-)
From time to time I even use a K6 with win98.

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