optimization by as

Erik Christiansen dvalin@internode.on.net
Tue Aug 18 09:23:00 GMT 2015


On 17.08.15 14:37, Paul_Koning@Dell.com wrote:
> The other (now rare) job of the assembler is to process human-written
> assembly code.  There too it must stay out of the way, because the
> only time when hand-written assembly code is justified is when the
> human needs *complete* control over what happens.  
...
> So in short, I view all “optimizing assemblers” as design errors.

+1

Over 3 decades of embedded systems development, I wrote a lot of
assembler, for a range of targets. (And most of it using the GNU
toolchain) It's not just when writing an ISR, or bit-banged I/O,
complete with nops to meet ASIC data set-up and write strobe timing
requirements, that the assembler cannot be permitted to finesse
any instructions in the case of hand coding.

I still occasionally code systems comprising interacting event-driven
complex state machines. Gas macros provide a custom language, making the
assembler environment as comfortable as C, mostly.

In short, I can only confirm that instruction-screwing assemblers must
retain a mode in which they do what they're told.

Erik



More information about the Binutils mailing list