Path: utzoo!utgpu!news-server.csri.toronto.edu!rpi!think.com!paperboy!meissner From: meissner@osf.org (Michael Meissner) Newsgroups: comp.arch Subject: Re: addressing on Mips (Was: 64 Bit addressing on R4000?) Message-ID: Date: 1 Jul 91 01:42:19 GMT References: <14900025@hpdmd48.boi.hp.com> <880@taniwha.UUCP> <5240@spim.mips.COM> Sender: news@OSF.ORG Organization: Open Software Foundation Lines: 26 In-reply-to: keith@mips.com's message of 29 Jun 91 18:26:51 GMT In article <5240@spim.mips.COM> keith@mips.com (Keith Garrett) writes: | [discussion of possible differences between 32 & 64 bit instructions deleted] | In article 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 | > ,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 | ,0($at) Umm, the optimal solution is to have a new relocation type that corrects the lui, so that only two instructions are needed. In fact, that's what MIPS currently uses. However, you can't get that relocation from the assembler as two discreete instructions, you have to use one macro instruction, and let the assembler generate the code. -- Michael Meissner email: meissner@osf.org phone: 617-621-8861 Open Software Foundation, 11 Cambridge Center, Cambridge, MA, 02142 You are in a twisty little passage of standards, all conflicting.