Regarding redundancy of BLTU/BLT or BGT/BGTU instructions

610 views
Skip to first unread message

Tanuj Sharma

unread,
Jan 24, 2017, 6:26:05 AM1/24/17
to hw-...@groups.riscv.org
Hello all,

I am working on the implementation of RISC-V architecture to build a processor. While working I came to notice that if we have provided BEQ,BLT and BLTU instructions then the use of BGT,BGTU and even BNE is not required. I think this instructions may be redundant. Please, clarify this to me or guide me where I am wrong.


Tanuj Sharma
IIT PATNA

Samuel Falvo II

unread,
Jan 24, 2017, 11:35:40 AM1/24/17
to Tanuj Sharma, RISC-V HW Dev
There is no BGT instruction family. It's BGE, (Branch if Greater than
OR EQUAL). In this sense, you're right: BGT is just BLT with its
operands reversed; however, BGE cannot be synthesized from BLT alone
(you'll need two consecutive branches: BLT and BEQ).

Hope that helps.
> --
> You received this message because you are subscribed to the Google Groups
> "RISC-V HW Dev" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to hw-dev+un...@groups.riscv.org.
> To post to this group, send email to hw-...@groups.riscv.org.
> Visit this group at
> https://groups.google.com/a/groups.riscv.org/group/hw-dev/.
> To view this discussion on the web visit
> https://groups.google.com/a/groups.riscv.org/d/msgid/hw-dev/CAC0ARgUginjWjYqd2ANktsHK%2BTdrtEqBaj7rzbswf9cH-d80Yg%40mail.gmail.com.



--
Samuel A. Falvo II
Reply all
Reply to author
Forward
0 new messages