[yaml2obj/obj2yaml] - Add support for .stack_sizes sections.
[llvm-complete.git] / unittests / tools / llvm-exegesis / ARM / AssemblerTest.cpp
blob70ad4875be26da46774ed28ad1a8827165c356d7
1 //===-- AssemblerTest.cpp ---------------------------------------*- C++ -*-===//
2 //
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
6 //
7 //===----------------------------------------------------------------------===//
9 #include "../Common/AssemblerUtils.h"
10 #include "ARMInstrInfo.h"
12 namespace llvm {
13 namespace exegesis {
14 namespace {
16 using llvm::MCInstBuilder;
18 class ARMMachineFunctionGeneratorTest
19 : public MachineFunctionGeneratorBaseTest {
20 protected:
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)
43 .addReg(0)
44 .addReg(0),
45 0x00, 0x00, 0x80, 0xe0, 0x1e, 0xff, 0x2f, 0xe1);
48 } // namespace
49 } // namespace exegesis
50 } // namespace llvm