Menu

#312 GNU AS (gas) support

None
closed-accepted
z80 port (16)
5
2020-07-31
2019-12-26
No

This is initial GNU AS support mainly for Z80 port. To compile GAS patch required: https://sourceware.org/bugzilla/show_bug.cgi?id=25224

1 Attachments

Related

Discussion: elf output file support for Z80 theoreticaly possible?
Discussion: elf output file support for Z80 theoreticaly possible?

Discussion

  • Sergey Belyashov

    Better work with sections.

     
  • Sergey Belyashov

    I remove section redifinition. It is better to done it inside ld script.

     
  • Sergey Belyashov

    I have separated patch by two independed patches.
    Using this patch SDCC can accept option --asm=gas for z80 target which helps it to produce more comfortable for GNU AS code. It is first stage patch. I think, more deep support should be added later by another patches.

     

    Last edit: Sergey Belyashov 2020-02-11
  • Sergey Belyashov

    New version. I need review before it be committed.

     
    • Philipp Klaus Krause

      I wonder what the explicit empty cases in one of the new switches z80/main.c are for. Why not just leave those out? Or add an empty default (the other two addded switches do use a default, though non-empty)?

      I've run regression tests with the patch applied, and did not notice any problems on my system. But I did not try the new gas support.

       
      • Sergey Belyashov

        I do not know. I'll fix it.

         
  • Philipp Klaus Krause

    By the way, there was some similar work for gas support in the stm8 backend, but AFAIK there were some regressions that never fully got fixed (I think some of the work is on github in an sdcc fork - https://github.com/XaviDCR92/sdcc-gas).

     
    • Sergey Belyashov

      I have already added special changes to GAS itself to support SDCC z80 assembler dialect. So changes here are just add compiler invocation for gbz80, z80, z180, z80n and ez80 ports. I want to support other z80-like ports, but GAS z80 target requires deep refactoring. I try to do it using CGEN, but it cannot describe CISC ISAs, so refactoring is not done.

       
  • Sergey Belyashov

    • status: open --> closed-accepted
    • Group: -->
     
  • Sergey Belyashov

    Applied in [r11785].

     

Log in to post a comment.

Want the latest updates on software, tech news, and AI?
Get latest updates about software, tech news, and AI from SourceForge directly in your inbox once a month.