Re: [fpc-devel] register allocator seems to be using S20 for two things at the same time (related to armhf porting work)

2012-03-19 Thread Daniël Mantione



Op Sun, 18 Mar 2012, schreef peter green:

My suspiscion was that the compiler was trying to spill but not actually 
generating any code to implement the spill.


I added a debug writeln to setbitmap and it does seem to be being called with 
both 50,70 and 70,50. Full output is at http://pastebin.com/3jd8zNkh


Okay, it is quite unlikely that the register allocator itself ignores such 
an interference, so you may be rigth it tries to spill but nothing 
happens.


You can check this by adding a breakpoint in Trgobj.spill_registers and 
and check the contents of spillednodes, or the value of t in the loop that 
iterates through it.


If the register is being spilled, Trgobj.spill_register will call 
Trgobj.instr_spill_register to modify an instruction using the 
register. This procedure will in turn call the CPU specific procedures 
Trgcpu.do_spill_read and Trgcpu.do_spill_written to modify the code.


Do_spill_read and do_spill_written are the routines to check if they 
contain the right support for mregisters (I don't see any specific code 
there at the moment).


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


Re: [fpc-devel] TMSSQLConnection - sqlDB component for accessing MS SQL Server

2012-03-19 Thread LacaK

michael.vancann...@wisa.be  wrote / napísal(a):



On Thu, 15 Mar 2012, Marcos Douglas wrote:


On Mon, Feb 27, 2012 at 9:33 AM, Marcos Douglas m...@delfire.net wrote:

On Mon, Feb 27, 2012 at 5:08 AM,  michael.vancann...@wisa.be wrote:



On Mon, 27 Feb 2012, LacaK wrote:


Hi,
let me share same basic info/ideas about TMSSQLConnection :
1. As Marcos wrote it is descendant of sql-db TSQLConnection class 
and

provides native connector for MS SQL Servers and Sybase servers
2. is depends/requires on FreeTDS open-source cross platform 
DB-Library

(alternatively can be used also Microsoft db-library ntwdblib.dll)
3. all what is needed are 2-3 files:
- mssqlconn.pp (implementation of TMSSQLConnection and 
TSybaseConnection)

- dblib.pp (interface to FreeTDS db-library ABI dblib.dll on Windows,
libsybdb.so on *NIX)
- readme.txt (some info for users/developers)
4. according to market share of MS SQL Server and Sybase there may 
be many

users, which will welcome alternative to TODBCConnection
5. there is on http://www.freepascal.org/future.var in Improve the
database support  Drivers (descendants) for more database 
types so I

understand it as FPC is open for new stuff ;-)
6. if there is any problem please let us know. If you decide to 
include it
into fcl-db then you can place files for example into 
src/sqldb/mssql folder

;-)



I will have a look and include both units.


And the dream will become true... Thanks Michael.
Any chance to merge in fixes_2_6 in short time?

Marcos Douglas


Hi Michael,
Do you have some prediction to include the sources?



My apologies, I had totally forgotten; I am buried in work currently.

Committed in revision 20522. I didn't commit any examples or tests. 
Please test if everything works OK. I compiled on Linux 64-bit, I 
don't have

a working FPC/Lazarus 32-bit windows development environment currently.

Hi Michael,
splitting files into two packages was unavoidable?
I would prefer If all 3 files will be in one folder (sqldb/mssql) 
together (it seems to me simpler and more convenient).

(because they are strongly related each to other)
Thanks
-Laco.
___
fpc-devel maillist  -  fpc-devel@lists.freepascal.org
http://lists.freepascal.org/mailman/listinfo/fpc-devel


Re: [fpc-devel] TMSSQLConnection - sqlDB component for accessing MS SQL Server

2012-03-19 Thread michael . vancanneyt



On Mon, 19 Mar 2012, LacaK wrote:


michael.vancann...@wisa.be  wrote / napísal(a):



On Thu, 15 Mar 2012, Marcos Douglas wrote:


On Mon, Feb 27, 2012 at 9:33 AM, Marcos Douglas m...@delfire.net wrote:

On Mon, Feb 27, 2012 at 5:08 AM,  michael.vancann...@wisa.be wrote:



On Mon, 27 Feb 2012, LacaK wrote:


Hi,
let me share same basic info/ideas about TMSSQLConnection :
1. As Marcos wrote it is descendant of sql-db TSQLConnection class and
provides native connector for MS SQL Servers and Sybase servers
2. is depends/requires on FreeTDS open-source cross platform DB-Library
(alternatively can be used also Microsoft db-library ntwdblib.dll)
3. all what is needed are 2-3 files:
- mssqlconn.pp (implementation of TMSSQLConnection and 
TSybaseConnection)

- dblib.pp (interface to FreeTDS db-library ABI dblib.dll on Windows,
libsybdb.so on *NIX)
- readme.txt (some info for users/developers)
4. according to market share of MS SQL Server and Sybase there may be 
many

users, which will welcome alternative to TODBCConnection
5. there is on http://www.freepascal.org/future.var in Improve the
database support  Drivers (descendants) for more database types so 
I

understand it as FPC is open for new stuff ;-)
6. if there is any problem please let us know. If you decide to include 
it
into fcl-db then you can place files for example into src/sqldb/mssql 
folder

;-)



I will have a look and include both units.


And the dream will become true... Thanks Michael.
Any chance to merge in fixes_2_6 in short time?

Marcos Douglas


Hi Michael,
Do you have some prediction to include the sources?



My apologies, I had totally forgotten; I am buried in work currently.

Committed in revision 20522. I didn't commit any examples or tests. Please 
test if everything works OK. I compiled on Linux 64-bit, I don't have

a working FPC/Lazarus 32-bit windows development environment currently.

Hi Michael,
splitting files into two packages was unavoidable?


Yes.

As you can see for the other databases, we always keep the header imports 
separate from the components. Standard time-tested practice.


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


Re: [fpc-devel] TMSSQLConnection - sqlDB component for accessing MS SQL Server

2012-03-19 Thread LacaK



Hi Michael,
splitting files into two packages was unavoidable?


Yes.

As you can see for the other databases, we always keep the header 
imports separate from the components. Standard time-tested practice.



Hm, although I am not happy with this, I can do nothing with it ;-)
Then I have minor comments:
- in packages/dblib/fpmake.pp at line 23: Author put please instead of 
Lacak2 Ladislav Karrach (as in dblib.pp header)
- in packages/fcl-db/src/sqldb/mssql/makefile.fpc at line 2: change 
IBConnection to MSSQLConnection ;-)


And will you apply also diffs to fcl-db tests ? So we can run complete 
test suite ...

Thanks
-Laco.

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


Re: [fpc-devel] TMSSQLConnection - sqlDB component for accessing MS SQL Server

2012-03-19 Thread michael . vancanneyt



On Mon, 19 Mar 2012, LacaK wrote:




Hi Michael,
splitting files into two packages was unavoidable?


Yes.

As you can see for the other databases, we always keep the header imports 
separate from the components. Standard time-tested practice.



Hm, although I am not happy with this, I can do nothing with it ;-)
Then I have minor comments:
- in packages/dblib/fpmake.pp at line 23: Author put please instead of 
Lacak2 Ladislav Karrach (as in dblib.pp header)
- in packages/fcl-db/src/sqldb/mssql/makefile.fpc at line 2: change 
IBConnection to MSSQLConnection ;-)


Done. Rev. 20540 and 20541.



And will you apply also diffs to fcl-db tests ? So we can run complete test 
suite ...


I will do so later today.

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


[fpc-devel] class section (public, private) in debug info

2012-03-19 Thread Martin

Is this an FPC issue or gdb?
Tested with fpc 2.6 / gdb 7.3-2 , win 32

Stabs, seems to have the right sections for fields.
Stabs also shows methods, but they seem to be without any info about 
class sections


Dwarf (see below) everything seems to be public:
Dwarf does not seem to show methods

 TCmdLineDebugger.SendCmdLn ptype TCOMPONENT
 TCmdLineDebugger.ReadLn ~type = ^TCOMPONENT = class : public 
TPERSISTENT \n

 TCmdLineDebugger.ReadLn ~  public\n
 TCmdLineDebugger.ReadLn ~FOWNER : TCOMPONENT;\n
 TCmdLineDebugger.ReadLn ~FNAME : ANSISTRING;\n
 TCmdLineDebugger.ReadLn ~FTAG : LONGINT;\n
 TCmdLineDebugger.ReadLn ~FCOMPONENTS : TFPLIST;\n
 TCmdLineDebugger.ReadLn ~FFREENOTIFIES : TFPLIST;\n
 TCmdLineDebugger.ReadLn ~FDESIGNINFO : LONGINT;\n
 TCmdLineDebugger.ReadLn ~FVCLCOMOBJECT : POINTER;\n
 TCmdLineDebugger.ReadLn ~FCOMPONENTSTATE : TCOMPONENTSTATE;\n
 TCmdLineDebugger.ReadLn ~FCOMPONENTSTYLE : TCOMPONENTSTYLE;\n
 TCmdLineDebugger.ReadLn ~COMPONENTSTATE : TCOMPONENTSTATE;\n
 TCmdLineDebugger.ReadLn ~COMPONENTSTYLE : TCOMPONENTSTYLE;\n
 TCmdLineDebugger.ReadLn ~DESIGNINFO : LONGINT;\n
 TCmdLineDebugger.ReadLn ~OWNER : TCOMPONENT;\n
 TCmdLineDebugger.ReadLn ~VCLCOMOBJECT : POINTER;\n
 TCmdLineDebugger.ReadLn ~NAME : ANSISTRING;\n
 TCmdLineDebugger.ReadLn ~TAG : LONGINT;\n
 TCmdLineDebugger.ReadLn ~end\n
 TCmdLineDebugger.ReadLn ^done
___
fpc-devel maillist  -  fpc-devel@lists.freepascal.org
http://lists.freepascal.org/mailman/listinfo/fpc-devel


[fpc-devel] preserve case in debug info

2012-03-19 Thread Martin

I know -gp works for stabs.
Is there a way for dwarf too?
___
fpc-devel maillist  -  fpc-devel@lists.freepascal.org
http://lists.freepascal.org/mailman/listinfo/fpc-devel


Re: [fpc-devel] register allocator seems to be using S20 for two things at the same time (related to armhf porting work)

2012-03-19 Thread peter green




Okay, it is quite unlikely that the register allocator itself ignores 
such an interference, so you may be rigth it tries to spill but 
nothing happens.


Ok that wasn't the issue but you were right about not being the register 
allocator.


Turns out the actual cause was a one character typo in armreg.dat (no I 
didn't introduce it).


S30,$04,$06,$0F,s20,0,0

Should be

S30,$04,$06,$0F,s20,0,0

So it was assigning two different registers as it should but when it 
came to actually write out the assembler file it wrote out s20 for both 
of them.


The good news is that all test cases involving up to 15 parameters 
(including the 14 singles one double case I was discussing) are now 
fixed :)
The bad news is that a number of testcases are still failing. Next on my 
list is 16 singles.


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