| Deutsch English Français Italiano |
|
<vp2onf$1rfhu$1@dont-email.me> View for Bookmarking (what is this?) Look up another Usenet article |
Path: ...!weretis.net!feeder9.news.weretis.net!news.quux.org!eternal-september.org!feeder3.eternal-september.org!news.eternal-september.org!eternal-september.org!.POSTED!not-for-mail From: Marcus <m.delete@this.bitsnbites.eu> Newsgroups: comp.arch Subject: Re: Cost of handling misaligned access Date: Tue, 18 Feb 2025 20:57:35 +0100 Organization: A noiseless patient Spider Lines: 31 Message-ID: <vp2onf$1rfhu$1@dont-email.me> References: <5lNnP.1313925$2xE6.991023@fx18.iad> <vnosj6$t5o0$1@dont-email.me> <2025Feb3.075550@mips.complang.tuwien.ac.at> <volg1m$31ca1$1@dont-email.me> <voobnc$3l2dl$1@dont-email.me> <0fc4cc997441e25330ff5c8735247b54@www.novabbs.org> <vp0m3f$1cth6$1@dont-email.me> <vp14j8$1ibtp$1@dont-email.me> <vp1ori$1llrm$1@dont-email.me> <vp2mra$1rfdk$1@dont-email.me> MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit Injection-Date: Tue, 18 Feb 2025 20:57:35 +0100 (CET) Injection-Info: dont-email.me; posting-host="2832f88498b5c7ba24c9fa9198b98b1e"; logging-data="1949246"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX1/G2Ige5CY8+/L8VmhY4u6xmEF0CqCqvS4=" User-Agent: Mozilla Thunderbird Cancel-Lock: sha1:WDl8LJyR0dr6N4xDMNGSocwfqSQ= Content-Language: en-US In-Reply-To: <vp2mra$1rfdk$1@dont-email.me> Bytes: 2274 Den 2025-02-18 kl. 20:25, skrev Brett: > BGB <cr88192@gmail.com> wrote: [snip] >> The smallest cores I had managed had used a simplified SH-based design: >> Fixed-length 16 bit instructions, with 16 registers; >> Only (Reg) and (Reg, R0) addressing; >> Aligned only; >> No shift or multiply; > > You mean no variable shift, or no large shifts, you have to support divide > by 2, right? > Yes, LSL 1 can be implemented by ADD, but LSR/ASR 1 needs a dedicated instruction, right? IIRC the SuperH has some power-of-two shift instructions, e.g: shlr Rn shlr2 Rn shlr4 Rn shlr8 Rn shlr16 Rn It takes up some encoding space and costs extra cycles/instructions to do a full shift (e.g. 7=4+2+1), but I guess you can make relatively cheap shift hardware that way? Maybe you can get away with even fewer instructions (e.g. only 1, 4, 16)?