forked from avanhatt/wasmtime
-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
isaspec: generate
AluRRImm12
spec (bytecodealliance#118)
Generate `AluRRImm12` spec from ASLp. This is the first requiring symbolic opcodes, so there are substantial changes to support it: * Updates ASLp dependency to fork containing experimental symbolic opcode support mmcloughlin/aslp@e5190a0 * Introduces `Bits` type to `isaspec` for manipulating opcode bitvectors with symbolic fields. * Generating ASLp semantics from an opcode template * Validating an assembly template against the Cranelift assembler * Updating verification model of `Imm12` to a struct type, and updating related specs. Updates avanhatt#36 avanhatt#35
- Loading branch information
1 parent
6f507bf
commit 7a4a0d1
Showing
13 changed files
with
656 additions
and
219 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
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,86 @@ | ||
;; GENERATED BY `isaspec`. DO NOT EDIT!!! | ||
|
||
(spec | ||
(MInst.AluRRImm12 alu_op size rd rn imm12) | ||
(provide | ||
(match | ||
size | ||
((Size64) | ||
(match | ||
alu_op | ||
((Add) | ||
(and | ||
(=> (not (:shift12 imm12)) (= rd (bvadd rn (zero_ext 64 (extract 11 0 (:bits imm12)))))) | ||
(=> | ||
(:shift12 imm12) | ||
(= rd (bvadd rn (zero_ext 64 (concat (extract 11 0 (:bits imm12)) #x000))))))) | ||
((Sub) | ||
(and | ||
(=> | ||
(not (:shift12 imm12)) | ||
(= | ||
rd | ||
(bvadd | ||
(bvadd rn (bvnot (zero_ext 64 (extract 11 0 (:bits imm12))))) | ||
#x0000000000000001))) | ||
(=> | ||
(:shift12 imm12) | ||
(= | ||
rd | ||
(bvadd | ||
(bvadd rn (bvnot (zero_ext 64 (concat (extract 11 0 (:bits imm12)) #x000)))) | ||
#x0000000000000001))))))) | ||
((Size32) | ||
(match | ||
alu_op | ||
((Add) | ||
(and | ||
(=> | ||
(not (:shift12 imm12)) | ||
(= | ||
rd | ||
(zero_ext 64 (bvadd (extract 31 0 rn) (zero_ext 32 (extract 11 0 (:bits imm12))))))) | ||
(=> | ||
(:shift12 imm12) | ||
(= | ||
rd | ||
(zero_ext | ||
64 | ||
(bvadd | ||
(extract 31 0 rn) | ||
(zero_ext 32 (concat (extract 11 0 (:bits imm12)) #x000)))))))) | ||
((Sub) | ||
(and | ||
(=> | ||
(not (:shift12 imm12)) | ||
(= | ||
rd | ||
(zero_ext | ||
64 | ||
(bvadd | ||
(bvadd (extract 31 0 rn) (bvnot (zero_ext 32 (extract 11 0 (:bits imm12))))) | ||
#x00000001)))) | ||
(=> | ||
(:shift12 imm12) | ||
(= | ||
rd | ||
(zero_ext | ||
64 | ||
(bvadd | ||
(bvadd | ||
(extract 31 0 rn) | ||
(bvnot (zero_ext 32 (concat (extract 11 0 (:bits imm12)) #x000)))) | ||
#x00000001)))))))))) | ||
(require | ||
(match | ||
size | ||
((Size64) | ||
(match | ||
alu_op | ||
((Add) (or (not (:shift12 imm12)) (:shift12 imm12))) | ||
((Sub) (or (not (:shift12 imm12)) (:shift12 imm12))))) | ||
((Size32) | ||
(match | ||
alu_op | ||
((Add) (or (not (:shift12 imm12)) (:shift12 imm12))) | ||
((Sub) (or (not (:shift12 imm12)) (:shift12 imm12)))))))) |
This file was deleted.
Oops, something went wrong.
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
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 |
---|---|---|
@@ -1,4 +1,4 @@ | ||
pub mod ast; | ||
pub mod bits; | ||
pub mod client; | ||
pub mod opcode; | ||
pub mod parser; |
Oops, something went wrong.