llvm/lldb/source/Plugins/Process/Utility/ARMUtils.h

//===-- ARMUtils.h ----------------------------------------------*- C++ -*-===//
//
// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
// See https://llvm.org/LICENSE.txt for license information.
// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
//
//===----------------------------------------------------------------------===//

#ifndef LLDB_SOURCE_PLUGINS_PROCESS_UTILITY_ARMUTILS_H
#define LLDB_SOURCE_PLUGINS_PROCESS_UTILITY_ARMUTILS_H

#include "ARMDefines.h"
#include "InstructionUtils.h"
#include "llvm/ADT/bit.h"
#include "llvm/Support/MathExtras.h"

// Common utilities for the ARM/Thumb Instruction Set Architecture.

namespace lldb_private {

static inline uint32_t Align(uint32_t val, uint32_t alignment) {}

static inline uint32_t DecodeImmShift(const uint32_t type, const uint32_t imm5,
                                      ARM_ShifterType &shift_t) {}

// A8.6.35 CMP (register) -- Encoding T3
// Convenience function.
static inline uint32_t DecodeImmShiftThumb(const uint32_t opcode,
                                           ARM_ShifterType &shift_t) {}

// A8.6.35 CMP (register) -- Encoding A1
// Convenience function.
static inline uint32_t DecodeImmShiftARM(const uint32_t opcode,
                                         ARM_ShifterType &shift_t) {}

static inline uint32_t DecodeImmShift(const ARM_ShifterType shift_t,
                                      const uint32_t imm5) {}

static inline ARM_ShifterType DecodeRegShift(const uint32_t type) {}

static inline uint32_t LSL_C(const uint32_t value, const uint32_t amount,
                             uint32_t &carry_out, bool *success) {}

static inline uint32_t LSL(const uint32_t value, const uint32_t amount,
                           bool *success) {}

static inline uint32_t LSR_C(const uint32_t value, const uint32_t amount,
                             uint32_t &carry_out, bool *success) {}

static inline uint32_t LSR(const uint32_t value, const uint32_t amount,
                           bool *success) {}

static inline uint32_t ASR_C(const uint32_t value, const uint32_t amount,
                             uint32_t &carry_out, bool *success) {}

static inline uint32_t ASR(const uint32_t value, const uint32_t amount,
                           bool *success) {}

static inline uint32_t ROR_C(const uint32_t value, const uint32_t amount,
                             uint32_t &carry_out, bool *success) {}

static inline uint32_t ROR(const uint32_t value, const uint32_t amount,
                           bool *success) {}

static inline uint32_t RRX_C(const uint32_t value, const uint32_t carry_in,
                             uint32_t &carry_out, bool *success) {}

static inline uint32_t RRX(const uint32_t value, const uint32_t carry_in,
                           bool *success) {}

static inline uint32_t Shift_C(const uint32_t value, ARM_ShifterType type,
                               const uint32_t amount, const uint32_t carry_in,
                               uint32_t &carry_out, bool *success) {}

static inline uint32_t Shift(const uint32_t value, ARM_ShifterType type,
                             const uint32_t amount, const uint32_t carry_in,
                             bool *success) {}

static inline uint32_t bits(const uint32_t val, const uint32_t msbit,
                            const uint32_t lsbit) {}

static inline uint32_t bit(const uint32_t val, const uint32_t msbit) {}

static uint32_t ror(uint32_t val, uint32_t N, uint32_t shift) {}

// (imm32, carry_out) = ARMExpandImm_C(imm12, carry_in)
static inline uint32_t ARMExpandImm_C(uint32_t opcode, uint32_t carry_in,
                                      uint32_t &carry_out) {}

static inline uint32_t ARMExpandImm(uint32_t opcode) {}

// (imm32, carry_out) = ThumbExpandImm_C(imm12, carry_in)
static inline uint32_t ThumbExpandImm_C(uint32_t opcode, uint32_t carry_in,
                                        uint32_t &carry_out) {}

static inline uint32_t ThumbExpandImm(uint32_t opcode) {}

// imm32 = ZeroExtend(i:imm3:imm8, 32)
static inline uint32_t ThumbImm12(uint32_t opcode) {}

// imm32 = ZeroExtend(imm7:'00', 32)
static inline uint32_t ThumbImm7Scaled(uint32_t opcode) {}

// imm32 = ZeroExtend(imm8:'00', 32)
static inline uint32_t ThumbImm8Scaled(uint32_t opcode) {}

// This function performs the check for the register numbers 13 and 15 that are
// not permitted for many Thumb register specifiers.
static inline bool BadReg(uint32_t n) {}

} // namespace lldb_private

#endif // LLDB_SOURCE_PLUGINS_PROCESS_UTILITY_ARMUTILS_H