Hi,I have noticed that there are no PUSH and POP instructions. Should the functionality of stack be implemented by software means?
--
You received this message because you are subscribed to the Google Groups "RISC-V ISA Dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email to isa-dev+unsubscribe@groups.riscv.org.
To post to this group, send email to isa...@groups.riscv.org.
Visit this group at https://groups.google.com/a/groups.riscv.org/group/isa-dev/.
To view this discussion on the web visit https://groups.google.com/a/groups.riscv.org/d/msgid/isa-dev/CADNcivnVrXrxrs7Gj9y-nJogi%2BDh3TSeBHBQi5UkKZRJSwDD3A%40mail.gmail.com.
Most commonly you need to save or restore several registers in a row. It can be just as efficient to adjust the stack pointer once and use SP+offset loads or stores instead of PUSH or POP, especially on wide implementations where you might be able to run several loads or stores in one clock cycle, but not easily update the same register multiple times in one clock cycle. Also, pop needs to write to two registers, which no other RISC-V integer instruction does.Compilers for other ISAs often use the same technique even if they have PUSH and POP instructions.
On Wed, May 3, 2017 at 11:49 PM, Hesam Z. <hesamzol...@gmail.com> wrote:
Hi,I have noticed that there are no PUSH and POP instructions. Should the functionality of stack be implemented by software means?
--
You received this message because you are subscribed to the Google Groups "RISC-V ISA Dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email to isa-dev+u...@groups.riscv.org.
To unsubscribe from this group and stop receiving emails from it, send an email to isa-dev+unsubscribe@groups.riscv.org.
To post to this group, send email to isa...@groups.riscv.org.
Visit this group at https://groups.google.com/a/groups.riscv.org/group/isa-dev/.
To view this discussion on the web visit https://groups.google.com/a/groups.riscv.org/d/msgid/isa-dev/1efae192-3f9e-4398-9cfe-4e5b835f2bb6%40groups.riscv.org.