View Single Post
Old 17 May 2019, 13:13   #40
Don_Adan
Registered User
 
Join Date: Jan 2008
Location: Warsaw/Poland
Age: 55
Posts: 1,975
Quote:
Originally Posted by phx View Post
Correct! I thought it would be a good idea to pad code sections with NOP, when their size is not a multiple of four. So a linker can merge two halfs of a function without any risk.

But I didn't have -databss in mind. So now I'm leaving it zero when the filesize is smaller than the section size.


Yes, personal taste. I like to have optimizations enabled all the time, because situations where the instruction size matters are rare (e.g. jump-tables).

Run vasm with -devpac in Devpac-compatibility mode and there will be no optimizations until you enable them. Or make sure there will be none with an "OPT O-" directive on top or a -no-opt command line option.
Padding code sections with NOP is not good idea. I never like this. Especially when I resourced code. Only padding with dc.w 0 or $4AFC in debug mode has sense for me. I dont like auto optimisations too. If i used bra.w then it must be bra.w, not bra.b.
Don_Adan is offline  
 
Page generated in 0.04236 seconds with 11 queries