This is the mail archive of the gcc@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

Re: gcc with no stack at all?


> Date: Thu, 30 Mar 2000 20:11:31 -0500
> From: Jeff Garzik <jgarzik@mandrakesoft.com>
>
> For low-level BIOS type code, some portions of early chipset init must
> run without a stack.

Right.

> Is it possible to write gcc-compilable C code which doesn't require a
> stack at all?

Sure, trivial:

foo() { asm ("startupocode: bla bla bla; jsr main ; bla bla bla ..."); }

> I don't see any '-fno-stack' option in gcc.info*, but I was
> wondering if it could be done implicitly, for example '-fno-builtin'
> plus no local vars plus an all-register calling convention.

No.

Welcome to startup code programming.  This is the wrong list to ask
how to program kernels.  If you want a hint, look at newlib's
libgloss.  See sourceware.cygnus.com to find newlib.

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]