Sign in Join

Live chat for Free Pascal, Lazarus, Delphi and every Pascal programmer.

Mailing lists / fpc-devel / 2000-11

BUG in BASEGO32 snapshot 18:18:52 Fri 17/11/00 (322)

9 messages · 5 people · –

Reply by email Subscribe to this list Your subscription

Read-only archive. Use j and k to move between messages.

Michael Knapp

GraphiX is currently a quite good "Bug-Finder for FPC", not a graphics library ...
I'm not happy about that ...

VAR x,y:dword;
BEGIN
  x:=1000;
  y:=((x DIV 1000) SHL 28)+   { $10000000 }
     ((x DIV 1000) SHL 24)+   { $01000000 }
     ((x DIV 1000) SHL 20);   { $00100000 }
  writeln('the result is ',y);
  writeln('but it should be 286261248 = $11100000');
(* The Assembler Output:

# [6] x:=1000;
movl $1000,_X
# [7] y:=((x DIV 1000) SHL 28)+ { $10000000 }
movl _X,%eax eax=1000d
movl $1000,%edi edi=1000d
xorl %edx,%edx edx=0
idivl %edi eax=1,edx=0
shll $28,%eax eax=10000000h
# [8] ((x DIV 1000) SHL 24)+ { $01000000 }
movl _X,%edx edx=1000d
movl $1000,%edi edi=1000d
pushl %eax push eax=10000000h
movl %edx,%eax eax=1000d
xorl %edx,%edx edx=0
idivl %edi eax=1,edx=0
movl %eax,%edx edx=1
popl %eax pop eax=10000000h
shll $24,%edx edx=01000000h
addl %eax,%edx edx=11000000h
# [9] ((x DIV 1000) SHL 20); { $00100000 }
movl _X,%eax eax=1000d
movl $1000,%edi edi=1000d
xorl %edx,%edx edx=0 >>> here the edx=11000000 is overwritten !!!
idivl %edi eax=1, edx=0
shll $20,%eax eax=00100000h
addl %edx,%eax eax=00100000h
movl %eax,_Y y=00100000h
*)

END.

-----

Michael

+--------------------------------------------------------------------+ | Michael Knapp - Mauerbach - Niederösterreich - Austria - Europe | | E-Mail: ICQ: 36542787 | +--------------------------------------------------------------------+ | G r a p h i X http://programmierer.freepage.de/graphix/ | | Graphics Library for Freepascal, Virtual Pascal and Borland Pascal | | http://graphix4pascal.cjb.net/ http://www.graphix4pascal.de.vu/ | +--------------------------------------------------------------------+

Reply by email

Michael Knapp
to Michael Knapp
Michael Knapp wrote 6 lines
GraphiX is currently a quite good "Bug-Finder for FPC", not a graphics library ... I'm not happy about that ... VAR x,y:dword;

should be "longint" instead of "dword"
but with "dword" the bug occours, too

Michael

+--------------------------------------------------------------------+ | Michael Knapp - Mauerbach - Niederösterreich - Austria - Europe | | E-Mail: ICQ: 36542787 | +--------------------------------------------------------------------+ | G r a p h i X http://programmierer.freepage.de/graphix/ | | Graphics Library for Freepascal, Virtual Pascal and Borland Pascal | | http://graphix4pascal.cjb.net/ http://www.graphix4pascal.de.vu/ | +--------------------------------------------------------------------+

Reply by email

Florian Klaempfl
to Michael Knapp: GraphiX is currently a quite good "Bug-Finder for FPC", not a graphics library ... I'm…

At 00:34 19.11.00 +0100, you wrote:

I guess it's a snapshot based on 1.1?

GraphiX is currently a quite good "Bug-Finder for FPC", not a graphics library ...

We're sorry about this.

I'm not happy about that ...

With the 1.0.2 release compiler it works fine, so there is no reason to be unhappy ;)

Seriously, the 1.1 branch is still under heavy development so such things may happen and it will be fixed asap.

Reply by email

Florian Klaempfl
to Michael Knapp
you wrote 5 lines
Florian Klaempfl wrote: > With the 1.0.2 release compiler it works fine, so there > is no reason to be unhappy ;) with 1.0.2 I have the Bug Nr. 1222 problem ...

Hmmm, this is fixed in the fixes branch, but I don't think that snapshots are generated from the fixes branch?!?

Reply by email

Dirk Verwiebe
to Florian Klaempfl

Perhaps it is better to generate snapshots of the fixes branch as long as FPC 1.1 is not working correct ?

Show quoted text 13 lines
At 17:11 19.11.00 +0100, you wrote: >Florian Klaempfl wrote: > > With the 1.0.2 release compiler it works fine, so there > > is no reason to be unhappy ;) > >with 1.0.2 I have the Bug Nr. 1222 problem ... Hmmm, this is fixed in the fixes branch, but I don't think that snapshots are generated from the fixes branch?!? _______________________________________________ fpc-devel maillist - http://lists.freepascal.org/mailman/listinfo/fpc-devel

Reply by email

Peter Vreman
to Dirk Verwiebe
Perhaps it is better to generate snapshots of the fixes branch as long as FPC 1.1 is not working correct ?

But then the new features can't be used.

You can create your own snapshot from the fixes branch. There is a daily source zipfile from the branch available.

Peter

Reply by email

Dirk Verwiebe
to Peter Vreman
> Perhaps it is better to generate snapshots of the fixes branch as long > as FPC 1.1 is not working correct ? But then the new features can't be used.

That´s true.

You can create your own snapshot from the fixes branch. There is a daily source zipfile from the branch available.

I make my own snapshots but i can´t make the IDE so i asked for providing the 1.03 IDE snapshot .
Or maybe it is legal if the developers provide the needed ppu files(not source) of freevision ?

Show quoted text 6 lines
Peter _______________________________________________ fpc-devel maillist - http://lists.freepascal.org/mailman/listinfo/fpc-devel

Reply by email

Jonas Maebe
Show quoted text 13 lines
GraphiX is currently a quite good "Bug-Finder for FPC", not a graphics library ... I'm not happy about that ... VAR x,y:dword; BEGIN x:=1000; y:=((x DIV 1000) SHL 28)+ { $10000000 } ((x DIV 1000) SHL 24)+ { $01000000 } ((x DIV 1000) SHL 20); { $00100000 } writeln('the result is ',y); writeln('but it should be 286261248 = $11100000');

Fixed. It was also buggy in the fixes branch btw, I introduced that bug while fixing something else.

Jonas

Reply by email