Article View: comp.arch
Article #12294addressing on Mips (Was: 64 Bit addressing on R4000?)
From: Keith Garrett
Date: Sat, 29 Jun 1991 18:26
Date: Sat, 29 Jun 1991 18:26
35 lines
1956 bytes
1956 bytes
[discussion of possible differences between 32 & 64 bit instructions deleted]
In article <MEISSNER.91Jun28105156@tiktok.osf.org> meissner@osf.org (Michael Meissner) writes:
>The other thing I've thought about is how do you do generalized
>external references. On the current R[236]000's a normal (non-GP)
>reference is two instructions:
>
> lui $at,addr>>16
> <lw/sw> <reg>,addr&0xffff($at)
this won't work in the general case. the offset is sign-extended before
it is added to the base register contents. here is the general solution:
lui $at,(addr>>16)&0xffff
ori $at,addr&0xffff
<lw/sw> <reg>,0($at)
>
>I wonder whether we will need four instructions in the 64 bit
>universe.
how about:
lui $at,(addr>>48)&0xffff
ori $at,(addr>>32)&0xffff
sll $at,16
ori $at,(addr>>16)&0xffff
sll $at,16
ori $at,addr&0xffff
<lw/sw> <reg>,0($at)
there may be a better solution for this, that i haven't considered.
an alternative for either case:
<lw/ld> $at,offset($gp)
<lw/sw> <reg>,0($at)
this requires an extra memory reference, but is probably an overall win for
64 bits, and is OK for 32 bits.
--
Keith Garrett "This is *MY* opinion, OBVIOUSLY" (408) 524-8110
Mips Computer Systems, 930 Arques Ave MS 1-02, Sunnyvale, Ca. 94088-3650
"Beware of the half-truth - you may have gotten hold of the wrong half."
keith@mips.com -or- {ames,decwrl,prls}!mips!keith -Rabbi Seymour Essrog
Technical Details
Message-ID:
<5240@spim.mips.COM>Path:
arc1-ca.pugleaf.net!utzoo!utgpu!news-server.csri.toronto.edu!rpi!zaphod.mps.ohio-state.edu!mips!keithReferences:
<14900025@hpdmd48.boi.hp.com> <880@taniwha.UUCP> <MEISSNER.91Jun28105156@tiktok.osf.org>Show Full Headers
Complete Article Headers
Path: arc1-ca.pugleaf.net!utzoo!utgpu!news-server.csri.toronto.edu!rpi!zaphod.mps.ohio-state.edu!mips!keith From: keith@mips.com (Keith Garrett) Newsgroups: comp.arch Subject: addressing on Mips (Was: 64 Bit addressing on R4000?) Message-ID: <5240@spim.mips.COM> Date: 29 Jun 91 18:26:51 GMT References: <14900025@hpdmd48.boi.hp.com> <880@taniwha.UUCP> <MEISSNER.91Jun28105156@tiktok.osf.org> Sender: news@mips.COM Organization: MIPS Computer Systems, Sunnyvale, California Lines: 35 Nntp-Posting-Host: royalty.mips.com