| Deutsch English Français Italiano |
|
<0cf82bb2f14de806e5b3f4a5044449b2@www.novabbs.org> View for Bookmarking (what is this?) Look up another Usenet article |
Path: ...!weretis.net!feeder8.news.weretis.net!newsfeed.bofh.team!i2pn.org!i2pn2.org!.POSTED!not-for-mail From: mitchalsup@aol.com (MitchAlsup1) Newsgroups: comp.arch Subject: Re: Computer architects leaving Intel... Date: Thu, 5 Sep 2024 19:29:36 +0000 Organization: Rocksolid Light Message-ID: <0cf82bb2f14de806e5b3f4a5044449b2@www.novabbs.org> References: <2024Aug30.161204@mips.complang.tuwien.ac.at> <505954890d8461c1f4082b1beecd453c@www.novabbs.org> <vb0kh2$12ukk$1@dont-email.me> <vb3smg$1ta6s$1@dont-email.me> <vb4q5o$12ukk$3@dont-email.me> <vb6a16$38aj5$1@dont-email.me> <vb7evj$12ukk$4@dont-email.me> <vb8587$3gq7e$1@dont-email.me> <vb91e7$3o797$1@dont-email.me> <vb9eeh$3q993$1@dont-email.me> <vb9l7k$3r2c6$2@dont-email.me> <vba26l$3te44$1@dont-email.me> <vbag2s$3vhih$1@dont-email.me> <vbbnf9$8j04$1@dont-email.me> <vbbsl4$9hdg$1@dont-email.me> <oUiCO.60792$L1Tb.8919@fx11.iad> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 8bit Injection-Info: i2pn2.org; logging-data="979489"; mail-complaints-to="usenet@i2pn2.org"; posting-account="65wTazMNTleAJDh/pRqmKE7ADni/0wesT78+pyiDW8A"; User-Agent: Rocksolid Light X-Rslight-Site: $2y$10$1ohFAiUr.lKvC5qplhcQjOuLb6w7kj5h5wb2myHfbQAM.AlFMUUW6 X-Spam-Checker-Version: SpamAssassin 4.0.0 X-Rslight-Posting-User: ac58ceb75ea22753186dae54d967fed894c3dce8 Bytes: 2040 Lines: 20 On Thu, 5 Sep 2024 14:05:08 +0000, Scott Lurndal wrote: > Terje Mathisen <terje.mathisen@tmsw.no> writes: >>David Brown wrote: >> >>> It would be nice if C had subrange types like Pascal or Ada, but it doe= >>s not.=C2=A0 Usually int - or sizeed ints - are the practical choice. >> >> >>Agreed 100% > > Although absent architecture support, how does one ensure that the > value remains within the subrange? result = min(max(min_range,x),max_range); or for 2^n values result = ( ( x << (64-width) ) >> (64-width) ); The top is 2 instructions, the bottom 1 (both signed and unsigned).