Article View: comp.arch
Article #1000Fitting in Short Instructions
From: John Savard
Date: Tue, 01 Dec 2026 07:05
Date: Tue, 01 Dec 2026 07:05
29 lines
2282 bytes
2282 bytes
A short operate instruction needs at least 17 bits; seven bits for opcode, and five each for source and destination register. That's obviously a problem. So I've thought of various ways around it. Don't use all the registers. Limit the opcode space. Restrict which registers can be used together. But something has occurred to me: there is a useful property of the code which I could exploit. Instead of using ten bits for a full destination and source register specification, I might be able to get away with just using seven. The destination register gets a five-bit field for a full register specification. The source register, though, is indicated by a two-bit field with the following meanings: 00 - the destination register of the previous instruction 01 - the destination register of the instruction before that and so on. Since the result registers of integer instructions are irrelevant to floating-point instructions and vice-versa, one could have two separate stacks of register pointers. Or eight, handling operands of each length separately. Maintaining the stacks is extra overhead, but it allows instructions to be specified in a very compact way - and the stacks only contain register pointers, not values, so it's simpler than an actual stack architecture. John Savard
Technical Details
Message-ID:
<6b0e6f8f.17868593@news.eternal-september.org>Path:
mbox-mo1.pugleaf.net!srv.newsdeef.eu!news.hispagatos.org!eternal-september.org!feeder.eternal-september.org!nntp.eternal-september.org!.POSTED!not-for-mailShow Full Headers
Complete Article Headers
Path: mbox-mo1.pugleaf.net!srv.newsdeef.eu!news.hispagatos.org!eternal-september.org!feeder.eternal-september.org!nntp.eternal-september.org!.POSTED!not-for-mail From: quadibloc@invalid.com (John Savard) Newsgroups: comp.arch Subject: Fitting in Short Instructions Date: Tue, 01 Dec 2026 07:05:01 GMT Organization: A noiseless patient Spider Lines: 29 Message-ID: <6b0e6f8f.17868593@news.eternal-september.org> Injection-Date: Tue, 01 Dec 2026 07:05:01 +0000 (UTC) Injection-Info: dont-email.me; logging-data="1431573"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX1+KI2rVNh+qbCmduha7hj3+9SCLBz0tJZI="; posting-host="816d074fcf501c0ec6c27351baf9651c" Cancel-Lock: sha1:04Q1Q0Qhi93ltjmP0zPcsR8Qgl4= sha256:NWNlc8L+PpzK4XuiKeLQmX1d+/Da1ZI1zQqydrM0ifM= sha1:cFFl8EXpA1FKKxGZwsbramMDXfo= sha256:Bqog1VGlGS+fUpobIq2TGPQq3eyxzLoYBJIfgsi1wr8= X-Newsreader: Forte Free Agent 1.1/32.230