[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Rep:[f-cpu] Another proposition for a call convention

Michael Riepe wrote:

> The `global pointer' register is an invention of mine; it is supposed
> to point to a well-defined address inside the address space of a process
> (e.g. at the beginning of the .data segment), in order to ease addressing:
> with a global pointer, you can use pointer-relative addressing for global
> data (and probably also for code), avoiding time-consuming relocations
> at load time (which in turn improves shareability of code pages). An
> additional `local pointer' will be useful for shared libraries; but we
> can also use one of the `callee-saved' registers for that.

Funny I thought that was invented years ago and called a base pointer.
One idea that I have been using is the global pointer to store interupt
service local variables as well as OS variables as negitive offset from 
the begining of the data segment.
   [os variables ]
   [irq local variables]
program data -> [ task variables ]
The advantage is the not stack required to be clean at all times making
emulation of complex instructions like floating point easyier as data
using the stack pointer need not be cleaned up as much.

Ben Franchuk - Dawn * 12/24 bit cpu *
To unsubscribe, send an e-mail to majordomo@seul.org with
unsubscribe f-cpu       in the body. http://f-cpu.seul.org/