aboutsummaryrefslogtreecommitdiffstats
path: root/lib/Target/Hexagon/HexagonConstExtInfo.h
blob: 9b6a2daf5a51f50460836fd2e957c309a2512368 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
//===--- HexagonConstExtInfo.h - Provides constant extender information ---===//
//
//                     The LLVM Compiler Infrastructure
//
// This file is distributed under the University of Illinois Open Source
// License. See LICENSE.TXT for details.
//
//===----------------------------------------------------------------------===//
//
// This file contains helper functions that extract constant extender
// information for a specified instruction from the HexagonConstExtInfo table.
//
//===----------------------------------------------------------------------===//

#ifndef HEXAGONCONSTEXT_H
#define HEXAGONCONSTEXT_H
namespace llvm {
namespace HexagonConstExt {
  typedef struct {
    const char * Name;
    const short CExtOpNum;
    const int MinValue;
    const int MaxValue;
    const int NonExtOpcode;
  } HexagonConstExtInfo;

#include "HexagonCExtTable.h"

/// HexagonConstExt - This namespace holds the constant extension related
/// information.

  bool isOperandExtended(unsigned short Opcode, unsigned short OperandNum);
  unsigned short getCExtOpNum(unsigned short Opcode);
  int getMinValue(unsigned short Opcode);
  int getMaxValue(unsigned short Opcode);
  bool NonExtEquivalentExists (unsigned short Opcode);
  int getNonExtOpcode (unsigned short Opcode);
}

}
#endif