Sign in Join

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

Mailing lists / fpc-devel / 2007-12

ASM on Win64

7 messages · 5 people ·

Reply by email Subscribe to this list Your subscription

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

Henrick Hellström

Hello everyone,

Before asking too many questions already answered, is there any comprehensive up to date documentation of asm usage for the Win64 target?

(Yes, I have googled the archive of this list, but since the compiler is still under active development, I didn't think it might be a good idea to trust information posted here often more than two years ago. The information about the Win64 target that I found at http://www.freepascal.org/docs.html is either incomplete or missing completely.)

I am in particular interested in:

1. Since there is no CPU debug window in Lazarus Win64, I tried the -A option, but it doesn't seem to work with the compiler bundled with Lazarus Win64. I tried -aASW, -AASW and a couple of other combinations. Am I missing something obvious?

2. I couldn't find information about the calling convention under Win64 on the documentation page. Does FPC support the unified MSVC++ calling convention for Win64 that is very similar to Register+stack frames? Does it, like MSVC++, *only* support that calling convention?

Reply by email

Jonas Maebe
to Henrick Hellström
Henrick Hellström wrote
1. Since there is no CPU debug window in Lazarus Win64, I tried the -A option, but it doesn't seem to work with the compiler bundled with Lazarus Win64. I tried -aASW, -AASW and a couple of other combinations. Am I missing something obvious?

The option -a, not -A (and -al if you want Pascal + assembler source).

Show quoted text 5 lines
2. I couldn't find information about the calling convention under Win64 on the documentation page. Does FPC support the unified MSVC+ + calling convention for Win64 that is very similar to Register +stack frames? Does it, like MSVC++, *only* support that calling convention?

Afaik, yes.

Jonas

Reply by email

Henrick Hellström
to Jonas Maebe
Jonas Maebe wrote 9 lines
On 17 Dec 2007, at 15:32, Henrick Hellström wrote: > 1. Since there is no CPU debug window in Lazarus Win64, I tried the > -A option, but it doesn't seem to work with the compiler bundled with > Lazarus Win64. I tried -aASW, -AASW and a couple of other > combinations. Am I missing something obvious? The option -a, not -A (and -al if you want Pascal + assembler source).

Thanks, adding just -al without a parameter gave me an *.s file containing to the asm output for the Lazarus project file.

Not sure if this is the right place to ask, but how do I produce *.s files for the other units in the project? I suppose adding {$output_format (something)} at the top of the unit should do the trick, but I can't get that to work either.

Reply by email

Florian Klaempfl
to Henrick Hellström
Show quoted text 13 lines
Jonas Maebe wrote: > > On 17 Dec 2007, at 15:32, Henrick Hellström wrote: > >> 1. Since there is no CPU debug window in Lazarus Win64, I tried the >> -A option, but it doesn't seem to work with the compiler bundled with >> Lazarus Win64. I tried -aASW, -AASW and a couple of other >> combinations. Am I missing something obvious? > > The option -a, not -A (and -al if you want Pascal + assembler source). Thanks, adding just -al without a parameter gave me an *.s file containing to the asm output for the Lazarus project file.

Simply rebuild all your units, you might need -s as well to prevent errors because of a missigng assembler.

Show quoted text 13 lines
Not sure if this is the right place to ask, but how do I produce *.s files for the other units in the project? I suppose adding {$output_format (something)} at the top of the unit should do the trick, but I can't get that to work either. ------------------------------------------------------------------------ _______________________________________________ fpc-devel maillist - http://lists.freepascal.org/mailman/listinfo/fpc-devel

Reply by email

Vincent Snijders
to Henrick Hellström: Thanks, adding just -al without a parameter gave me an *.s file containing to the asm…
Henrick Hellström wrote 18 lines
Jonas Maebe wrote: > > On 17 Dec 2007, at 15:32, Henrick Hellström wrote: > >> 1. Since there is no CPU debug window in Lazarus Win64, I tried the >> -A option, but it doesn't seem to work with the compiler bundled with >> Lazarus Win64. I tried -aASW, -AASW and a couple of other >> combinations. Am I missing something obvious? > > The option -a, not -A (and -al if you want Pascal + assembler source). Thanks, adding just -al without a parameter gave me an *.s file containing to the asm output for the Lazarus project file. Not sure if this is the right place to ask, but how do I produce *.s files for the other units in the project? I suppose adding {$output_format (something)} at the top of the unit should do the trick, but I can't get that to work either.

Just make sure that the unit gets recompiled, either by doing a build all, removing the existing ppu or making a change in the source.

Vincent

Reply by email