Path: blob/main/contrib/llvm-project/llvm/lib/Target/CSKY/MCTargetDesc/CSKYBaseInfo.h
35294 views
//===-- CSKYBaseInfo.h - Top level definitions for CSKY ---*- C++ -*-------===//1//2// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.3// See https://llvm.org/LICENSE.txt for license information.4// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception5//6//===----------------------------------------------------------------------===//7//8// This file contains small standalone helper functions and enum definitions for9// the CSKY target useful for the compiler back-end and the MC libraries.10// As such, it deliberately does not include references to LLVM core11// code gen types, passes, etc..12//13//===----------------------------------------------------------------------===//1415#ifndef LLVM_LIB_TARGET_CSKY_MCTARGETDESC_CSKYBASEINFO_H16#define LLVM_LIB_TARGET_CSKY_MCTARGETDESC_CSKYBASEINFO_H1718#include "MCTargetDesc/CSKYMCTargetDesc.h"19#include "llvm/MC/MCInstrDesc.h"2021namespace llvm {2223// CSKYII - This namespace holds all of the target specific flags that24// instruction info tracks. All definitions must match CSKYInstrFormats.td.25namespace CSKYII {2627enum AddrMode {28AddrModeNone = 0,29AddrMode32B = 1, // ld32.b, ld32.bs, st32.b, st32.bs, +4kb30AddrMode32H = 2, // ld32.h, ld32.hs, st32.h, st32.hs, +8kb31AddrMode32WD = 3, // ld32.w, st32.w, ld32.d, st32.d, +16kb32AddrMode16B = 4, // ld16.b, +32b33AddrMode16H = 5, // ld16.h, +64b34AddrMode16W = 6, // ld16.w, +128b or +1kb35AddrMode32SDF = 7, // flds, fldd, +1kb36};3738// CSKY Specific MachineOperand Flags.39enum TOF {40MO_None = 0,41MO_ADDR32,42MO_GOT32,43MO_GOTOFF,44MO_PLT32,45MO_ADDR_HI16,46MO_ADDR_LO16,4748// Used to differentiate between target-specific "direct" flags and "bitmask"49// flags. A machine operand can only have one "direct" flag, but can have50// multiple "bitmask" flags.51MO_DIRECT_FLAG_MASK = 1552};5354enum {55AddrModeMask = 0x1f,56};5758} // namespace CSKYII5960namespace CSKYOp {61enum OperandType : unsigned {62OPERAND_BARESYMBOL = MCOI::OPERAND_FIRST_TARGET,63OPERAND_CONSTPOOL64};65} // namespace CSKYOp6667} // namespace llvm6869#endif // LLVM_LIB_TARGET_CSKY_MCTARGETDESC_CSKYBASEINFO_H707172