[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[openrisc] Re: PC as GPR?
Again another resend untraceably lost mail...
On Wed, Feb 20, 2002 at 05:50:49PM +0100, Damjan Lampret wrote:
> On 20 Feb 2002 16:31 CET you wrote:
>
> > (List ate my email - this is a resend.)
> >
> > Is there a specific reason why the PC is not addressable like a general
> > purpose register (i.e. make r31 be the PC)?
> >
> > Disadvantage: losing one GPR (not that painful with 32 regs).
> >
> > Advantages: Jmp becomes an alias for mov, frees one opcode. Computable
> > branch via add/sub. PC relative addressing for load/store (no base
> > register needed for position independent code).
>
> I think this only complicate superscalar design and design of
> implementation where PC is hidden in the microarchitecture. Right now
> we had a lot of problem with PC because for sake of debugging it had
> to be visible to the debugger via SPR. I prefer there is no access to
> PC except writing it with branch/jump insns.
Whether GPR or not, no PC relative addressing is a big loss. Think
loading of constant data (integer/float/double constants, strings),
which will have to be done in two ops.
Think shared libraries. On x86, libraries have to use the ugly kludge
of "branch to following operation and pop address off the stack, add
offset and keep it around" on every library entry that can use global
data. It feels kinda dirty having to do that on a fresh, new ISA, too.
> > And a wishlist item: The architecture manual in PDF form seems not to
> > be up to date wrt the Word doc, according to CVS. Word stuff is
> > unwieldy, can a current PDF be generated?
>
> Yeah, it is old. It needs to be manually updated whenever Word file is
> updated. Idea is to replace Word with something that can automatically
> generate PDF (and HTML) on the server.
That would most likely be a language defined with SGML (or rather that
newfangled XML, as more tools are likely available for it). Could also
be (La)TeX, but HTML is harder to generate from that.
There is DocBook (defined in SGML and XML), but that's more targeted at
software manuals. Some templates would need to be defined for
instruction descriptions, which could also be used to extract e.g.
opcode tables from the manual.
> > Also, did I miss something from looking over the manual or is there
> > really no pre-decrement/post-increment addressing mode? Or is the PDF
> > manual really obsolete?
>
> No, there is no post/pre addressing modes.
Hm. To make the implementation simpler, I guess. Unless I miss
alternate facilities for this, stack operations will suck. There is
also no multi register store/load. Both of these are annoying for
function calls.
It also makes moving memory operations a pain - strcmp, memset, ...
--
Andreas Bombe <bombe@informatik.tu-muenchen.de> DSA key 0x04880A44
--
To unsubscribe from openrisc mailing list please visit http://www.opencores.org/mailinglists.shtml