[cc65] Smart branches in the assembler

Date view Thread view Subject view

From: Ullrich von Bassewitz (uz_at_musoftware.de)
Date: 2001-10-12 00:29:30


On Thu, Oct 11, 2001 at 05:08:01PM -0500, Mike McCarty wrote:
> If one is simply trying to optimize for speed, regardless of space, the
> the best place to do this is in the linker, not the assembler. 

It is even possible to move the complete branch distance optimization into the
linker - including the removeal of the additional three bytes when replacing a
long branch by a short one. This has a few drawbacks however:

  * It makes the linker quite 6502 specific (currently the linker does not
    care about the code).

  * Any expression which is not an explicit constant must go as relocatable
    expression into the object file. This means:

    - Changes in the assembler.

    - Many error messages get delayed until the linking phase.

    - Some constructs that check code sizes are no longer possible in the 
      assembler.


Regards


        Uz


-- 
Ullrich von Bassewitz                                  uz_at_musoftware.de
----------------------------------------------------------------------
To unsubscribe from the list send mail to majordomo_at_musoftware.de with
the string "unsubscribe cc65" in the body(!) of the mail.


Date view Thread view Subject view

This archive was generated by hypermail 2.1.3 : 2001-12-14 22:05:42 CET