Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

What is the difference between GT and HI instruction in ARM architecture?

"GT" is greater than and "HI" is higher than. I think both have the same meaning.The instruction Set Image

like image 833
Arunachalam Muthupalaniappan Avatar asked Dec 24 '22 20:12

Arunachalam Muthupalaniappan


2 Answers

HI instruction takes its operands as unsigned so basically it uses C and Z flag for its operation On the other hand GT or GE takes operands as signed numbers and uses flags N(negative) and V(overflow). Both GE and GT are same but GE accepts a cleared Z flag, too. So if you are using unsigned numbers then both will produce same output.

like image 111
nakul parashar Avatar answered Jan 14 '23 13:01

nakul parashar


Signed vs unsigned comparison

GT  Signed greater than
HI  Unsigned higher
like image 44
jhh Avatar answered Jan 14 '23 12:01

jhh