Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.arch > #31581 > unrolled thread
| Started by | Quadibloc <jsavard@ecn.ab.ca> |
|---|---|
| First post | 2015-12-07 20:13 -0800 |
| Last post | 2015-12-26 10:07 -0800 |
| Articles | 20 on this page of 134 — 26 participants |
Back to article view | Back to comp.arch
Between CISC and RISC Quadibloc <jsavard@ecn.ab.ca> - 2015-12-07 20:13 -0800
Re: Between CISC and RISC Bruce Hoult <bruce.hoult@gmail.com> - 2015-12-08 01:50 -0800
Re: Between CISC and RISC Quadibloc <jsavard@ecn.ab.ca> - 2015-12-08 04:19 -0800
Re: Between CISC and RISC Bruce Hoult <bruce.hoult@gmail.com> - 2015-12-08 04:57 -0800
Re: Between CISC and RISC algrant109@gmail.com - 2015-12-11 12:57 -0800
Re: Between CISC and RISC Bruce Hoult <bruce.hoult@gmail.com> - 2015-12-11 13:44 -0800
Re: Between CISC and RISC Ivan Godard <ivan@millcomputing.com> - 2015-12-11 15:40 -0800
Re: Between CISC and RISC Quadibloc <jsavard@ecn.ab.ca> - 2015-12-11 21:13 -0800
Re: Between CISC and RISC Bruce Hoult <bruce.hoult@gmail.com> - 2015-12-12 04:14 -0800
Re: Between CISC and RISC already5chosen@yahoo.com - 2015-12-12 12:59 -0800
Re: Between CISC and RISC algrant109@gmail.com - 2015-12-14 08:44 -0800
Re: Between CISC and RISC Exophase <exophase@gmail.com> - 2015-12-15 13:23 -0800
Re: Between CISC and RISC Bruce Hoult <bruce.hoult@gmail.com> - 2015-12-16 02:13 -0800
Re: Between CISC and RISC Quadibloc <jsavard@ecn.ab.ca> - 2015-12-08 04:17 -0800
Re: Between CISC and RISC Quadibloc <jsavard@ecn.ab.ca> - 2015-12-09 05:35 -0800
Re: Between CISC and RISC jacko <jackokring@gmail.com> - 2015-12-09 08:56 -0800
Re: Between CISC and RISC Stephen Fuld <SFuld@alumni.cmu.edu.invalid> - 2015-12-09 10:30 -0800
Re: Between CISC and RISC Quadibloc <jsavard@ecn.ab.ca> - 2015-12-09 11:06 -0800
Re: Between CISC and RISC Stephen Fuld <SFuld@alumni.cmu.edu.invalid> - 2015-12-09 12:17 -0800
Re: Between CISC and RISC Quadibloc <jsavard@ecn.ab.ca> - 2015-12-09 12:56 -0800
Re: Between CISC and RISC Stephen Fuld <SFuld@alumni.cmu.edu.invalid> - 2015-12-10 11:44 -0800
Re: Between CISC and RISC Quadibloc <jsavard@ecn.ab.ca> - 2015-12-10 22:50 -0800
Re: Between CISC and RISC Quadibloc <jsavard@ecn.ab.ca> - 2015-12-10 23:06 -0800
Re: Between CISC and RISC Quadibloc <jsavard@ecn.ab.ca> - 2015-12-11 06:01 -0800
Re: Between CISC and RISC David W Schroth <davidschroth@harrietmanor.com> - 2015-12-10 21:37 -0600
Re: Between CISC and RISC Quadibloc <jsavard@ecn.ab.ca> - 2015-12-11 10:37 -0800
Re: Between CISC and RISC Stephen Fuld <SFuld@alumni.cmu.edu.invalid> - 2015-12-11 15:19 -0800
Re: Between CISC and RISC Quadibloc <jsavard@ecn.ab.ca> - 2015-12-11 21:20 -0800
Re: Between CISC and RISC David W Schroth <davidschroth@harrietmanor.com> - 2015-12-12 18:22 -0600
Re: Between CISC and RISC anton@mips.complang.tuwien.ac.at (Anton Ertl) - 2015-12-12 23:20 +0000
Re: Between CISC and RISC Terje Mathisen <terje.mathisen@tmsw.no> - 2015-12-13 07:48 +0100
Re: Between CISC and RISC anton@mips.complang.tuwien.ac.at (Anton Ertl) - 2015-12-13 18:00 +0000
Re: Between CISC and RISC Ivan Godard <ivan@millcomputing.com> - 2015-12-13 11:37 -0800
Re: Between CISC and RISC Terje Mathisen <terje.mathisen@tmsw.no> - 2015-12-13 21:57 +0100
Re: Between CISC and RISC Quadibloc <jsavard@ecn.ab.ca> - 2015-12-13 07:19 -0800
Re: ones complement, was Between John Levine <johnl@iecc.com> - 2015-12-13 15:32 +0000
Re: ones complement, was Between Quadibloc <jsavard@ecn.ab.ca> - 2015-12-13 08:32 -0800
Re: ones complement, was Between John Levine <johnl@iecc.com> - 2015-12-13 16:52 +0000
Re: ones complement, was Between Bruce Hoult <bruce.hoult@gmail.com> - 2015-12-13 08:56 -0800
Re: ones complement, was Between John Levine <johnl@iecc.com> - 2015-12-13 17:03 +0000
Re: ones complement, was Between Joe Pfeiffer <pfeiffer@cs.nmsu.edu> - 2015-12-13 10:12 -0700
Re: ones complement, was Between Terje Mathisen <terje.mathisen@tmsw.no> - 2015-12-13 21:51 +0100
Re: ones complement, was Between Jan Coombs <jan_coombs@murmic.plus.com> - 2015-12-13 22:18 +0000
Re: ones complement, was Between MitchAlsup <MitchAlsup@aol.com> - 2015-12-13 10:15 -0800
Re: ones complement, was Between Megol <golem960@gmail.com> - 2015-12-13 12:18 -0800
Re: ones complement, was Between Terje Mathisen <terje.mathisen@tmsw.no> - 2015-12-13 22:00 +0100
Re: ones complement, was Between Ivan Godard <ivan@millcomputing.com> - 2015-12-13 13:07 -0800
Re: ones complement, was Between Terje Mathisen <terje.mathisen@tmsw.no> - 2015-12-14 10:15 +0100
Re: ones complement, was Between Ivan Godard <ivan@millcomputing.com> - 2015-12-14 01:39 -0800
Re: ones complement, was Between already5chosen@yahoo.com - 2015-12-14 01:59 -0800
Re: ones complement, was Between Terje Mathisen <terje.mathisen@tmsw.no> - 2015-12-14 14:21 +0100
Re: ones complement, was Between nmm@wheeler.UUCP (Nick Maclaren) - 2015-12-14 14:21 +0000
Re: ones complement, was Between already5chosen@yahoo.com - 2015-12-14 07:03 -0800
Re: ones complement, was Between nmm@wheeler.UUCP (Nick Maclaren) - 2015-12-14 15:50 +0000
Re: ones complement, was Between MitchAlsup <MitchAlsup@aol.com> - 2015-12-14 16:34 -0800
Re: ones complement, was Between Ivan Godard <ivan@millcomputing.com> - 2015-12-14 18:42 -0800
Re: ones complement, was Between nmm@wheeler.UUCP (Nick Maclaren) - 2015-12-15 09:13 +0000
Re: ones complement, was Between nmm@wheeler.UUCP (Nick Maclaren) - 2015-12-15 09:25 +0000
Re: ones complement, was Between nmm@wheeler.UUCP (Nick Maclaren) - 2015-12-15 08:53 +0000
Re: ones complement, was Between Terje Mathisen <terje.mathisen@tmsw.no> - 2015-12-14 18:25 +0100
Re: ones complement, was Between Bruce Hoult <bruce.hoult@gmail.com> - 2015-12-15 02:20 -0800
Re: ones complement, was Between Terje Mathisen <terje.mathisen@tmsw.no> - 2015-12-15 11:58 +0100
Re: ones complement, was Between already5chosen@yahoo.com - 2015-12-20 02:45 -0800
Re: ones complement, was Between already5chosen@yahoo.com - 2015-12-20 03:11 -0800
Re: ones complement, was Between nj_kruse@me.com (Niels Jørgen Kruse) - 2015-12-20 14:34 +0100
Re: ones complement, was Between already5chosen@yahoo.com - 2015-12-20 05:57 -0800
Re: ones complement, was Between MitchAlsup <MitchAlsup@aol.com> - 2015-12-20 12:12 -0800
Re: ones complement, was Between Terje Mathisen <terje.mathisen@tmsw.no> - 2015-12-21 15:33 +0100
Re: ones complement, was Between nmm@wheeler.UUCP (Nick Maclaren) - 2015-12-21 14:58 +0000
Re: ones complement, was Between Quadibloc <jsavard@ecn.ab.ca> - 2015-12-21 10:06 -0800
Re: ones complement, was Between MitchAlsup <MitchAlsup@aol.com> - 2015-12-21 15:48 -0800
Re: ones complement, was Between Ivan Godard <ivan@millcomputing.com> - 2015-12-21 17:13 -0800
Re: ones complement, was Between Terje Mathisen <terje.mathisen@tmsw.no> - 2015-12-20 17:47 +0100
Re: ones complement, was Between jacko <jackokring@gmail.com> - 2015-12-20 10:09 -0800
Re: ones complement, was Between Jean-Marc Bourguet <jm@bourguet.org> - 2015-12-20 20:09 +0100
Re: ones complement, was Between Chris Gray <cg@GraySage.COM> - 2015-12-20 11:02 -0700
Re: ones complement, was Between anton@mips.complang.tuwien.ac.at (Anton Ertl) - 2015-12-21 14:11 +0000
Re: ones complement, was Between Terje Mathisen <terje.mathisen@tmsw.no> - 2015-12-21 16:08 +0100
Re: ones complement, was Between nmm@wheeler.UUCP (Nick Maclaren) - 2015-12-21 16:03 +0000
Re: ones complement, was Between anton@mips.complang.tuwien.ac.at (Anton Ertl) - 2015-12-21 16:18 +0000
Re: ones complement, was Between nmm@wheeler.UUCP (Nick Maclaren) - 2015-12-21 17:53 +0000
Re: ones complement, was Between Terje Mathisen <terje.mathisen@tmsw.no> - 2015-12-21 21:29 +0100
Re: ones complement, was Between anton@mips.complang.tuwien.ac.at (Anton Ertl) - 2015-12-21 15:57 +0000
Re: ones complement, was Between Terje Mathisen <terje.mathisen@tmsw.no> - 2015-12-21 21:25 +0100
Re: ones complement, was Between John Levine <johnl@iecc.com> - 2015-12-14 02:11 +0000
Re: ones complement, was Between Quadibloc <jsavard@ecn.ab.ca> - 2015-12-14 00:27 -0800
Re: ones complement, was Between Quadibloc <jsavard@ecn.ab.ca> - 2015-12-13 17:16 -0800
Re: ones complement, was Between Terje Mathisen <terje.mathisen@tmsw.no> - 2015-12-14 10:20 +0100
Re: ones complement, was Between anton@mips.complang.tuwien.ac.at (Anton Ertl) - 2015-12-14 10:29 +0000
Re: ones complement, was Between anton@mips.complang.tuwien.ac.at (Anton Ertl) - 2015-12-14 12:17 +0000
Re: ones complement, was Between MitchAlsup <MitchAlsup@aol.com> - 2015-12-14 06:40 -0800
Re: ones complement, was Between Terje Mathisen <terje.mathisen@tmsw.no> - 2015-12-14 14:26 +0100
Re: ones complement, was Between anton@mips.complang.tuwien.ac.at (Anton Ertl) - 2015-12-14 08:09 +0000
Re: Between CISC and RISC mrs@kithrup.com (Mike Stump) - 2015-12-14 00:11 +0000
Re: Between CISC and RISC MitchAlsup <MitchAlsup@aol.com> - 2015-12-09 17:30 -0800
Re: Between CISC and RISC Quadibloc <jsavard@ecn.ab.ca> - 2015-12-14 00:17 -0800
Re: Between CISC and RISC Quadibloc <jsavard@ecn.ab.ca> - 2015-12-14 05:48 -0800
Re: Between CISC and RISC Quadibloc <jsavard@ecn.ab.ca> - 2015-12-15 15:32 -0800
Re: Between CISC and RISC Quadibloc <jsavard@ecn.ab.ca> - 2015-12-21 12:57 -0800
Re: Between CISC and RISC Quadibloc <jsavard@ecn.ab.ca> - 2015-12-21 19:00 -0800
Re: Between CISC and RISC Terje Mathisen <terje.mathisen@tmsw.no> - 2015-12-22 10:26 +0100
Re: Between CISC and RISC Quadibloc <jsavard@ecn.ab.ca> - 2015-12-22 06:39 -0800
Re: Between CISC and RISC Quadibloc <jsavard@ecn.ab.ca> - 2015-12-23 10:17 -0800
Re: Between CISC and RISC Jean-Marc Bourguet <jm@bourguet.org> - 2015-12-23 19:55 +0100
Re: Between CISC and RISC Quadibloc <jsavard@ecn.ab.ca> - 2015-12-23 17:15 -0800
Re: Between CISC and RISC Terje Mathisen <terje.mathisen@tmsw.no> - 2015-12-24 10:27 +0100
Re: Between CISC and RISC Quadibloc <jsavard@ecn.ab.ca> - 2015-12-24 04:50 -0800
Re: Between CISC and RISC Quadibloc <jsavard@ecn.ab.ca> - 2015-12-24 07:37 -0800
Re: Between CISC and RISC Quadibloc <jsavard@ecn.ab.ca> - 2015-12-24 09:47 -0800
Re: Between CISC and RISC Quadibloc <jsavard@ecn.ab.ca> - 2015-12-24 11:47 -0800
Re: Between CISC and RISC Quadibloc <jsavard@ecn.ab.ca> - 2015-12-24 12:48 -0800
Re: Between CISC and RISC Quadibloc <jsavard@ecn.ab.ca> - 2015-12-24 18:56 -0800
Re: Between CISC and RISC Quadibloc <jsavard@ecn.ab.ca> - 2015-12-25 09:34 -0800
Re: Between CISC and RISC anton@mips.complang.tuwien.ac.at (Anton Ertl) - 2015-12-25 17:57 +0000
Re: Between CISC and RISC Quadibloc <jsavard@ecn.ab.ca> - 2015-12-25 10:42 -0800
Re: Between CISC and RISC Bruce Hoult <bruce.hoult@gmail.com> - 2015-12-26 03:29 -0800
Re: Between CISC and RISC Jakob Brundin <jakbru@gmail.com> - 2015-12-26 07:23 -0800
Re: Between CISC and RISC Quadibloc <jsavard@ecn.ab.ca> - 2015-12-26 09:54 -0800
Re: Between CISC and RISC Anne & Lynn Wheeler <lynn@garlic.com> - 2015-12-26 16:18 -0800
Re: Between CISC and RISC MitchAlsup <MitchAlsup@aol.com> - 2016-01-31 10:17 -0800
Re: Between CISC and RISC paul wallich <pw@panix.com> - 2016-01-31 13:39 -0500
Re: Between CISC and RISC MitchAlsup <MitchAlsup@aol.com> - 2016-01-31 19:16 -0800
Re: Between CISC and RISC anton@mips.complang.tuwien.ac.at (Anton Ertl) - 2016-02-01 12:43 +0000
Re: Between CISC and RISC MitchAlsup <MitchAlsup@aol.com> - 2016-02-01 06:44 -0800
Re: Between CISC and RISC Ivan Godard <ivan@millcomputing.com> - 2015-12-24 13:03 -0800
Re: Between CISC and RISC Quadibloc <jsavard@ecn.ab.ca> - 2015-12-24 16:35 -0800
Re: Between CISC and RISC Ivan Godard <ivan@millcomputing.com> - 2015-12-24 16:45 -0800
Re: Between CISC and RISC Quadibloc <jsavard@ecn.ab.ca> - 2016-01-31 07:14 -0800
Re: Between CISC and RISC MitchAlsup <MitchAlsup@aol.com> - 2015-12-25 07:21 -0800
Re: Between CISC and RISC Quadibloc <jsavard@ecn.ab.ca> - 2015-12-25 07:39 -0800
Re: Between CISC and RISC George Neuner <gneuner2@comcast.net> - 2015-12-25 11:53 -0500
Re: Between CISC and RISC MitchAlsup <MitchAlsup@aol.com> - 2016-01-31 10:10 -0800
Re: Between CISC and RISC Robert Wessel <robertwessel2@yahoo.com> - 2016-01-31 23:34 -0600
Re: Between CISC and RISC Quadibloc <jsavard@ecn.ab.ca> - 2015-12-26 10:07 -0800
Page 3 of 7 — ← Prev page 1 2 [3] 4 5 6 7 Next page →
| From | Joe Pfeiffer <pfeiffer@cs.nmsu.edu> |
|---|---|
| Date | 2015-12-13 10:12 -0700 |
| Subject | Re: ones complement, was Between |
| Message-ID | <1ba8pexofs.fsf@pfeifferfamily.net> |
| In reply to | #31804 |
John Levine <johnl@iecc.com> writes: >>> The 704 was not a cheap computer, and ones' comp seemed pretty popular >>> until the S/360 was all two's comp all the time. It seems unlikely >>> that all of those designers in the 1950s and early 1960s were stupid >>> (Seymour Cray? really?) but I still don't see what the appeal was. >>> Everyone knew about two's comp since the famous Von Neumann report >>> described it and the EDVAC used it. >> >>You have to admit it's inelegant to have a value that can't be negated without overflow! >> >>Both the other choices avoid that. > > You are of course correct, but two forms of zero ain't the apex of > elegance and (I would think) is something applications have to deal > with a lot more often. Both other choices have that. Still baffled. > > Sign magnitude makes some sense for easier I/O conversions, > particuarly back when a lot of machines were partly or entirely > decimal. While I've never quite figured out the appeal either, the two zeroes weren't a problem: at least in the case of the CDC6600, you couldn't get -0 through a sequence of arithmetic operations; you had to set it either directly or with logic operations. So, it was a handy representation for an integer NaN.
[toc] | [prev] | [next] | [standalone]
| From | Terje Mathisen <terje.mathisen@tmsw.no> |
|---|---|
| Date | 2015-12-13 21:51 +0100 |
| Subject | Re: ones complement, was Between |
| Message-ID | <n4kloc$9us$1@speranza.aioe.org> |
| In reply to | #31803 |
Bruce Hoult wrote: > On Sunday, December 13, 2015 at 7:52:53 PM UTC+3, John Levine wrote: >>> On Sunday, December 13, 2015 at 8:32:41 AM UTC-7, John Levine wrote: >>> >>>> Can anyone explain what the appeal of ones-complement arithmetic was? >>> >>> The IBM 7090 used sign-magnitude for its integers. >> >> Yup, and it used two's complement subtraction for its index registers. >> >>> One's complement was considered not quite as good as sign-magnitude, but better than (ugh!) two's >>> complement, which only the cheap computers used! >>> >>> And it was totally irrational, at least in my opinion. >> >> The 704 was not a cheap computer, and ones' comp seemed pretty popular >> until the S/360 was all two's comp all the time. It seems unlikely >> that all of those designers in the 1950s and early 1960s were stupid >> (Seymour Cray? really?) but I still don't see what the appeal was. >> Everyone knew about two's comp since the famous Von Neumann report >> described it and the EDVAC used it. > > You have to admit it's inelegant to have a value that can't be negated without overflow! The opposite: It is very elegant to have a symmetrical range + a special (iNaN anyone?) value which can be used to mark uninitialized memory etc. > > Both the other choices avoid that. > :-) Afaik there has never been a machine which actually reserved 0x8000... as a special value, not to be used as an integer? Terje -- - <Terje.Mathisen at tmsw.no> "almost all programming can be viewed as an exercise in caching"
[toc] | [prev] | [next] | [standalone]
| From | Jan Coombs <jan_coombs@murmic.plus.com> |
|---|---|
| Date | 2015-12-13 22:18 +0000 |
| Subject | Re: ones complement, was Between |
| Message-ID | <20151213221856.0cfb0089@TP-T500> |
| In reply to | #31818 |
On Sun, 13 Dec 2015 21:51:26 +0100 Terje Mathisen <terje.mathisen@tmsw.no> wrote: > Bruce Hoult wrote: > > > > You have to admit it's inelegant to have a value that can't > > be negated without overflow! > > The opposite: > > It is very elegant to have a symmetrical range + a special > (iNaN anyone?) value which can be used to mark uninitialized > memory etc. > > > > Both the other choices avoid that. > > > > :-) > > Afaik there has never been a machine which actually reserved > 0x8000... as a special value, not to be used as an integer? > Transputer - a hardware reserved value to indicate that a link port is busy/empty. I doubt that this was reserved for integer operation. Unless the value resulted from computation, and you then tried to pass it on as an inter-task message!? Jan Coombs.
[toc] | [prev] | [next] | [standalone]
| From | MitchAlsup <MitchAlsup@aol.com> |
|---|---|
| Date | 2015-12-13 10:15 -0800 |
| Subject | Re: ones complement, was Between |
| Message-ID | <ec4ea9f5-dd72-4336-bf78-31cd4cbbf421@googlegroups.com> |
| In reply to | #31796 |
On Sunday, December 13, 2015 at 9:32:41 AM UTC-6, John Levine wrote: > >> Any ones-complement architectures left? > > Can anyone explain what the appeal of ones-complement arithmetic was? > > I realize there's one less step when you negate or subtract, but the > end-around carry and the pain of two forms of zero would need at least > as many gates. A) The speed of 1-s complement addition was equal to the speed of 2-s complement addition. B) there is an appeal of a symmetric range -MAX == - (+MAX) C) negation == bit-inversion The real question is what is the appeal of 2-s complement?
[toc] | [prev] | [next] | [standalone]
| From | Megol <golem960@gmail.com> |
|---|---|
| Date | 2015-12-13 12:18 -0800 |
| Subject | Re: ones complement, was Between |
| Message-ID | <aa17035b-cd89-48f6-b057-35b81d16f00e@googlegroups.com> |
| In reply to | #31813 |
On Sunday, December 13, 2015 at 7:15:51 PM UTC+1, MitchAlsup wrote: > On Sunday, December 13, 2015 at 9:32:41 AM UTC-6, John Levine wrote: > > >> Any ones-complement architectures left? > > > > Can anyone explain what the appeal of ones-complement arithmetic was? > > > > I realize there's one less step when you negate or subtract, but the > > end-around carry and the pain of two forms of zero would need at least > > as many gates. > > A) The speed of 1-s complement addition was equal to the speed of 2-s > complement addition. > > B) there is an appeal of a symmetric range -MAX == - (+MAX) > > C) negation == bit-inversion > > The real question is what is the appeal of 2-s complement? Avoiding the wrapping carry?
[toc] | [prev] | [next] | [standalone]
| From | Terje Mathisen <terje.mathisen@tmsw.no> |
|---|---|
| Date | 2015-12-13 22:00 +0100 |
| Subject | Re: ones complement, was Between |
| Message-ID | <n4km9a$bvv$2@speranza.aioe.org> |
| In reply to | #31813 |
MitchAlsup wrote: > On Sunday, December 13, 2015 at 9:32:41 AM UTC-6, John Levine wrote: >>>> Any ones-complement architectures left? >> >> Can anyone explain what the appeal of ones-complement arithmetic was? >> >> I realize there's one less step when you negate or subtract, but the >> end-around carry and the pain of two forms of zero would need at least >> as many gates. > > A) The speed of 1-s complement addition was equal to the speed of 2-s > complement addition. > > B) there is an appeal of a symmetric range -MAX == - (+MAX) > > C) negation == bit-inversion > > The real question is what is the appeal of 2-s complement? > A single instruction can do both signed and unsigned operations? I.e. an ADD gives the same binary result for both signed and unsigned inputs. Terje -- - <Terje.Mathisen at tmsw.no> "almost all programming can be viewed as an exercise in caching"
[toc] | [prev] | [next] | [standalone]
| From | Ivan Godard <ivan@millcomputing.com> |
|---|---|
| Date | 2015-12-13 13:07 -0800 |
| Subject | Re: ones complement, was Between |
| Message-ID | <n4kmhs$jfp$1@dont-email.me> |
| In reply to | #31821 |
On 12/13/2015 1:00 PM, Terje Mathisen wrote: > MitchAlsup wrote: >> On Sunday, December 13, 2015 at 9:32:41 AM UTC-6, John Levine >> wrote: >>>>> Any ones-complement architectures left? >>> >>> Can anyone explain what the appeal of ones-complement arithmetic >>> was? >>> >>> I realize there's one less step when you negate or subtract, but >>> the end-around carry and the pain of two forms of zero would need >>> at least as many gates. >> >> A) The speed of 1-s complement addition was equal to the speed of >> 2-s complement addition. >> >> B) there is an appeal of a symmetric range -MAX == - (+MAX) >> >> C) negation == bit-inversion >> >> The real question is what is the appeal of 2-s complement? >> > A single instruction can do both signed and unsigned operations? > > I.e. an ADD gives the same binary result for both signed and unsigned > inputs. But different overflow conditions. So if you care about overflow then you need two ops.
[toc] | [prev] | [next] | [standalone]
| From | Terje Mathisen <terje.mathisen@tmsw.no> |
|---|---|
| Date | 2015-12-14 10:15 +0100 |
| Subject | Re: ones complement, was Between |
| Message-ID | <n4m1al$urv$1@speranza.aioe.org> |
| In reply to | #31822 |
Ivan Godard wrote: > On 12/13/2015 1:00 PM, Terje Mathisen wrote: >> A single instruction can do both signed and unsigned operations? >> >> I.e. an ADD gives the same binary result for both signed and unsigned >> inputs. > > But different overflow conditions. So if you care about overflow then > you need two ops. Isn't that already handled with separate Overflow (O) and Carry (C) bits in the status flags? I.e. one that it set assuming signed inputs, the other assuming unsigned? I.e. the ADD generates both, it is up to the following code if it wants to inspect/handle any/all of them. Terje -- - <Terje.Mathisen at tmsw.no> "almost all programming can be viewed as an exercise in caching"
[toc] | [prev] | [next] | [standalone]
| From | Ivan Godard <ivan@millcomputing.com> |
|---|---|
| Date | 2015-12-14 01:39 -0800 |
| Subject | Re: ones complement, was Between |
| Message-ID | <n4m2jg$kup$1@dont-email.me> |
| In reply to | #31837 |
On 12/14/2015 1:15 AM, Terje Mathisen wrote: > Ivan Godard wrote: >> On 12/13/2015 1:00 PM, Terje Mathisen wrote: >>> A single instruction can do both signed and unsigned operations? >>> >>> I.e. an ADD gives the same binary result for both signed and unsigned >>> inputs. >> >> But different overflow conditions. So if you care about overflow then >> you need two ops. > > Isn't that already handled with separate Overflow (O) and Carry (C) bits > in the status flags? I.e. one that it set assuming signed inputs, the > other assuming unsigned? > > I.e. the ADD generates both, it is up to the following code if it wants > to inspect/handle any/all of them. > > Terje > Assuming the hardware has condition codes. And that you want to spend the code to test.
[toc] | [prev] | [next] | [standalone]
| From | already5chosen@yahoo.com |
|---|---|
| Date | 2015-12-14 01:59 -0800 |
| Subject | Re: ones complement, was Between |
| Message-ID | <2b740e11-8eaa-488d-a3a0-f73533a7073f@googlegroups.com> |
| In reply to | #31837 |
On Monday, December 14, 2015 at 11:15:06 AM UTC+2, Terje Mathisen wrote: > Ivan Godard wrote: > > On 12/13/2015 1:00 PM, Terje Mathisen wrote: > >> A single instruction can do both signed and unsigned operations? > >> > >> I.e. an ADD gives the same binary result for both signed and unsigned > >> inputs. > > > > But different overflow conditions. So if you care about overflow then > > you need two ops. > > Isn't that already handled with separate Overflow (O) and Carry (C) bits > in the status flags? I.e. one that it set assuming signed inputs, the > other assuming unsigned? > > I.e. the ADD generates both, it is up to the following code if it wants > to inspect/handle any/all of them. I'd guess, by Ivan's classification it's called "to not care about overflow". "To care about overflow" = to make an operation that checks overflow as cheap as the the operation that does not check overflow. > > Terje > > -- > - <Terje.Mathisen at tmsw.no> > "almost all programming can be viewed as an exercise in caching"
[toc] | [prev] | [next] | [standalone]
| From | Terje Mathisen <terje.mathisen@tmsw.no> |
|---|---|
| Date | 2015-12-14 14:21 +0100 |
| Subject | Re: ones complement, was Between |
| Message-ID | <n4mfp0$2bq$1@speranza.aioe.org> |
| In reply to | #31842 |
already5chosen@yahoo.com wrote: > On Monday, December 14, 2015 at 11:15:06 AM UTC+2, Terje Mathisen > wrote: >> Ivan Godard wrote: >>> On 12/13/2015 1:00 PM, Terje Mathisen wrote: >>>> A single instruction can do both signed and unsigned >>>> operations? >>>> >>>> I.e. an ADD gives the same binary result for both signed and >>>> unsigned inputs. >>> >>> But different overflow conditions. So if you care about overflow >>> then you need two ops. >> >> Isn't that already handled with separate Overflow (O) and Carry (C) >> bits in the status flags? I.e. one that it set assuming signed >> inputs, the other assuming unsigned? >> >> I.e. the ADD generates both, it is up to the following code if it >> wants to inspect/handle any/all of them. > > I'd guess, by Ivan's classification it's called "to not care about > overflow". "To care about overflow" = to make an operation that > checks overflow as cheap as the the operation that does not check > overflow. The key issue here isn't really checking overflow, but how to handle exceptions at user level! I.e. if you can make user level trap handling cheap enough then you can use straight-line code for the normal case and depend on getting traps when something bad happens. If you have to implement this with explicit test/branch after every operation (using branch prediction slots etc) then the cost is so high that most people have decided they would rather take a chance and ignore the problem. Terje -- - <Terje.Mathisen at tmsw.no> "almost all programming can be viewed as an exercise in caching"
[toc] | [prev] | [next] | [standalone]
| From | nmm@wheeler.UUCP (Nick Maclaren) |
|---|---|
| Date | 2015-12-14 14:21 +0000 |
| Subject | Re: ones complement, was Between |
| Message-ID | <n4mj8j$jb6$1@dont-email.me> |
| In reply to | #31846 |
In article <n4mfp0$2bq$1@speranza.aioe.org>, Terje Mathisen <terje.mathisen@tmsw.no> wrote: >already5chosen@yahoo.com wrote: >> >> I'd guess, by Ivan's classification it's called "to not care about >> overflow". "To care about overflow" = to make an operation that >> checks overflow as cheap as the the operation that does not check >> overflow. > >The key issue here isn't really checking overflow, but how to handle >exceptions at user level! > >I.e. if you can make user level trap handling cheap enough then you can >use straight-line code for the normal case and depend on getting traps >when something bad happens. There are other approaches. One is to have a NaN value, done properly (i.e. not like IEEE 754), when you need traps only on conditionals. But even conventional trap technology is good enough, because it allows trap-diagnose-and-terminate, which experience shows is adequate. The reasons that it is not done are not because it is hard to do. Regards, Nick Maclaren.
[toc] | [prev] | [next] | [standalone]
| From | already5chosen@yahoo.com |
|---|---|
| Date | 2015-12-14 07:03 -0800 |
| Subject | Re: ones complement, was Between |
| Message-ID | <829ac3c0-69b5-4ca7-ad19-925e472efb60@googlegroups.com> |
| In reply to | #31846 |
On Monday, December 14, 2015 at 3:21:40 PM UTC+2, Terje Mathisen wrote: > already5chosen@yahoo.com wrote: > > On Monday, December 14, 2015 at 11:15:06 AM UTC+2, Terje Mathisen > > wrote: > >> Ivan Godard wrote: > >>> On 12/13/2015 1:00 PM, Terje Mathisen wrote: > >>>> A single instruction can do both signed and unsigned > >>>> operations? > >>>> > >>>> I.e. an ADD gives the same binary result for both signed and > >>>> unsigned inputs. > >>> > >>> But different overflow conditions. So if you care about overflow > >>> then you need two ops. > >> > >> Isn't that already handled with separate Overflow (O) and Carry (C) > >> bits in the status flags? I.e. one that it set assuming signed > >> inputs, the other assuming unsigned? > >> > >> I.e. the ADD generates both, it is up to the following code if it > >> wants to inspect/handle any/all of them. > > > > I'd guess, by Ivan's classification it's called "to not care about > > overflow". "To care about overflow" = to make an operation that > > checks overflow as cheap as the the operation that does not check > > overflow. > > The key issue here isn't really checking overflow, but how to handle > exceptions at user level! > > I.e. if you can make user level trap handling cheap enough then you can > use straight-line code for the normal case and depend on getting traps > when something bad happens. > I don't see why "make user level trap handling cheap enough" is particularly desirable. That is, yes, cheap is better than expensive, but speed of the trap delivery should be our least important concern. By far. If trap delivery by means of slow trip to kernel and back makes anything else even a little bit faster, smaller or easier, than it shell be chosen over alternatives. > If you have to implement this with explicit test/branch after every > operation (using branch prediction slots etc) then the cost is so high > that most people have decided they would rather take a chance and ignore > the problem. I think, Ivan is coming from the school in which even addition of single-byte opcode, like x86 INTO, is already considered too expensive. He want literally the same cost for checked and unchecked arithmetic options. But, of course, Ivan can speak for himself. I, personally, is coming from the school that is not willing to do [automatic] overflow checks of signed integer arithmetic regardless of its cost. We (I) tend to think that such checks are harmful much more often than they are helpful. And, of course, we like to point to $7B Ariane 5 mission failure as a proof. > > Terje > > -- > - <Terje.Mathisen at tmsw.no> > "almost all programming can be viewed as an exercise in caching"
[toc] | [prev] | [next] | [standalone]
| From | nmm@wheeler.UUCP (Nick Maclaren) |
|---|---|
| Date | 2015-12-14 15:50 +0000 |
| Subject | Re: ones complement, was Between |
| Message-ID | <n4mogk$993$1@dont-email.me> |
| In reply to | #31851 |
In article <829ac3c0-69b5-4ca7-ad19-925e472efb60@googlegroups.com>, <already5chosen@yahoo.com> wrote: >On Monday, December 14, 2015 at 3:21:40 PM UTC+2, Terje Mathisen wrote: >> > checks overflow as cheap as the the operation that does not check >> > overflow. >> >> The key issue here isn't really checking overflow, but how to handle >> exceptions at user level! >> >> I.e. if you can make user level trap handling cheap enough then you can >> use straight-line code for the normal case and depend on getting traps >> when something bad happens. > >I don't see why "make user level trap handling cheap enough" is >particularly desirable. That is, yes, cheap is better than expensive, >but speed of the trap delivery should be our least important concern. By >far. >If trap delivery by means of slow trip to kernel and back makes anything >else even a little bit faster, smaller or easier, than it shell be >chosen over alternatives. Slow interrupt handling is a disaster when it is used for architecture extension, or when it it is used to provide optional exception handling. Both used to be the case and, for some completely insane reason, it was often MUCH slower than several system calls and unpredicted branches! But that's not the reason that the kernel trip is a Bad Idea. It's because it is a security and RAS disaster area, and makes it impossible for run-time systems to support it without system help. And, for various reasons, most operating system (and often hardware) people simply do not have a clue about run-time system requirements. And THAT is why it isn't available today on any system that I know of :-( Regards, Nick Maclaren.
[toc] | [prev] | [next] | [standalone]
| From | MitchAlsup <MitchAlsup@aol.com> |
|---|---|
| Date | 2015-12-14 16:34 -0800 |
| Subject | Re: ones complement, was Between |
| Message-ID | <bd9f036d-8cb2-470d-aae5-65d7835f0599@googlegroups.com> |
| In reply to | #31853 |
On Monday, December 14, 2015 at 9:53:16 AM UTC-6, Nick Maclaren wrote: > Slow interrupt handling is a disaster The sentence should stop right here. Given a modern RISC or even CISC instruction set and register organization, interrupt (or exception) control transfer should not be any more than twice number of cycles it takes to push&pull the number of cache lines that are used to hold the register context, plus the number of cache accesses used to reload the TLB root pointer information, plus the fetch of the instructions at the interrupt handler. But contemporary machines tend to make the actual overhead closer to 10X the above calculation. > when it is used for architecture > extension, or when it it is used to provide optional exception handling. > Both used to be the case and, for some completely insane reason, it was > often MUCH slower than several system calls and unpredicted branches! That is before you wipe out the cache and TLB images of the interrupted process. > But that's not the reason that the kernel trip is a Bad Idea. > > It's because it is a security and RAS disaster area, and makes it > impossible for run-time systems to support it without system help. A properly setup signal handler should be able to intercept a page fault exception*, take a RO look at the mapping tables, and ask the underlying OS to fix the problem by doing this and that; without having an excursion through the OS before getting to the handler! (*) or any other user level exception. A properly setup interrupt handler is similar except that the signal handler operates in the context of the device driver and not the interrupted task/process/thread. No excursion through the OS should be necessary; at least until the interrupt handler tells the OS to schedule the cleanup thread to deal with interrupt context[k] when priorities allow. > And, for various reasons, most operating system (and often hardware) > people simply do not have a clue about run-time system requirements. > And THAT is why it isn't available today on any system that I know > of :-( Most of the problem is that the architecture of interrupt and exception processing is just plain crap (workable, but just plain crap, nonetheless) in machine currently on the market. Mitch
[toc] | [prev] | [next] | [standalone]
| From | Ivan Godard <ivan@millcomputing.com> |
|---|---|
| Date | 2015-12-14 18:42 -0800 |
| Subject | Re: ones complement, was Between |
| Message-ID | <n4nuhg$jv$1@dont-email.me> |
| In reply to | #31864 |
On 12/14/2015 4:34 PM, MitchAlsup wrote: > On Monday, December 14, 2015 at 9:53:16 AM UTC-6, Nick Maclaren wrote: > >> Slow interrupt handling is a disaster > > The sentence should stop right here. > > Given a modern RISC or even CISC instruction set and register organization, > interrupt (or exception) control transfer should not be any more than > twice number of cycles it takes to push&pull the number of cache lines that > are used to hold the register context, plus the number of cache accesses > used to reload the TLB root pointer information, plus the fetch of the > instructions at the interrupt handler. Doesn't have to be that much. The only unavoidable part is the instruction fetch, because the interrupt will be both mispredicted and infrequent enough that the code will not be in the top caches. Everything else can be overlapped with the code fetch, so the total time should be no more than that of a very-rarely-taken mispredict. > But contemporary machines tend to make the actual overhead closer to > 10X the above calculation. > >> when it is used for architecture >> extension, or when it it is used to provide optional exception handling. >> Both used to be the case and, for some completely insane reason, it was >> often MUCH slower than several system calls and unpredicted branches! > > That is before you wipe out the cache and TLB images of the interrupted > process. Nick wants userland interrupt handling, which would not do a wipe out. However, he also wants resumption exception semantics and that is *very* hard to do. >> But that's not the reason that the kernel trip is a Bad Idea. >> >> It's because it is a security and RAS disaster area, and makes it >> impossible for run-time systems to support it without system help. > > A properly setup signal handler should be able to intercept a page fault > exception*, take a RO look at the mapping tables, and ask the underlying > OS to fix the problem by doing this and that; without having an excursion > through the OS before getting to the handler! > > (*) or any other user level exception. > > A properly setup interrupt handler is similar except that the signal > handler operates in the context of the device driver and not the interrupted > task/process/thread. No excursion through the OS should be necessary; > at least until the interrupt handler tells the OS to schedule the cleanup > thread to deal with interrupt context[k] when priorities allow. The problem is how does the interrupt handler operate in the driver context without a trip through the OS. We (Mill) can do it, and various caps machines can do it, but no conventional machines I am aware of can do it. Trying to use the interrupted processes stack etc runs into problems with quotas and stack overflow, so you pretty much must have hardware task switch with the driver context being a task that the hardware can switch to. But that raises priority and ordering issues, which the OS handles by the structure of the readyq and the related algorithms. Moving that into a hardware task switch is not trivial. >> And, for various reasons, most operating system (and often hardware) >> people simply do not have a clue about run-time system requirements. >> And THAT is why it isn't available today on any system that I know >> of :-( > > Most of the problem is that the architecture of interrupt and exception > processing is just plain crap (workable, but just plain crap, nonetheless) > in machine currently on the market. Amen.
[toc] | [prev] | [next] | [standalone]
| From | nmm@wheeler.UUCP (Nick Maclaren) |
|---|---|
| Date | 2015-12-15 09:13 +0000 |
| Subject | Re: ones complement, was Between |
| Message-ID | <n4olka$t3e$1@dont-email.me> |
| In reply to | #31869 |
In article <n4nuhg$jv$1@dont-email.me>, Ivan Godard <ivan@millcomputing.com> wrote: >On 12/14/2015 4:34 PM, MitchAlsup wrote: > >Nick wants userland interrupt handling, which would not do a wipe out. >However, he also wants resumption exception semantics and that is >*very* hard to do. Yes, to the first. But, because the latter is so hard, both at the hardware and run-time system levels, my belief is that the best compromise is to support enough recovery for trap-diagnose-and-terminate, which could be scoped in some languages, and leave it at that. I.e. everything that is active gets abandoned in an undefined state, but everything done before the last 'interrupt-safe fence' is guaranteed to be completed. And, yes, those fences would force quite a large delay. Tough. >The problem is how does the interrupt handler operate in the driver >context without a trip through the OS. We (Mill) can do it, and various >caps machines can do it, but no conventional machines I am aware of can >do it. But they USED to - at least for many classes of interrupt :-( >Trying to use the interrupted processes stack etc runs into problems >with quotas and stack overflow, so you pretty much must have hardware >task switch with the driver context being a task that the hardware can >switch to. But that raises priority and ordering issues, which the OS >handles by the structure of the readyq and the related algorithms. >Moving that into a hardware task switch is not trivial. I don't see the problem if you suspend the interrupted task and use its priority and ordering, except for the management of the save area and stack. That's easy enough by always reserving them when you start a task, until you need to consider complex handlers or nested interrupts. Those are soluble, but not nicely. >> Most of the problem is that the architecture of interrupt and exception >> processing is just plain crap (workable, but just plain crap, nonetheless) >> in machine currently on the market. > >Amen. We are all agreed there! Regards, Nick Maclaren.
[toc] | [prev] | [next] | [standalone]
| From | nmm@wheeler.UUCP (Nick Maclaren) |
|---|---|
| Date | 2015-12-15 09:25 +0000 |
| Subject | Re: ones complement, was Between |
| Message-ID | <n4oma4$vcs$1@dont-email.me> |
| In reply to | #31869 |
In article <n4nuhg$jv$1@dont-email.me>, Ivan Godard <ivan@millcomputing.com> wrote: > >However, he also wants resumption exception semantics and that is >*very* hard to do. I have mentioned that this is a misunderstanding, but forgot to say that it has to be provided in current systems for device, timer and time-slice interrupts. Device interrupts should be moved to other cores, timer interrupts are imbecilic beyond belief, and even time-slice interrupts could be eliminated using a method I have posted before. Regards, Nick Maclaren.
[toc] | [prev] | [next] | [standalone]
| From | nmm@wheeler.UUCP (Nick Maclaren) |
|---|---|
| Date | 2015-12-15 08:53 +0000 |
| Subject | Re: ones complement, was Between |
| Message-ID | <n4okeq$p4u$1@dont-email.me> |
| In reply to | #31864 |
In article <bd9f036d-8cb2-470d-aae5-65d7835f0599@googlegroups.com>, MitchAlsup <MitchAlsup@aol.com> wrote: > >> Slow interrupt handling is a disaster > >The sentence should stop right here. > >Given a modern RISC or even CISC instruction set and register organization, >interrupt (or exception) control transfer should not be any more than >twice number of cycles it takes to push&pull the number of cache lines that >are used to hold the register context, plus the number of cache accesses >used to reload the TLB root pointer information, plus the fetch of the >instructions at the interrupt handler. Absolutely. But, in some cases, its cost isn't important. I agree that it's incompetent, at best. You didn't mention the cost of an unpredicted branch, which should go in there, but that's a niggle. >But contemporary machines tend to make the actual overhead closer to >10X the above calculation. And earlier ones. It seems to be a blind spot for hardware and operating system people. >> But that's not the reason that the kernel trip is a Bad Idea. >> >> It's because it is a security and RAS disaster area, and makes it >> impossible for run-time systems to support it without system help. > >A properly setup signal handler should be able to intercept a page fault >exception*, take a RO look at the mapping tables, and ask the underlying >OS to fix the problem by doing this and that; without having an excursion >through the OS before getting to the handler! > >(*) or any other user level exception. My point is mainly about the application-triggered interrupts. For other misdesign reasons, the FLIH runs at a very high priority, and so an application can impose a very high (and non-interruptible) system load, including flushing the cache and TLB (as you say). If that causes enough of a slowdown for (say) devices to miss interrupts, it's Bad News. Pure application-triggered interrupts like overflow shouldn't use the kernel interrupt mechanism at all. >A properly setup interrupt handler is similar except that the signal >handler operates in the context of the device driver and not the interrupted >task/process/thread. No excursion through the OS should be necessary; >at least until the interrupt handler tells the OS to schedule the cleanup >thread to deal with interrupt context[k] when priorities allow. Well, device drivers are really part of the OS in most modern systems, though I agree that they shouldn't be. But they are a disaster for many applications, when they can interrupt the application, because of the timing/caching/TLB chaos they cause. So they should be well separated, and most modern systems now have some (usually bad) tools to do that. Regards, Nick Maclaren.
[toc] | [prev] | [next] | [standalone]
| From | Terje Mathisen <terje.mathisen@tmsw.no> |
|---|---|
| Date | 2015-12-14 18:25 +0100 |
| Subject | Re: ones complement, was Between |
| Message-ID | <n4mu22$6do$1@speranza.aioe.org> |
| In reply to | #31851 |
already5chosen@yahoo.com wrote: > On Monday, December 14, 2015 at 3:21:40 PM UTC+2, Terje Mathisen > wrote: >> already5chosen@yahoo.com wrote: >>> I'd guess, by Ivan's classification it's called "to not care >>> about overflow". "To care about overflow" = to make an operation >>> that checks overflow as cheap as the the operation that does not >>> check overflow. >> >> The key issue here isn't really checking overflow, but how to >> handle exceptions at user level! >> >> I.e. if you can make user level trap handling cheap enough then you >> can use straight-line code for the normal case and depend on >> getting traps when something bad happens. >> > > I don't see why "make user level trap handling cheap enough" is > particularly desirable. That is, yes, cheap is better than expensive, > but speed of the trap delivery should be our least important concern. > By far. If trap delivery by means of slow trip to kernel and back > makes anything else even a little bit faster, smaller or easier, than > it shell be chosen over alternatives. Sure. > >> If you have to implement this with explicit test/branch after >> every operation (using branch prediction slots etc) then the cost >> is so high that most people have decided they would rather take a >> chance and ignore the problem. > > I think, Ivan is coming from the school in which even addition of > single-byte opcode, like x86 INTO, is already considered too > expensive. He want literally the same cost for checked and unchecked > arithmetic options. But, of course, Ivan can speak for himself. Ivan and I mostly agree, that's one of the reasons why I'm working on his Mill. > > I, personally, is coming from the school that is not willing to do > [automatic] overflow checks of signed integer arithmetic regardless > of its cost. We (I) tend to think that such checks are harmful much > more often than they are helpful. And, of course, we like to point to > $7B Ariane 5 mission failure as a proof. I'm from the 'C integers are badly broken, so don't ever use them unless you absolutely have to' school. I have very seldom seen integer code that wouldn't work better/faster/more portably using unsigned instead. When I do need integers then it would be nice if I could have a user-level trap to catch overflows and automatically convert the result to a bigint style extended/arbitrary precision variable instead. Terje -- - <Terje.Mathisen at tmsw.no> "almost all programming can be viewed as an exercise in caching"
[toc] | [prev] | [next] | [standalone]
Page 3 of 7 — ← Prev page 1 2 [3] 4 5 6 7 Next page →
Back to top | Article view | comp.arch
csiph-web