On Tue, 22 Jul 2025 16:29:28 +0000, John Savard wrote:
But I'm not sure; cramming more and more stuff in has brought me to a
point of being uneasy.
I am now feeling more comfortable with the state that the main
32-bit instruction set without the use of headers is in. I dare
not remove anything more from it, but I see no good way to enlarge
it to put things back in.
Except one. Any unused opcode space would still allow me to assign
two bit combinations to the first and second 32-bit parts of a
64-bit instruction that is available without block structure. This
might be very inefficient, but it would allow non-block programs to still include things like the supplementary memory-reference instructions,
allowing access to special types like register packed decimal and
simple floating without using blocks. I still do think it would be
highly desirable to make the full architecture available without the
block structure if at all possible.
However, at least some of the types of header are not so intrinsically complicated as to make a compiler impossible. The code generator can
produce a string of instructions, and then a packager can note if any instructions are needed that require a header, and then apply a header
to the block an instruction will fall in.
The only problematic case is where such an instruction turns up in the
final position of a block; a header would bump it into the next block.
This could be dealt with by a NOP. Using an un-needed header in the
preceding block, however, is normally preferred, as a NOP, being an instruction, would always take a little time (particularly as, not being
within a block with a header, there would be no indication directing it
to be executed in parallel with other instructions).
Surely, though, that's a sufficiently standard technique that compilers
for many historical architectures have done this. Writing a compiler for
the Itanium, I would think, would be more difficult than writing one to
make use of my architecture. Particularly as the basic no-header
instruction set includes all the instructions a compiler would typically
use (but not the string instructions, which, say, a COBOL compiler would generate, rather than leaving inside standard subroutines).
Now that the "jump to subroutine with offset" instruction is a special
case, present with no headers, but still block-aware in that it can't
begin a block, compilers do have to work a bit - replacing a normal
jump to subroutine, if it isn't indexed, by a JSO where one would be
helpful to skip over stuff between blocks. Again, that should be
trivial - it does mean, though, that, likely, code has to be written,
as it wouldn't mesh with the prefabricated code generator of an existing compiler kit. So even if "writing a compiler" isn't particularly hard,
"porting GCC to the architecture" - or, for that matter, porting LLVM,
might involve difficulties.
John Savard
John Savard
--- SoupGate-Win32 v1.05
* Origin: fsxNet Usenet Gateway (21:1/5)