Path: utzoo!mnetor!tmsoft!torsqnt!news-server.csri.toronto.edu!bonnie.concordia.ca!thunder.mcrcim.mcgill.edu!snorkelwacker.mit.edu!apple!vsi1!daver!bungi.com!news From: dlr@daver.bungi.com (Dave Rand) Newsgroups: comp.sys.nsc.32k Subject: Re: A summary of the setjmp problem Message-ID: Date: 12 Feb 91 18:21:38 GMT Sender: news@daver.bungi.com Lines: 47 Approved: news@daver.bungi.com [In the message entitled "Re: A summary of the setjmp problem" on Feb 12, 5:18, Johannes Helander writes:] > A very dissapointing feature of the NS32532 processor is that there is > no 32-bit absolute addressing, only 30 bits -- or actually 29 since > the first bit is a sign bit -- can easily be addressed. This leads to > a maximum of 512MB of usable memory without severe complications in > the compiler and many other places. Maybe we should start using near > and far pointers :-). It was unfortunate that NS didn't choose to use > the one "reserved" addressing mode for this purpose (what is it used > for?). BTW, am I correct in assuming that 30 bit negative addresses > will point to top of memory? > No. Negative addresses are invalid. In the current revision of the 532, they do map to the top of memory, but this can not be counted on. 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|mips|bct|vsi1}!daver!dlr Internet: dlr@daver.bungi.com