Fix failing x86 tests broken by last commit.

This commit is contained in:
Joe Hendrix 2017-12-01 15:09:07 -08:00
parent be8e0cff26
commit 716de707c2
No known key found for this signature in database
GPG Key ID: 8DFA5FF784098C4F
2 changed files with 10 additions and 7 deletions

View File

@ -2584,10 +2584,10 @@ all_instructions =
, def_punpck "hdq" fst n32 , def_punpck "hdq" fst n32
, def_punpck "hqdq" fst n64 , def_punpck "hqdq" fst n64
, def_punpck "lbw" snd n8 , def_punpck "lbw" snd n8
, def_punpck "lwd" snd n16 , def_punpck "lwd" snd n16
, def_punpck "ldq" snd n32 , def_punpck "ldq" snd n32
, def_punpck "ldq" snd n64 , def_punpck "lqdq" snd n64
, def_padd "b" n8 , def_padd "b" n8
, def_padd "w" n16 , def_padd "w" n16

View File

@ -27,7 +27,6 @@ import qualified Data.Parameterized.Some as PU
import qualified Data.Macaw.Memory as MM import qualified Data.Macaw.Memory as MM
import qualified Data.Macaw.Memory.ElfLoader as MM import qualified Data.Macaw.Memory.ElfLoader as MM
import qualified Data.Macaw.Discovery as MD import qualified Data.Macaw.Discovery as MD
import qualified Data.Macaw.Discovery.State as MD
import qualified Data.Macaw.X86 as RO import qualified Data.Macaw.X86 as RO
elfX64LinuxTests :: [FilePath] -> T.TestTree elfX64LinuxTests :: [FilePath] -> T.TestTree
@ -95,8 +94,12 @@ withMemory :: forall w m a
-> E.Elf w -> E.Elf w
-> (MM.Memory w -> m a) -> (MM.Memory w -> m a)
-> m a -> m a
withMemory relaWidth e k = withMemory _relaWidth e k = do
case MM.memoryForElf (MM.LoadOptions MM.LoadBySegment False) e of let opt = MM.LoadOptions { MM.loadRegionIndex = 0
, MM.loadStyle = MM.LoadBySegment
, MM.includeBSS = False
}
case MM.memoryForElf opt e of
-- case MM.memoryForElfSegments relaWidth e of -- case MM.memoryForElfSegments relaWidth e of
Left err -> C.throwM (MemoryLoadError err) Left err -> C.throwM (MemoryLoadError err)
Right (_sim, mem) -> k mem Right (_sim, mem) -> k mem