-
Notifications
You must be signed in to change notification settings - Fork 7
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[semmc-ppc] Fix
updateXER
bug, generate PPC32 semantics for ADDOo
I also tested the semantics using the fuzzer and they pass 10k+ tests. Also, if I change the semantics slightly the tests fail, so this is pretty convincing :)
- Loading branch information
Showing
2 changed files
with
136 additions
and
8 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,128 @@ | ||
;; ADDO. (XO-form, OE=1, RC=1) | ||
(let | ||
((false | ||
(bvne #b0 #b0))) | ||
((operands | ||
((rT . 'Gprc) | ||
(rB . 'Gprc) | ||
(rA . 'Gprc))) | ||
(in | ||
('XER 'CR rA rB 'IP)) | ||
(defs | ||
(('CR | ||
((_ call "df.cmpImm") | ||
(bvslt | ||
(bvadd rA rB) | ||
#x00000000) | ||
(bvsgt | ||
(bvadd rA rB) | ||
#x00000000) | ||
#b000 | ||
(concat | ||
(bvor | ||
((_ extract 31 31) | ||
'XER) | ||
(ite | ||
(ite | ||
(andp | ||
(bvslt rA #x00000000) | ||
(bvslt rB #x00000000)) | ||
(notp | ||
(bvslt | ||
(bvadd rA rB) | ||
#x00000000)) | ||
(ite | ||
(andp | ||
(bvsge rA #x00000000) | ||
(bvsge rB #x00000000)) | ||
(notp | ||
(bvsge | ||
(bvadd rA rB) | ||
#x00000000)) | ||
(false))) | ||
#b1 | ||
#b0)) | ||
((_ extract 30 0) | ||
(concat | ||
((_ extract 31 31) | ||
'XER) | ||
(concat | ||
(ite | ||
(ite | ||
(andp | ||
(bvslt rA #x00000000) | ||
(bvslt rB #x00000000)) | ||
(notp | ||
(bvslt | ||
(bvadd rA rB) | ||
#x00000000)) | ||
(ite | ||
(andp | ||
(bvsge rA #x00000000) | ||
(bvsge rB #x00000000)) | ||
(notp | ||
(bvsge | ||
(bvadd rA rB) | ||
#x00000000)) | ||
(false))) | ||
#b1 | ||
#b0) | ||
((_ extract 29 0) | ||
'XER))))) | ||
'CR)) | ||
('XER | ||
(concat | ||
(bvor | ||
((_ extract 31 31) | ||
'XER) | ||
(ite | ||
(ite | ||
(andp | ||
(bvslt rA #x00000000) | ||
(bvslt rB #x00000000)) | ||
(notp | ||
(bvslt | ||
(bvadd rA rB) | ||
#x00000000)) | ||
(ite | ||
(andp | ||
(bvsge rA #x00000000) | ||
(bvsge rB #x00000000)) | ||
(notp | ||
(bvsge | ||
(bvadd rA rB) | ||
#x00000000)) | ||
(false))) | ||
#b1 | ||
#b0)) | ||
((_ extract 30 0) | ||
(concat | ||
((_ extract 31 31) | ||
'XER) | ||
(concat | ||
(ite | ||
(ite | ||
(andp | ||
(bvslt rA #x00000000) | ||
(bvslt rB #x00000000)) | ||
(notp | ||
(bvslt | ||
(bvadd rA rB) | ||
#x00000000)) | ||
(ite | ||
(andp | ||
(bvsge rA #x00000000) | ||
(bvsge rB #x00000000)) | ||
(notp | ||
(bvsge | ||
(bvadd rA rB) | ||
#x00000000)) | ||
(false))) | ||
#b1 | ||
#b0) | ||
((_ extract 29 0) | ||
'XER)))))) | ||
(rT | ||
(bvadd rA rB)) | ||
('IP | ||
(bvadd 'IP #x00000004)))))) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
626fae7
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@ntc2: I'm seeing build errors referencing ADD4Oo: http://fryingpan.dev.galois.com/hydra/build/116838/log
626fae7
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
626fae7
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@kquick I'm guessing this was due to me not updating the
dismantle
submodule. I was buildingsemmc-ppc
as a dependency ofsfe
, and so was usingsfe
's version ofdismantle
. I just updated thedismantle
submodule forsemmc
, so hopefully that will fix the problem. The commit that addedADD4Oo
todismantle-ppc
is here: GaloisInc/dismantle@341ac90