flat assembler
Message board for the users of flat assembler.

Index > Windows > Some work to do in 64-bit world

Author
Thread Post new topic Reply to topic
vid
Verbosity in development


Joined: 05 Sep 2003
Posts: 7105
Location: Slovakia
vid
FASM lacks support for 64bit conventions (i think there were some macros, but i think they didn't work right), and also "proc" can't build exception data in PE header, which are replacement for dynamic SEH in FS segment.

MazeGen is creating such macros right now for 64bit MASM (even it doesn't have proper support for 64bit programming), so we could take them from him and adapt to FASM. I believe no assembler has support for generating these data right now.
Post 24 Aug 2006, 13:10
View user's profile Send private message Visit poster's website AIM Address MSN Messenger ICQ Number Reply with quote
Tomasz Grysztar
Assembly Artist


Joined: 16 Jun 2003
Posts: 7715
Location: Kraków, Poland
Tomasz Grysztar
Exception data? I recall there always was a "Exception" directory in the PE format (you couuld create it with "data 3"), but I never really knew what is it for. Wink
Post 24 Aug 2006, 13:17
View user's profile Send private message Visit poster's website Reply with quote
vid
Verbosity in development


Joined: 05 Sep 2003
Posts: 7105
Location: Slovakia
vid
yes, it's something like statical SEH info, instead of filling one on-the-run. It's "standard" for PE64, and for WinCE PE files, and maybe others.

search for "In the x86 world, exception handling is stack-based." here:
http://msdn.microsoft.com/msdnmag/issues/06/05/x64/default.aspx

ugly specs here:
http://msdn2.microsoft.com/en-us/library/0kd71y96.aspx

limited support for this in MASM described here:
http://msdn2.microsoft.com/en-us/library/ms235231.aspx

something here:
http://www.milw0rm.com/papers/68

this should also go to public, i think
Post 24 Aug 2006, 13:26
View user's profile Send private message Visit poster's website AIM Address MSN Messenger ICQ Number Reply with quote
vid
Verbosity in development


Joined: 05 Sep 2003
Posts: 7105
Location: Slovakia
vid
oh, and how about macros for calling in 64bit mode? i remember you described them somewhere, but can't find it now.

are you aligning stack to 16bytes as required?
Post 24 Aug 2006, 13:29
View user's profile Send private message Visit poster's website AIM Address MSN Messenger ICQ Number Reply with quote
Tomasz Grysztar
Assembly Artist


Joined: 16 Jun 2003
Posts: 7715
Location: Kraków, Poland
Tomasz Grysztar
There's PROC64.INC in the fasmw package (for quite a long time, the history here: http://board.flatassembler.net/topic.php?t=4209). Yes, it does the 16-byte alignments.
Post 24 Aug 2006, 13:42
View user's profile Send private message Visit poster's website Reply with quote
vid
Verbosity in development


Joined: 05 Sep 2003
Posts: 7105
Location: Slovakia
vid
think about adding ability to generate exception data to proc macros. Talk with mazegen for some more help (he is very helpful kind btw.)
Post 24 Aug 2006, 13:46
View user's profile Send private message Visit poster's website AIM Address MSN Messenger ICQ Number Reply with quote
Tomasz Grysztar
Assembly Artist


Joined: 16 Jun 2003
Posts: 7715
Location: Kraków, Poland
Tomasz Grysztar
But why is it needed in "proc" macro itself?
Post 24 Aug 2006, 17:42
View user's profile Send private message Visit poster's website Reply with quote
vid
Verbosity in development


Joined: 05 Sep 2003
Posts: 7105
Location: Slovakia
vid
where elsewhere can you collect info about PROCEDURES?
Post 24 Aug 2006, 22:07
View user's profile Send private message Visit poster's website AIM Address MSN Messenger ICQ Number Reply with quote
Tomasz Grysztar
Assembly Artist


Joined: 16 Jun 2003
Posts: 7715
Location: Kraków, Poland
Tomasz Grysztar
But which procedures?
I'm against the label-racism that makes some labels more important than others. Wink
Well, just kidding. But I wanted to say: actually I'm completely ignorant and have no idea why something related to exceptions would need information about all my procedures. And is it related to procedure entry points (where the "label discrimination" would happen Wink) or to diving the code into area of different procedures (the thing I don't like the most about the procs, BTW, but - you know - I'm one of these strange guys that refuse to understand what is so nifty about the structural programming).
Post 24 Aug 2006, 22:54
View user's profile Send private message Visit poster's website Reply with quote
vid
Verbosity in development


Joined: 05 Sep 2003
Posts: 7105
Location: Slovakia
vid
maybe you could add OPTION to proc macro (like "c" to define __ccall procedure), that will add exception data for this procedure, maybe in style of "idata" macros. Not entire code area has to be covered by these structures, so you use it only when you wish.

Right now i am afraid these data are required in some cases, see end of FASMARM thread. btw, there is also example (for ARM processor) how to build this section.
Post 25 Aug 2006, 10:44
View user's profile Send private message Visit poster's website AIM Address MSN Messenger ICQ Number Reply with quote
Display posts from previous:
Post new topic Reply to topic

Jump to:  


< Last Thread | Next Thread >
Forum Rules:
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You cannot attach files in this forum
You can download files in this forum


Copyright © 1999-2020, Tomasz Grysztar.

Powered by rwasa.