Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.sys.apple2.programmer > #5872

Re: HLL on 6502

From ol.sc@web.de (Oliver Schmidt)
Newsgroups comp.sys.apple2.programmer
Subject Re: HLL on 6502
Date 2021-10-03 20:32 +0000
Message-ID <sjd40c$4r3$1@solani.org> (permalink)
References <dog_cow-1633227319@macgui.com>

Show all headers | View raw


Hi,

I'm the maintainer of the cc65 compiler you are welcome to consider my
statements biased, but anyway...

>Several common assumptions about the MOS 6502 processor, and C compilers
>targeting it, are now refuted by the current work.

I don't know where the term "common assumptions" comes from. However,
I know that not a single one of them is common among the cc65
developers.

Especially I personally would actually be happy if an
_actively_maintained_ LLVM based 6502 compiler would outperform cc65
allowing cc65 to retire.

However, a _LOT_ of work went into the elaborated, highly optimized
and well tested cc65 C libraries for many 6502 targets. I personally
would really like to see that work being leveraged by a cc65
successor.

>To put it another way, we go to great lengths to
>emit code that operates "as if there were stacks", without using stacks at
>all. LLVM's sophistication facilitates this; the analyses required are quite
>intricate, but most of them are slight modifications to data structures
>already available in LLVM.

This is in fact a great example for what I wrote above: cc65 of course
doesn't have the LLVM capabilities to analyse if a function needs to
be reentrant (making a stack necessary) or not. But the cc65 developrs
understood very well a long time ago that it is preferable to not have
a stack at all. Therfore the user can manually decide if a function
needs to be reentrant or not:

https://cc65.github.io/doc/cc65.html#option-static-locals

Regards,
Oliver

Back to comp.sys.apple2.programmer | Previous | NextPrevious in thread | Next in thread | Find similar | Unroll thread


Thread

HLL on 6502 D Finnigan <dog_cow@macgui.com> - 2021-10-03 02:15 +0000
  Re: HLL on 6502 ol.sc@web.de (Oliver Schmidt) - 2021-10-03 20:32 +0000
    Re: HLL on 6502 kegs@provalid.com (Kent Dickey) - 2021-10-03 23:26 -0500
      Re: HLL on 6502 D Finnigan <dog_cow@macgui.com> - 2021-10-04 06:20 +0000
        Re: HLL on 6502 ol.sc@web.de (Oliver Schmidt) - 2021-10-04 08:38 +0000
          Re: HLL on 6502 "laserac...@gmail.com" <laseractiveguy@gmail.com> - 2021-10-05 05:38 -0700
          Re: HLL on 6502 John Byrd <johnwbyrd@gmail.com> - 2021-10-17 10:02 -0700
            Re: HLL on 6502 ol.sc@web.de (Oliver Schmidt) - 2021-10-18 17:34 +0000
    Re: HLL on 6502 John Byrd <johnwbyrd@gmail.com> - 2021-10-08 08:47 -0700
      Re: HLL on 6502 David Schmenk <dschmenk@gmail.com> - 2021-10-08 16:13 -0700
        Re: HLL on 6502 John Byrd <johnwbyrd@gmail.com> - 2021-10-08 18:38 -0700
          Re: HLL on 6502 David Schmenk <dschmenk@gmail.com> - 2021-10-09 09:58 -0700

csiph-web