| 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 |
//===----------------------------------------------------------------------===// |
| 8 |
|
| 9 |
#include "../Common/AssemblerUtils.h" |
| 10 |
#include "ARMInstrInfo.h" |
| 11 |
|
| 12 |
namespace llvm { |
| 13 |
namespace exegesis { |
| 14 |
namespace { |
| 15 |
|
| 16 |
class ARMMachineFunctionGeneratorTest |
| 17 |
: public MachineFunctionGeneratorBaseTest { |
| 18 |
protected: |
| 19 |
ARMMachineFunctionGeneratorTest() |
| 20 |
: MachineFunctionGeneratorBaseTest("armv7-none-linux-gnueabi", "") {} |
| 21 |
|
| 22 |
static void SetUpTestCase() { |
| 23 |
LLVMInitializeARMTargetInfo(); |
| 24 |
LLVMInitializeARMTargetMC(); |
| 25 |
LLVMInitializeARMTarget(); |
| 26 |
LLVMInitializeARMAsmPrinter(); |
| 27 |
} |
| 28 |
}; |
| 29 |
|
| 30 |
TEST_F(ARMMachineFunctionGeneratorTest, DISABLED_JitFunction) { |
| 31 |
Check({}, MCInst(), 0x1e, 0xff, 0x2f, 0xe1); |
| 32 |
} |
| 33 |
|
| 34 |
TEST_F(ARMMachineFunctionGeneratorTest, DISABLED_JitFunctionADDrr) { |
| 35 |
Check({{ARM::R0, APInt()}}, |
| 36 |
MCInstBuilder(ARM::ADDrr) |
| 37 |
.addReg(ARM::R0) |
| 38 |
.addReg(ARM::R0) |
| 39 |
.addReg(ARM::R0) |
| 40 |
.addImm(ARMCC::AL) |
| 41 |
.addReg(0) |
| 42 |
.addReg(0), |
| 43 |
0x00, 0x00, 0x80, 0xe0, 0x1e, 0xff, 0x2f, 0xe1); |
| 44 |
} |
| 45 |
|
| 46 |
} // namespace |
| 47 |
} // namespace exegesis |
| 48 |
} // namespace llvm |