This is the mail archive of the
mailing list for the GCC project.
Re: How to utilize PowerPC pre-existing flash resident code ???
- From: David Edelsohn <dje at watson dot ibm dot com>
- To: Jon Miller <jmiller at silcom dot com>
- Cc: gcc at gcc dot gnu dot org
- Date: Mon, 11 Feb 2002 16:28:51 -0500
- Subject: Re: How to utilize PowerPC pre-existing flash resident code ???
Because most of these questions have nothing to do with GCC or the
GNU Project, I would recommend you trying another forum for help. Have
you tried the USENET comp.sys.powerpc.tech newsgroup?
To answer your one GCC question: you should be able to call the
function directly from inlined assembly. Either tell GCC that you are
clobbering r30 or allow GCC to allocate a register in the outer function
and pass it in as a parameter to the inlined assembly which you substitute
for the mflr/mtlr instructions. The GCC documentation describes how to
write inlined assembly and there also are primers floating around.
If you are accessing low physical memory, is your program running
with relocate disabled or with a virtual = physical address translation
loaded into the page tables? Do pagetable permissions allow you to read
that address? If you expect the function to return, why are you jumping
there ("ba") without the link register set with the return address ("bla")?
Please utilize other resources for further non-GCC questions.