Quote:
Originally Posted by Den
I agree this is not a "desired" behaviour and that the label should be updated when the instruction that immediately follows it is auto-aligned, be it on the same line, or even 10 (empty) lines below.
|
I tend to disagree.
This behaviour is intended. You can never say whether an alone-standing label belongs to the source above or below it. Example:
Code:
strstart:
dc.b "abc"
strend:
rts
The instruction is auto-aligned. But aligning strend would be fatal, because it is used to calculate the string length.
The behaviour of vasm in this respect is absolutely identical to Devpac and AsmOne/AsmPro. All these assemblers will only align labels which are following the aligned instruction or reside on the same line. So there is no reason to change it.
Quote:
Also, I think it would be nice to be able to disable that auto-alignment feature and have vasm output an 'odd alignment' error so as to have the opportunity to see what has been overlooked
|
It makes no sense to assemble instructions at an odd address, but I agree that a warning about auto-aligned instructions could be helpful. I changed that (will be in tomorrows source snapshot).
So your example (with an odd string length) would look like this now:
Code:
vasm 1.6b (c) in 2002-2013 Volker Barthelmann
vasm M68k/CPU32/ColdFire cpu backend 1.3d (c) 2002-2013 Frank Wille
vasm motorola syntax module 3.4 (c) 2002-2013 Frank Wille
vasm test output module 1.0 (c) 2002 Volker Barthelmann
warning 51 in line 3 of "source.s": instruction had been auto-aligned
> MOVEM.L D0-D7/A0-A6,-(A7) ; Put registers on stack
Hope this helps.
Warnings can be disabled as usual, with -w. Or specifically for this new warning: -nowarn=51.