Altera_Forum
Honored Contributor
15 years agonios ii psedo-instruction and equivalent instruction
Hello,everyone.
I'm am learning nios ii instruction set. Can anybody explain psedo-instruction and equivalent instruction, for example( from Altera Nios ii processor reference handbook): psedo-instruction equivalent instruction bgt rA, rB, label blt rB, rA, label bgt (psedo-instruction) Operation: if ((signed) rA > (signed) rB) then PC ←label else PC ←PC + 4 Assembler Syntax: bgt rA, rB, label blt (equivalent instruction) Operation: if ((signed) rA < (signed) rB) then PC ←PC + 4 + σ (IMM16) else PC ←PC + 4 Assembler Syntax: blt rA, rB, label bgt(psedo-instruction) and blt(equivalent instruction) are equivalent ? When they are else statements, they are equivalent. But, i think if conditons are met, they are not equivalent : bgt : PC ←label, however ,blt: PC ←PC + 4 + σ (IMM16) Can someone explain it ? Best regards hanshaohua