AGB  ·  Datenschutz  ·  Impressum  







Anmelden
Nützliche Links
Registrieren
Thema durchsuchen
Ansicht
Themen-Optionen

ASM in Lazarus

Ein Thema von plusplus · begonnen am 30. Jul 2011 · letzter Beitrag vom 2. Sep 2011
Antwort Antwort
Namenloser

Registriert seit: 7. Jun 2006
Ort: Karlsruhe
3.724 Beiträge
 
FreePascal / Lazarus
 
#1

AW: ASM in Lazarus

  Alt 1. Sep 2011, 16:46
Never had a problem from Delphi 3 on and upwards to Delphi XE, I haven't tested in XE2 but I am sure this code works there too.
Maybe the Delphi compiler generates more optimized code that keeps everything in registers and avoids the stack for performance reasons?

I am trying to find a way to do the same in Lazarus. I also tried to make a simple call without any params
(so a simple asm call proc; end; )
and does not work either. I think this is a FPC bug.
That’s strange. What kind of procedure are you calling and how is it declared? (calling convention?)

Also: Have you checked what instructions the FPC compiler actually generates? I don’t know if FPC/Lazarus comes with a debugger like the one included in Delphi where you can set a breakpoint somewhere in the source code and then switch to the cpu pane to see the generated asm code... that would be the easiest way. If there isn’t such a thing, you could always put an asm int 3; end; (which acts as a breakpoint) at the beginning of the routine and run it through an ordinary debugger (though it will be more difficult to figure out which opcodes correspond to which instruction in the source code that way). If it really is a bug in FPC, you may spot something here.
  Mit Zitat antworten Zitat
Antwort Antwort


Forumregeln

Es ist dir nicht erlaubt, neue Themen zu verfassen.
Es ist dir nicht erlaubt, auf Beiträge zu antworten.
Es ist dir nicht erlaubt, Anhänge hochzuladen.
Es ist dir nicht erlaubt, deine Beiträge zu bearbeiten.

BB-Code ist an.
Smileys sind an.
[IMG] Code ist an.
HTML-Code ist aus.
Trackbacks are an
Pingbacks are an
Refbacks are aus

Gehe zu:

Impressum · AGB · Datenschutz · Nach oben
Alle Zeitangaben in WEZ +1. Es ist jetzt 10:10 Uhr.
Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
LinkBacks Enabled by vBSEO © 2011, Crawlability, Inc.
Delphi-PRAXiS (c) 2002 - 2023 by Daniel R. Wolf, 2024-2025 by Thomas Breitkreuz