Article View: comp.arch
Article #556Re: two's complement and Flags (Re: arithmetic and endian history)
From: Terje Mathisen
Date: Fri, 06 Nov 2026 19:50
Date: Fri, 06 Nov 2026 19:50
34 lines
2727 bytes
2727 bytes
Anton Ertl wrote: > Terje Mathisen <terje.mathisen@tmsw.no> writes: > [add with carry-in and carry-out] >> On Alpha you needed to play tricks with predicated instructions, afair >> you had two forms of ADD, one that just added two registers and one that >> did the same plus an extra increment which represented an incoming carry. > > No, Alpha is just like MIPS and RISC-V. For RISC-V: > > add tmp1, carry, summand1 > sltu carry1, tmp1, summand1 > add sum, tmp1, summand2 > sltu carry2, sum, tmp1 > add carry, carry2, carry1 > > Alpha has no predicated instructions apart from a conditional move and > no addition with an extra increment. > > What you describe reminds me of IA-64; it certeinly selects between > a+b and a+b+1 with predication, but I don't remember how it gets the > carry-out into a flag. Mea Culpa! You are correct, I mixed up Alpha and IA-64. In my defense I wrote some asm kernels for both, without ever having access to actual HW. :-( Terje -- - <Terje.Mathisen at tmsw.no> "almost all programming can be viewed as an exercise in caching"
Technical Details
Message-ID:
<11clb2q$2reo0$1@dont-email.me>Path:
mbox-mo1.pugleaf.net!archive.usenet.blueworldhosting.com!usenet.blueworldhosting.com!diablo1.usenet.blueworldhosting.com!eternal-september.org!feeder.eternal-september.org!nntp.eternal-september.org!.POSTED!not-for-mailReferences:
<10uks4f$1dqo$1@gal.iecc.com> <11cai8f$32ue7$1@dont-email.me> <11caljv$jeo$1@gal.iecc.com> <6ae8eec0.35320218@news.eternal-september.org> <11cjh58$1flq$4@gal.iecc.com> <2026Nov6.072410@mips.complang.tuwien.ac.at> <11ckcg9$2f7hg$1@dont-email.me> <2026Nov6.160841@mips.complang.tuwien.ac.at>Show Full Headers
Complete Article Headers
Path: mbox-mo1.pugleaf.net!archive.usenet.blueworldhosting.com!usenet.blueworldhosting.com!diablo1.usenet.blueworldhosting.com!eternal-september.org!feeder.eternal-september.org!nntp.eternal-september.org!.POSTED!not-for-mail From: Terje Mathisen <terje.mathisen@tmsw.no> Newsgroups: comp.arch Subject: Re: two's complement and Flags (Re: arithmetic and endian history) Date: Fri, 6 Nov 2026 20:50:50 +0100 Organization: A noiseless patient Spider Lines: 34 Message-ID: <11clb2q$2reo0$1@dont-email.me> References: <10uks4f$1dqo$1@gal.iecc.com> <11cai8f$32ue7$1@dont-email.me> <11caljv$jeo$1@gal.iecc.com> <6ae8eec0.35320218@news.eternal-september.org> <11cjh58$1flq$4@gal.iecc.com> <2026Nov6.072410@mips.complang.tuwien.ac.at> <11ckcg9$2f7hg$1@dont-email.me> <2026Nov6.160841@mips.complang.tuwien.ac.at> MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit Injection-Date: Fri, 06 Nov 2026 19:50:51 +0000 (UTC) Injection-Info: dont-email.me; logging-data="2996992"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX1+6zoEPKqIKcpmIUE5Wybf45x3AvWAWTETlvFazhCZlTQ=="; posting-host="caff3e713b4d5d649fc2a6550b066a46" User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:140.0) Gecko/20100101 Firefox/140.0 SeaMonkey/2.53.24 Cancel-Lock: sha1:IvbjPAZBT0T32nrKFdTj8oBooSo= sha256:0G1WytpIWqEm9xOU9ax5PirRr1xWSBl9htQ84ZaQ8ZA= sha1:siCzQ+AELSIEqeP7R8xoCExx3ZE= sha256:UMyIg3SX3riCIpVtvCVCIj6vUFcVIlQStdKVyuEh51g= In-Reply-To: <2026Nov6.160841@mips.complang.tuwien.ac.at>