Liste des Groupes | Revenir à c arch |
uloadD:something along the lines of:>
uload:
// addi a5,a0,7 // unnecessary
andi a4,a0,-8
// andi a5,a5,-8 // unnecessary
ld a2,8(a4) // load higher
ld a3,0(a4) // load lower
neg a4,a0
andi a4,a4,7
andi a0,a0,7
slliw a4,a4,3
slliw a5,a0,3
sll a5,a3,a5
sra a0,a2,a4
or a0,a0,a5
ret
>
Fewer instructions, and also a better distribution between various
functional units.
>
IIRC it's only three instructions on MIPS and five instructions on
Alpha, but they have special instructions for this case, because they
were designed for it, whereas RISC-V was designed to have unaligned
accesses.
>
- anton
Les messages affichés proviennent d'usenet.