flat assembler
Message board for the users of flat assembler.

Index > Main > OCG

Author
Thread Post new topic Reply to topic
kalambong



Joined: 08 Nov 2008
Posts: 165
kalambong 22 Apr 2009, 02:37
Read an article about OCG (Omniscient Code Generation) and get pretty impressed, so I'll post just one question here ---

What it takes to implement OCG (or similar technique) for FASM?

More info on OCG can be found at the below addresses:

http://www.industrial-embedded.com/articles/id/?3030

http://gaubuali.wordpress.com/2008/10/23/compilation-strategies-for-the-pic32

.... or you can simply google for "Omniscient Code Generation".

Thank you !
Post 22 Apr 2009, 02:37
View user's profile Send private message Reply with quote
Goplat



Joined: 15 Sep 2006
Posts: 181
Goplat 22 Apr 2009, 02:54
FASM is just an assembler, not a compiler, so it's up to the programmer to be omniscient Smile
Post 22 Apr 2009, 02:54
View user's profile Send private message Reply with quote
revolution
When all else fails, read the source


Joined: 24 Aug 2004
Posts: 20363
Location: In your JS exploiting you and your system
revolution 22 Apr 2009, 08:39
kalambong wrote:
What it takes to implement OCG (or similar technique) for FASM?
It would probably be possible to have automatic register usage generation.
Code:
proc MyProc uses reg1 reg2, parameter1, ...    
So perhaps we could eliminate the uses clause with some complicated set of macros or internally alter the source code. This would fix you to a particular calling convention though.

Perhaps also automatic structure alignment and reordering.
Code:
struc MyStruc {
 .x db ?
 .y dw ?
 .z dd ?
}    
We could apply two different "optimisations" that that. First we could automatically reorder it to get all members aligned (.z, .y then .x) or secondly we could automatically insert padding to get the wanted alignment. But again it assumes a particular usage model.

Probably lots of other things we could do.
Post 22 Apr 2009, 08:39
View user's profile Send private message Visit poster's website Reply with quote
kalambong



Joined: 08 Nov 2008
Posts: 165
kalambong 23 Apr 2009, 05:13
It's perfectly okay by me if you guys want to put the OCG idea in the back burner for now, for 1.68 has just been released.

But it would be superbly wonderful if FASM gets some OCG-type of enhancements in 1.69.x. Smile

Thanks all !
Post 23 Apr 2009, 05:13
View user's profile Send private message Reply with quote
revolution
When all else fails, read the source


Joined: 24 Aug 2004
Posts: 20363
Location: In your JS exploiting you and your system
revolution 23 Apr 2009, 05:16
kalambong wrote:
for 1.68 has just been released.
You are the second person to say that, but where is the release?
Post 23 Apr 2009, 05:16
View user's profile Send private message Visit poster's website Reply with quote
pal



Joined: 26 Aug 2008
Posts: 227
pal 23 Apr 2009, 07:21
1.68 has been released? I can only find 1.67.38 anywhere...
Post 23 Apr 2009, 07:21
View user's profile Send private message Reply with quote
Azu



Joined: 16 Dec 2008
Posts: 1159
Azu 23 Apr 2009, 16:06
pal wrote:
1.68 has been released? I can only find 1.67.38 anywhere...
Same here, Anyone have a link to the download?
Post 23 Apr 2009, 16:06
View user's profile Send private message Send e-mail AIM Address Yahoo Messenger 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-2024, Tomasz Grysztar. Also on GitHub, YouTube.

Website powered by rwasa.