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

//===-- ARMDefines.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_ARMDEFINES_H
#define LLDB_SOURCE_PLUGINS_PROCESS_UTILITY_ARMDEFINES_H

#include "llvm/Support/ErrorHandling.h"

#include <cassert>
#include <cstdint>

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

namespace lldb_private {

// ARM shifter types
enum ARM_ShifterType {};

// ARM conditions          // Meaning (integer)         Meaning (floating-point)
// Condition flags
#define COND_EQ
#define COND_NE
#define COND_CS
#define COND_HS
#define COND_CC
#define COND_LO
#define COND_MI
#define COND_PL
#define COND_VS
#define COND_VC
#define COND_HI
      // 0
#define COND_LS
      // 1
#define COND_GE
#define COND_LT
#define COND_GT
      // V
#define COND_LE
      // V
#define COND_AL
#define COND_UNCOND

static inline const char *ARMCondCodeToString(uint32_t CC) {}

static inline bool ARMConditionPassed(const uint32_t condition,
                                      const uint32_t cpsr) {}

// Bit positions for CPSR
#define CPSR_T_POS
#define CPSR_F_POS
#define CPSR_I_POS
#define CPSR_A_POS
#define CPSR_E_POS
#define CPSR_J_POS
#define CPSR_Q_POS
#define CPSR_V_POS
#define CPSR_C_POS
#define CPSR_Z_POS
#define CPSR_N_POS

// CPSR mode definitions
#define CPSR_MODE_USR
#define CPSR_MODE_FIQ
#define CPSR_MODE_IRQ
#define CPSR_MODE_SVC
#define CPSR_MODE_ABT
#define CPSR_MODE_UND
#define CPSR_MODE_SYS

// Masks for CPSR
#define MASK_CPSR_MODE_MASK
#define MASK_CPSR_IT_MASK
#define MASK_CPSR_T
#define MASK_CPSR_F
#define MASK_CPSR_I
#define MASK_CPSR_A
#define MASK_CPSR_E
#define MASK_CPSR_GE_MASK
#define MASK_CPSR_J
#define MASK_CPSR_Q
#define MASK_CPSR_V
#define MASK_CPSR_C
#define MASK_CPSR_Z
#define MASK_CPSR_N

} // namespace lldb_private

#endif // LLDB_SOURCE_PLUGINS_PROCESS_UTILITY_ARMDEFINES_H