projects
/
soc.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
befa603
)
add carry handling to pia_res_to_output
author
Jacob Lifshay
<programmerjake@gmail.com>
Fri, 9 Oct 2020 03:23:17 +0000
(20:23 -0700)
committer
Jacob Lifshay
<programmerjake@gmail.com>
Fri, 9 Oct 2020 03:23:17 +0000
(20:23 -0700)
src/soc/fu/test/pia.py
patch
|
blob
|
history
diff --git
a/src/soc/fu/test/pia.py
b/src/soc/fu/test/pia.py
index b51ab7db7ad2a26d487dca0ac6b548798b26d10e..0cb51661c23779a28ec813936bb232d74a4a014e 100644
(file)
--- a/
src/soc/fu/test/pia.py
+++ b/
src/soc/fu/test/pia.py
@@
-30,4
+30,14
@@
def pia_res_to_output(pia_res):
else:
retval["xer_ov"] = 0
retval["xer_so"] = 0
+ if pia_res.carry is not None:
+ carry = pia_res.carry
+ v = 0
+ if carry.ca:
+ v |= 1
+ if carry.ca32:
+ v |= 2
+ retval["xer_ca"] = v
+ else:
+ retval["xer_ca"] = 0
return retval