3 ms·
oh hey, i didn't know gcc shipped with the save-restore millicode and an option to use it, that's cool! with .syntax unified you have a fairly friendly push/po
by kragen 3y ago
oh hey, i didn't know gcc shipped with the save-restore millicode and an option to use it, that's cool!
with .syntax unified you have a fairly friendly push/pop multiple syntax, whether you're using thumb or not
agreed about the instruction encoding complexity over rv32i and about halfwords and signed bytes. the arm7 datasheet includes example sequences for, among other things, loading halfwords, division, and an lfsr, but that kind of detour is exactly the kind of thing that adds potentially unintentional difficulty to classwork
rv32i also has more instructions than armv3 because it has shift instructions, while armv3 has optional shifts or rotates in most instructions, which certainly isn't a reduction in complexity with respect to risc-v
maybe you could make a base32 word dumper using 0123456789abcdefghijklmnopqrstuv? won't help much with the standard risc-v instruction encoding... and once you're swizzling split immediate fields around, you might as well write a disassembler
an octal-friendly rv32c custom encoding might be more achievable. this is vaguely related to graham smecher's "minimax" implementation of risc-v, where the hardware only implements the two-operand compressed instruction set plus a few extra instructions, and uncompressed instructions trap to microcode. or millicode, i guess