Path: utzoo!mnetor!uunet!steinmetz!sungoddess!oconnor From: oconnor@sungoddess.steinmetz (Dennis M. O'Connor) Newsgroups: comp.arch Subject: Re: negative addresses Message-ID: <10771@steinmetz.ge.com> Date: 10 May 88 14:38:30 GMT References: <2393@uvacs.CS.VIRGINIA.EDU> Sender: news@steinmetz.ge.com Reply-To: oconnor%sungod@steinmetz.UUCP Organization: GE Corporate R&D Center Lines: 41 An article by davidsen@crdos1.UUCP (bill davidsen) says: ] In article <...> wulf@uvacs.CS.VIRGINIA.EDU (Bill Wulf) writes: ] | Has anyone ever seen a machine with "negative addresses", that is, one ] | where the address space is -2**31..2**31-1 rather than 0..2*32-1?? ] | Any thoughts on what the problems with such a scheme might be (or are)? ] ] "bits is bits," but I suspect that a lot of programs will have trouble ] with non-contiguous addressing. Address wrap forces the lowest address ] to "follow" the highest address, which may make io interesting. The lowest address ( -2**N ) does NOT follow the highest ( 2**N-1 ) in the RPM40 memory scheme. An attempt to reach the negative area by adding two positive values generates an overflow. This is good. An attempt to cross zero is perfectly legal. Static storage is centered around zero, accessable using small addresses. Existing programs may not make good use of the negative areas. But you should be able to solve this at link time, or maybe even at load time. At compile time, just put the heap in negative memory and the stack in positive. Only the compiler/linker/loader will ever know. ] | ] | Why ask such a question, you ask -- well, I'm trying to remove unsigned ] | arithmetic from WM, and as far as I can tell, the primary (only?) use ] | of unsigned arithmetic is for address computations. Soooooo... ] My gut feeling is that this is not correct, but I have no metrics at ] this time to confirm or deny what you say. Unsigned arithmetic takes very little additional hardware. I've many times been annoyed at not being able to have integer types that range from 0..2**N-1, where N is the word size. RISC philosophy would be to leave it in if it does not slow the machine or use a lot of space on the chip. So you should leave it in. ] | Bill Wulf ] bill davidsen (wedu@ge-crd.arpa) -- Dennis O'Connor oconnor%sungod@steinmetz.UUCP ARPA: OCONNORDM@ge-crd.arpa "The purpose of socialization is to teach wolves that they are sheep."