1 //===-- AssemblerTest.cpp ---------------------------------------*- C++ -*-===//
2 //
3 // The LLVM Compiler Infrastructure
4 //
5 // This file is distributed under the University of Illinois Open Source
6 // License. See LICENSE.TXT for details.
7 //
8 //===----------------------------------------------------------------------===//
9
10 #include "../Common/AssemblerUtils.h"
11 #include "ARMInstrInfo.h"
12
13 namespace exegesis {
14 namespace {
15
16 using llvm::MCInstBuilder;
17
18 class ARMMachineFunctionGeneratorTest
19 : public MachineFunctionGeneratorBaseTest {
20 protected:
ARMMachineFunctionGeneratorTest()21 ARMMachineFunctionGeneratorTest()
22 : MachineFunctionGeneratorBaseTest("armv7-none-linux-gnueabi", "") {}
23
SetUpTestCase()24 static void SetUpTestCase() {
25 LLVMInitializeARMTargetInfo();
26 LLVMInitializeARMTargetMC();
27 LLVMInitializeARMTarget();
28 LLVMInitializeARMAsmPrinter();
29 }
30 };
31
TEST_F(ARMMachineFunctionGeneratorTest,DISABLED_JitFunction)32 TEST_F(ARMMachineFunctionGeneratorTest, DISABLED_JitFunction) {
33 Check(llvm::MCInst(), 0x1e, 0xff, 0x2f, 0xe1);
34 }
35
TEST_F(ARMMachineFunctionGeneratorTest,DISABLED_JitFunctionADDrr)36 TEST_F(ARMMachineFunctionGeneratorTest, DISABLED_JitFunctionADDrr) {
37 Check(MCInstBuilder(llvm::ARM::ADDrr)
38 .addReg(llvm::ARM::R0)
39 .addReg(llvm::ARM::R0)
40 .addReg(llvm::ARM::R0)
41 .addImm(llvm::ARMCC::AL)
42 .addReg(0)
43 .addReg(0),
44 0x00, 0x00, 0x80, 0xe0, 0x1e, 0xff, 0x2f, 0xe1);
45 }
46
47 } // namespace
48 } // namespace exegesis
49