Andes Workshop
http://forum.andestech.com/

Overflow flag substitute
http://forum.andestech.com/viewtopic.php?f=14&t=721
Page 1 of 1

Author:  cindy [ Fri Jul 12, 2013 3:46 pm ]
Post subject:  Overflow flag substitute

Overflow flag substitute

For overflow detection issue, Andes use some instructions to judge overflow instead of overflow flag.
1) In case signed value overflow detection, you can use "sva" and "svs" instructions. For detail instruction description, please refer to AndeStar_ISA_UM025_V1.4.pdf.

2) In case unsigned value overflow detection, assume A and B are unsigned variable, overflow will happen
A + B < A
So, if you want to know if it is overflow of the result of A + B, you can use instructions like "slt" (Set on Less Than) to judge overflow.

Page 1 of 1 All times are UTC + 8 hours [ DST ]
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group
http://www.phpbb.com/