From 046ce166d3ca967efb6fe9dbb56995fa94236838 Mon Sep 17 00:00:00 2001 From: Kevin Quick Date: Mon, 18 Dec 2017 17:46:17 -0800 Subject: [PATCH] Initial empty framwork for macaw-arm ARM support. --- macaw-arm/ChangeLog.md | 5 +++++ macaw-arm/LICENSE | 30 ++++++++++++++++++++++++++++++ macaw-arm/Setup.hs | 2 ++ macaw-arm/macaw-arm.cabal | 37 +++++++++++++++++++++++++++++++++++++ macaw-arm/tests/TestMain.hs | 16 ++++++++++++++++ 5 files changed, 90 insertions(+) create mode 100644 macaw-arm/ChangeLog.md create mode 100644 macaw-arm/LICENSE create mode 100644 macaw-arm/Setup.hs create mode 100644 macaw-arm/macaw-arm.cabal create mode 100644 macaw-arm/tests/TestMain.hs diff --git a/macaw-arm/ChangeLog.md b/macaw-arm/ChangeLog.md new file mode 100644 index 00000000..0f844ded --- /dev/null +++ b/macaw-arm/ChangeLog.md @@ -0,0 +1,5 @@ +# Revision history for macaw-arm + +## 0.1.0.0 -- 2017-12-01 + +* First version. Based on macaw-ppc. diff --git a/macaw-arm/LICENSE b/macaw-arm/LICENSE new file mode 100644 index 00000000..63084fe6 --- /dev/null +++ b/macaw-arm/LICENSE @@ -0,0 +1,30 @@ +Copyright (c) 2017, Kevin Quick + +All rights reserved. + +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions are met: + + * Redistributions of source code must retain the above copyright + notice, this list of conditions and the following disclaimer. + + * Redistributions in binary form must reproduce the above + copyright notice, this list of conditions and the following + disclaimer in the documentation and/or other materials provided + with the distribution. + + * Neither the name of Kevin Quick nor the names of other + contributors may be used to endorse or promote products derived + from this software without specific prior written permission. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. diff --git a/macaw-arm/Setup.hs b/macaw-arm/Setup.hs new file mode 100644 index 00000000..9a994af6 --- /dev/null +++ b/macaw-arm/Setup.hs @@ -0,0 +1,2 @@ +import Distribution.Simple +main = defaultMain diff --git a/macaw-arm/macaw-arm.cabal b/macaw-arm/macaw-arm.cabal new file mode 100644 index 00000000..551d6795 --- /dev/null +++ b/macaw-arm/macaw-arm.cabal @@ -0,0 +1,37 @@ +name: macaw-arm +version: 0.1.0.0 +-- synopsis: +-- description: +license: BSD3 +license-file: LICENSE +author: Kevin Quick +maintainer: kquick@galois.com +-- copyright: +category: Semantics +build-type: Simple +extra-source-files: ChangeLog.md +cabal-version: >=1.10 + +library + -- exposed-modules: + -- other-modules: + -- other-extensions: + build-depends: base >=4.10 && <4.11 + build-tools: arm-none-eabi-gcc + hs-source-dirs: src + default-language: Haskell2010 + ghc-options: -Wall + +test-suite macaw-arm-tests + type: exitcode-stdio-1.0 + default-language: Haskell2010 + ghc-options: -Wall + hs-source-dirs: tests + main-is: TestMain.hs + build-depends: base >=4.10 && <4.11 + , filemanip + , filepath + , macaw-arm + , tasty + , tasty-hunit + -- filepath 1.4.1.2 \ No newline at end of file diff --git a/macaw-arm/tests/TestMain.hs b/macaw-arm/tests/TestMain.hs new file mode 100644 index 00000000..fcf778c5 --- /dev/null +++ b/macaw-arm/tests/TestMain.hs @@ -0,0 +1,16 @@ +module Main where + + +-- import qualified ARMTest as ARM +import System.FilePath.Glob ( namesMatching ) +import Test.Tasty (defaultMain, testGroup) + + +main :: IO () +main = do + testFiles <- namesMatching "tests/arm/*.s.expected" + bins <- namesMatching "tests/arm/bin/*" + defaultMain $ testGroup "ARMMacawTests" [ + -- ARM.armAsmTests testFiles, + -- ARM.armInstructionCoverageTests bins + ]