Deutsch English Français Italiano |
<ff78aaa73101509100f09f190838a2a7@www.novabbs.org> View for Bookmarking (what is this?) Look up another Usenet article |
Path: ...!weretis.net!feeder9.news.weretis.net!i2pn.org!i2pn2.org!.POSTED!not-for-mail From: mitchalsup@aol.com (MitchAlsup1) Newsgroups: comp.arch Subject: Re: Stealing a Great Idea from the 6600 Date: Fri, 26 Apr 2024 13:25:03 +0000 Organization: Rocksolid Light Message-ID: <ff78aaa73101509100f09f190838a2a7@www.novabbs.org> References: <dd1866c4efb369b7b6cc499d718dc938@www.novabbs.org> <acq62j98dhmguil5ebce6lq4m9kkgt1fs2@4ax.com> <kkq62jppr53is4r70n151jl17bjd5kd6lv@4ax.com> <9d1fadaada2ec0683fc54688cce7cf27@www.novabbs.org> <v017mg$3rcg9$1@dont-email.me> <da6dc5fe28bb31b4c73d78ef1aac2ac5@www.novabbs.org> <sdl82jpkpf1t0ctr8sgqm5bvqqireg08j5@4ax.com> <44fdd1209496c66ba18e425370a8b50d@www.novabbs.org> <ks8e2j1kquqpcupcgh32es7nci33nlajid@4ax.com> <ec69999967361c286afdbe60bc2443ea@www.novabbs.org> <dtel2j5kipf6tj9cabgp7pqk8eei14eo1a@4ax.com> <v0euek$3a2rc$1@dont-email.me> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 8bit Injection-Info: i2pn2.org; logging-data="2426555"; mail-complaints-to="usenet@i2pn2.org"; posting-account="65wTazMNTleAJDh/pRqmKE7ADni/0wesT78+pyiDW8A"; User-Agent: Rocksolid Light X-Rslight-Site: $2y$10$UGwWA1CR/j3m8NkNGA7Dvu4IqbQt0n9e0UEoohchI.epdncq5r1L. X-Rslight-Posting-User: ac58ceb75ea22753186dae54d967fed894c3dce8 X-Spam-Checker-Version: SpamAssassin 4.0.0 Bytes: 3621 Lines: 60 BGB wrote: > On 4/25/2024 4:01 PM, George Neuner wrote: >> On Tue, 23 Apr 2024 17:58:41 +0000, mitchalsup@aol.com (MitchAlsup1) >> wrote: >> > Agreed in the sense that negative displacements exist. > However, can note that positive displacements tend to be significantly > more common than negative ones. Whether or not it makes sense to have a > negative displacement, depending mostly on the probability of greater > than half of the missed displacements being negative. > From what I can tell, this seems to be: > ~ 10 bits, scaled. > ~ 13 bits, unscaled. > So, say, an ISA like RISC-V might have had a slightly hit rate with > unsigned displacements than with signed displacements, but if one added > 1 or 2 bits, signed would have still been a clear winner (or, with 1 or > 2 fewer bits, unsigned a clear winner). > I ended up going with signed displacements for XG2, but it was pretty > close to break-even in this case (when expanding from the 9-bit unsigned > displacements in Baseline). > Granted, all signed or all-unsigned might be better from an ISA design > consistency POV. > If one had 16-bit displacements, then unscaled displacements would make > sense; otherwise scaled displacements seem like a win (misaligned > displacements being much less common than aligned displacements). What we need is ~16-bit displacements where 82½%-91¼% are positive. How does one use a frame pointer without negative displacements ?? [FP+disp] accesses callee save registers [FP-disp] accesses local stack variables and descriptors [SP+disp] accesses argument and result values > But, admittedly, main reason I went with unscaled for GBR-rel and PC-rel > Load/Store, was because using scaled displacements here would have > required more relocation types (nevermind if the hit rate for unscaled > 9-bit displacements is "pretty weak"). > Though, did end up later adding specialized Scaled GBR-Rel Load/Store > ops (to improve code density), so it might have been better in > retrospect had I instead just went the "keep it scaled and add more > reloc types to compensate" option. > .... >> YMMV.