diff options
author | Greg Brown <greg.brown@cl.cam.ac.uk> | 2022-04-18 15:05:24 +0100 |
---|---|---|
committer | Greg Brown <greg.brown@cl.cam.ac.uk> | 2022-04-18 15:21:38 +0100 |
commit | 00a0ce9082b4cc1389815defcc806efd4a9b80f4 (patch) | |
tree | aebdc99b954be177571697fc743ee75841c98b2e /src/Helium/Instructions/Instances/Barrett.agda | |
parent | 24845ef25e12864711552ebc75a1f54903bee50c (diff) |
Do a big refactor.
- Replace the decidable predicates on expressions and statements with
separate data types.
- Reorganise the Hoare logic semantics to remove unnecessary
definitions.
- Make liberal use of modules to group related definitions together.
- Unify the types for denotational and Hoare logic semantics.
- Make bits an abstraction of array types.
Diffstat (limited to 'src/Helium/Instructions/Instances/Barrett.agda')
-rw-r--r-- | src/Helium/Instructions/Instances/Barrett.agda | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/Helium/Instructions/Instances/Barrett.agda b/src/Helium/Instructions/Instances/Barrett.agda index 606a9e9..b913972 100644 --- a/src/Helium/Instructions/Instances/Barrett.agda +++ b/src/Helium/Instructions/Instances/Barrett.agda @@ -22,11 +22,11 @@ open import Helium.Instructions.Core -- | z | < 2 ^ 31 -- Computes: -- z mod n -barret : (m -n : Expression [] (bits 32)) (t z : VecReg) (im : GenReg) → Procedure [] +barret : (m -n : Expression State [] (bits 32)) (t z : VecReg) (im : GenReg) → Procedure State [] barret m -n t z im = - index R (lit (im ′f)) ≔ m ∙ + *index R (lit im) ≔ m ∙ invoke vqrdmulh-s32,t,z,m [] ∙ - index R (lit (im ′f)) ≔ -n ∙ + *index R (lit im) ≔ -n ∙ invoke vmla-s32,z,t,-n [] ∙end where vqrdmulh-s32,t,z,m = |