can I do comparing operations in the ALU for values which are stored in registers that aren’t immediete?
As far as i know, comparison is I-type and can’t be performed between registers so you need to use TESTI instead of ALU.
I am not sure I understand the question.
Are you referring to RTL instructions that could take place in the datapath if the control outputs the “correct” control signals?
If so, then the ALU has two inputs that come from two muxes.
So you can feed operands via these muxes to the ALU (by the select signals) and let the control tell the ALU which function to compute.
I want to clarify my quest.
I want to compare between RS1 and RS2
comparing operation like sgti and slti (which are imm orders) is writen in the table in codition D6->TESTI
in the table of RTL instruction it’s written C=(A rel imm).
I didn’t find in the table comparing orders for 2 registers which are not the imm (A rel B).
because of these it is not clear to me if it’s the same for registers which are not the imm.
in which path I can compare between RS1, RS2?