Path: utzoo!attcan!uunet!samsung!usc!apple!vsi1!daver!dlr From: dlr@daver.UU.NET (Dave Rand) Newsgroups: comp.sys.nsc.32k Subject: Re: 32000 Un-Nicities Message-ID: <1989Nov24.043120.7766@daver.UU.NET> Date: 24 Nov 89 04:31:20 GMT References: <1914@minyos.xx.rmit.oz> <2945@taux01.UUCP> <13434@nsc.nsc.com> Reply-To: dlr@daver.UU.NET (Dave Rand) Organization: Association for the Prevention of Polar Bears and Kangaroos Lines: 46 In article <13434@nsc.nsc.com> chaim@nsc.nsc.com.UUCP (Chaim Bendelac) writes: >In article <1914@minyos.xx.rmit.oz> s872625@minyos.xx.rmit.oz (Chris Cogdon [Brataccas]) writes: >>>1) Displacements can only cover 1M of addressing space (512k if you only >>> allow for forward displacements from a fixed base). > >Not at all. The NS32016 displacements cover its entire adddress-space >(24 bits, 16Mbyte). >The more recent Series 32000 processors (such as the NS32532), have a 4 >GIGA-byte address-space. You can use a displacement to reach out to as >much as one Giga-byte. Register-relative addressing modes can be used to >span the entire 4 Gbyte range. Oh dear. Oh my. I hope that the CTP products don't make this assumption, Chaim. The displacement addressing of the Series 32000 is a 30 bit, 2's complement signed value. This means that it may range (in branch instructions for example) +/- 16 meg for the 32008, 32016, 32032, 32C016, 32C032 and 32CG16, covering the entire address range with no problem. For the 32332 and 32532 (and future 32 bit processors), the range is +/- 0.5 Giga byte, not 1 Giga byte. Values in _displacement_ may range from 0x1fffffff positive to 0x20000000 negative. Regretfully, negative values in absolute addresses are "undefined" in the current programmers reference manual for the Series 32000, so you can't assume that: ADDR -1,r0 will point r0 to the last byte in memory. As well, register-relative also uses a displacement field (so you have all the advantages of code density), so it too is limited to +/- 0.5 Gigabyte. You may not use register relative to span the entire 4 Gigabyte range. So - for that Reeeally big program (> 500 megabytes), you will have to use a jump table, or use immediate addressing modes. The real problem is I/O on the 332 and 532. You must use a move instruction, followed by register-relative to get to the really high addresses: MOVD $ICU,r0 # load address of ICU (0xfffffe00) MOVB xx,0(r0) # access the ICU Life is like that. Such a small price to pay for the benefit of tight code that you can get on the 32000. -- Dave Rand {pyramid|hoptoad|sun|vsi1}!daver!dlr Internet: dlr@daver.uu.net