Yes — the fragment makes no assumptions about what is in temp registers after the subroutine call.
registers are grouped into those used
as variables and arguments in subroutines
and those used for other purposes.
Subroutines are discussed in a future chapter.
The other uses are discussed as the topic arises.
most fundamental part
of an operating system is
The rest of the OS is mostly implemented
using the functions provided by the kernel.
are reserved for
Applications programs (and most OS subroutines)
should not touch them.
SPIM does not come with an OS.
But it loads a trap handler, if requested,
as well as several of the temporary registers.
used as base registers to
access to various parts of memory.
What does the following assembly language instruction do?
It the contents of register into register .