From 07e52b16cebeb6d193e309de0c2a5e1565c05a82 Mon Sep 17 00:00:00 2001 From: Iavor Diatchki Date: Thu, 8 Mar 2018 15:06:10 -0800 Subject: [PATCH] Revert back to the previous order of indexing. This matches the Intel spec, and seems to match manual tests. --- x86_symbolic/src/Data/Macaw/X86/Crucible.hs | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/x86_symbolic/src/Data/Macaw/X86/Crucible.hs b/x86_symbolic/src/Data/Macaw/X86/Crucible.hs index d8ebf82d..c5074176 100644 --- a/x86_symbolic/src/Data/Macaw/X86/Crucible.hs +++ b/x86_symbolic/src/Data/Macaw/X86/Crucible.hs @@ -163,10 +163,11 @@ pureSem sym fn = \xs ys -> case testEquality (V.length xs) n2 of Just Refl -> - do let v1 = if i `testBit` 0 then V.elemAt n1 ys - else V.elemAt n0 ys - v2 = if i `testBit` 4 then V.elemAt n1 xs + do let v1 = if i `testBit` 0 then V.elemAt n1 xs else V.elemAt n0 xs + v2 = if i `testBit` 4 then V.elemAt n1 ys + else V.elemAt n0 ys + x1 <- evalE sym v1 x2 <- evalE sym v2 let f = fnClMul (symFuns sym)