EASy68K  
It is currently Sat Mar 25, 2017 5:46 am

All times are UTC




Post new topic Reply to topic  [ 5 posts ] 
Author Message
PostPosted: Mon May 26, 2014 9:56 am 
Offline

Joined: Thu Feb 16, 2012 4:34 pm
Posts: 15
Hi,

I am unclear how branches are assembled: I find branches assembled with 2 bytes, but also many with 4 Bytes, although 2 bytes would be possible.
And I could not find any flag to influence this behavior ("optimize" or "always use smallest instruction length" or the like) so I had to force a 2 bytes assembly by putting "Bcc.S" in lots of cases.

Can you please give some hints how the decisions is taken whether or not a branch will be assembled wit 2 of 4 bytes?

Thanks in advance


Top
 Profile  
Reply with quote  
PostPosted: Mon May 26, 2014 4:10 pm 
Offline
User avatar

Joined: Thu Dec 16, 2004 6:42 pm
Posts: 1035
Location: Monroe County Community College, Monroe Michigan, U.S.A.
Bcc.S to force short branch.
Bcc.L to force long branch.

If no size designation is specified, the assembler will automatically optimize backward branches but not forward branches.

_________________
Prof. Kelly


Top
 Profile  
Reply with quote  
PostPosted: Mon May 26, 2014 5:07 pm 
Offline

Joined: Thu Feb 16, 2012 4:34 pm
Posts: 15
Oh thanks - this criteria (backwards vs. forward) did not come to my mind. Would such an "optimizing flag" be an item for the wishlist? :-)

Rgds


Top
 Profile  
Reply with quote  
PostPosted: Mon May 26, 2014 7:58 pm 
Offline
User avatar

Joined: Thu Dec 16, 2004 6:42 pm
Posts: 1035
Location: Monroe County Community College, Monroe Michigan, U.S.A.
Adding optimization of forward branches would require major modifications to the assembler. You may add it to the wish list but it is not something that I will have time to implement. Perhaps someone else will take up the challenge.

_________________
Prof. Kelly


Top
 Profile  
Reply with quote  
PostPosted: Mon May 26, 2014 8:11 pm 
Offline

Joined: Thu Feb 16, 2012 4:34 pm
Posts: 15
Thanks, interesting; anyway, it was meant to be more a feedback than a requirement.
Just struggled with a 5000 lines listing and in this case it would have saved quite some time :-)
Next time some awk-script will do the remaining job, if the code size really justifies it.

Rgds


Top
 Profile  
Reply with quote  
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 5 posts ] 

All times are UTC


Who is online

Users browsing this forum: No registered users and 1 guest


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 post attachments in this forum

Search for:
Jump to:  
cron
Powered by phpBB® Forum Software © phpBB Group