blob: 42f9425131a598ee1fc19da4f129b6d8ff255367 [file] [log] [blame]
Nguyen Anh Quynh05e27132014-03-10 11:58:57 +08001//===-- Sparc.h - Top-level interface for Sparc representation --*- C++ -*-===//
2//
3// The LLVM Compiler Infrastructure
4//
5// This file is distributed under the University of Illinois Open Source
6// License. See LICENSE.TXT for details.
7//
8//===----------------------------------------------------------------------===//
9//
10// This file contains the entry points for global functions defined in the LLVM
11// Sparc back-end.
12//
13//===----------------------------------------------------------------------===//
14
15/* Capstone Disassembly Engine */
16/* By Nguyen Anh Quynh <aquynh@gmail.com>, 2013-2014 */
17
18#ifndef CS_SPARC_TARGET_SPARC_H
19#define CS_SPARC_TARGET_SPARC_H
20
21#include "../../include/sparc.h"
22
Nguyen Anh Quynh9b91de02014-06-16 12:51:07 +080023inline static char *SPARCCondCodeToString(sparc_cc CC)
Nguyen Anh Quynh05e27132014-03-10 11:58:57 +080024{
25 switch (CC) {
26 default: return NULL; // unreachable
27 case SPARC_CC_ICC_A: return "a";
28 case SPARC_CC_ICC_N: return "n";
29 case SPARC_CC_ICC_NE: return "ne";
30 case SPARC_CC_ICC_E: return "e";
31 case SPARC_CC_ICC_G: return "g";
32 case SPARC_CC_ICC_LE: return "le";
33 case SPARC_CC_ICC_GE: return "ge";
34 case SPARC_CC_ICC_L: return "l";
35 case SPARC_CC_ICC_GU: return "gu";
36 case SPARC_CC_ICC_LEU: return "leu";
37 case SPARC_CC_ICC_CC: return "cc";
38 case SPARC_CC_ICC_CS: return "cs";
39 case SPARC_CC_ICC_POS: return "pos";
40 case SPARC_CC_ICC_NEG: return "neg";
41 case SPARC_CC_ICC_VC: return "vc";
42 case SPARC_CC_ICC_VS: return "vs";
43
44 case SPARC_CC_FCC_A: return "a";
45 case SPARC_CC_FCC_N: return "n";
46 case SPARC_CC_FCC_U: return "u";
47 case SPARC_CC_FCC_G: return "g";
48 case SPARC_CC_FCC_UG: return "ug";
49 case SPARC_CC_FCC_L: return "l";
50 case SPARC_CC_FCC_UL: return "ul";
51 case SPARC_CC_FCC_LG: return "lg";
52 case SPARC_CC_FCC_NE: return "ne";
53 case SPARC_CC_FCC_E: return "e";
54 case SPARC_CC_FCC_UE: return "ue";
55 case SPARC_CC_FCC_GE: return "ge";
56 case SPARC_CC_FCC_UGE: return "uge";
57 case SPARC_CC_FCC_LE: return "le";
58 case SPARC_CC_FCC_ULE: return "ule";
59 case SPARC_CC_FCC_O: return "o";
60 }
61}
62
63#endif