#3 GCC doesn't generate good 68000 codes

open
gcc (1)
5
2005-05-29
2005-05-29
Laurent Vivier
No

This patches modify gcc to generate good function call for pure
68000 architecture (like Mac classic or SE).

GCC supports in fact only post-68020 processors. To call a function
it generates always "bsr.l" opcode that is not supported by 68000
(only bsr.w).
We patch GCC to generate "jsr %pc@(address)" instead of "bsr.l".

Discussion

  • Laurent Vivier
    Laurent Vivier
    2005-06-10

    GCC 3.4 (bsr.l patch)

     
    Attachments
  • Laurent Vivier
    Laurent Vivier
    2005-06-10

     
    Attachments
  • Laurent Vivier
    Laurent Vivier
    2005-06-10

    Logged In: YES
    user_id=400005

    Adding GOT_68000 patch:
    load %A5 with _GLOBAL_OFFSET_TABLE_ using long offset

     
  • Laurent Vivier
    Laurent Vivier
    2005-07-06

    Logged In: YES
    user_id=400005

    In fact jsr %pc@(address) is also on 16bit...
    In fact, the good sequence is "lea address-.-8, %a1; jsr
    (%pc, %a1)"