Quantcast
Channel: Cemetech
Viewing all articles
Browse latest Browse all 75829

Your Projects :: RE: z80 Code Generation with LLVM

$
0
0
Author: Tari
Posted: 04 Nov 2012 01:15:35 am (GMT -5)

elfprince13 wrote:
Ultimately, I would like to see all sorts of llvm-friendly compilers be supported (I suspect Tari would appreciate support for ghc).
Hah, that would be awesome, but I fear unfeasible (or very limited). The lazy nature of Haskell makes it fairly memory-hungry and I believe it requires a runtime library for memory management.

elfprince13 wrote:
AHelper wrote:
Well, considering the CPU, having some method to writing to the ports are needed. I was simply stating how SDCC does it. I would love it if it can be done some way.

I would suggest we support inline assembly, but also provide a standard library to handle I/O, and hide it there so that most programmers don't have to deal with it directly.
Agreed. Provide libraries for common tasks, with the possibility for users to directly write hardware access code if necessary.

Leave inlining up to the optimizer. As long as you don't have optimizations turned off, it's very likely that it'll go ahead and inline such short functions.

AHelper wrote:
For putting variables at specific locations, can I make the linker handle groups? Like, I have an ISR variable area, process register backup area, etc. that have a starting address, and I also have a group that must be stored to in descending order. Would the linker handle these cases, or would absolute references be the only way to handle it? If the linker can work, how do I specify where things go?
Just define a section in the object file for things as needed. It sounds to me like most of the use cases you mention there are things that the runtime environment provides though, so you should just query whatever sets them up to get pointers rather than try to resolve them at compile-time.
_________________


タリ·MishaBot


Viewing all articles
Browse latest Browse all 75829

Latest Images

Trending Articles



Latest Images