1 //===-- AssemblerTest.cpp ---------------------------------------*- C++ -*-===//
3 // Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
4 // See https://llvm.org/LICENSE.txt for license information.
5 // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
7 //===----------------------------------------------------------------------===//
9 #include "../Common/AssemblerUtils.h"
10 #include "ARMInstrInfo.h"
16 using llvm::MCInstBuilder
;
18 class ARMMachineFunctionGeneratorTest
19 : public MachineFunctionGeneratorBaseTest
{
21 ARMMachineFunctionGeneratorTest()
22 : MachineFunctionGeneratorBaseTest("armv7-none-linux-gnueabi", "") {}
24 static void SetUpTestCase() {
25 LLVMInitializeARMTargetInfo();
26 LLVMInitializeARMTargetMC();
27 LLVMInitializeARMTarget();
28 LLVMInitializeARMAsmPrinter();
32 TEST_F(ARMMachineFunctionGeneratorTest
, DISABLED_JitFunction
) {
33 Check({}, llvm::MCInst(), 0x1e, 0xff, 0x2f, 0xe1);
36 TEST_F(ARMMachineFunctionGeneratorTest
, DISABLED_JitFunctionADDrr
) {
37 Check({{llvm::ARM::R0
, llvm::APInt()}},
38 MCInstBuilder(llvm::ARM::ADDrr
)
39 .addReg(llvm::ARM::R0
)
40 .addReg(llvm::ARM::R0
)
41 .addReg(llvm::ARM::R0
)
42 .addImm(llvm::ARMCC::AL
)
45 0x00, 0x00, 0x80, 0xe0, 0x1e, 0xff, 0x2f, 0xe1);
49 } // namespace exegesis