ld: H8/300

1 
1 4.1 'ld' and the H8/300
1 =======================
1 
1 For the H8/300, 'ld' can perform these global optimizations when you
1 specify the '--relax' command-line option.
1 
1 _relaxing address modes_
1      'ld' finds all 'jsr' and 'jmp' instructions whose targets are
1      within eight bits, and turns them into eight-bit program-counter
1      relative 'bsr' and 'bra' instructions, respectively.
1 
1 _synthesizing instructions_
1      'ld' finds all 'mov.b' instructions which use the sixteen-bit
1      absolute address form, but refer to the top page of memory, and
1      changes them to use the eight-bit address form.  (That is: the
1      linker turns 'mov.b '@'AA:16' into 'mov.b '@'AA:8' whenever the
1      address AA is in the top page of memory).
1 
1      'ld' finds all 'mov' instructions which use the register indirect
1      with 32-bit displacement addressing mode, but use a small
1      displacement inside 16-bit displacement range, and changes them to
1      use the 16-bit displacement form.  (That is: the linker turns
1      'mov.b '@'D:32,ERx' into 'mov.b '@'D:16,ERx' whenever the
1      displacement D is in the 16 bit signed integer range.  Only
1      implemented in ELF-format ld).
1 
1 _bit manipulation instructions_
1      'ld' finds all bit manipulation instructions like 'band, bclr,
1      biand, bild, bior, bist, bixor, bld, bnot, bor, bset, bst, btst,
1      bxor' which use 32 bit and 16 bit absolute address form, but refer
1      to the top page of memory, and changes them to use the 8 bit
1      address form.  (That is: the linker turns 'bset #xx:3,'@'AA:32'
1      into 'bset #xx:3,'@'AA:8' whenever the address AA is in the top
1      page of memory).
1 
1 _system control instructions_
1      'ld' finds all 'ldc.w, stc.w' instructions which use the 32 bit
1      absolute address form, but refer to the top page of memory, and
1      changes them to use 16 bit address form.  (That is: the linker
1      turns 'ldc.w '@'AA:32,ccr' into 'ldc.w '@'AA:16,ccr' whenever the
1      address AA is in the top page of memory).
1