blob: 6e9f41fc717cc92935a1601f5404b127ff059976 [file] [log] [blame]
sewardjde4a1d02002-03-22 01:27:54 +00001
2/*--------------------------------------------------------------------*/
3/*--- Supporting routines for v-tag operations. ---*/
4/*--- vg_vtagops.c ---*/
5/*--------------------------------------------------------------------*/
6
7/*
8 This file is part of Valgrind, an x86 protected-mode emulator
9 designed for debugging and profiling binaries on x86-Unixes.
10
11 Copyright (C) 2000-2002 Julian Seward
12 jseward@acm.org
sewardjde4a1d02002-03-22 01:27:54 +000013
14 This program is free software; you can redistribute it and/or
15 modify it under the terms of the GNU General Public License as
16 published by the Free Software Foundation; either version 2 of the
17 License, or (at your option) any later version.
18
19 This program is distributed in the hope that it will be useful, but
20 WITHOUT ANY WARRANTY; without even the implied warranty of
21 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
22 General Public License for more details.
23
24 You should have received a copy of the GNU General Public License
25 along with this program; if not, write to the Free Software
26 Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
27 02111-1307, USA.
28
29 The GNU General Public License is contained in the file LICENSE.
30*/
31
32#include "vg_include.h"
33#include "vg_constants.h"
34
35
36/* ---------------------------------------------------------------------
37 Names of the tag ops.
38 ------------------------------------------------------------------ */
39
40Char* VG_(nameOfTagOp) ( VgTagOp h )
41{
42 switch (h) {
43 case VgT_PCast40: return "PCast40";
44 case VgT_PCast20: return "PCast20";
45 case VgT_PCast10: return "PCast10";
46 case VgT_PCast01: return "PCast01";
47 case VgT_PCast02: return "PCast02";
48 case VgT_PCast04: return "PCast04";
49 case VgT_PCast14: return "PCast14";
50 case VgT_PCast12: return "PCast12";
51 case VgT_PCast11: return "PCast11";
52 case VgT_Left4: return "Left4";
53 case VgT_Left2: return "Left2";
54 case VgT_Left1: return "Left1";
55 case VgT_SWiden14: return "SWiden14";
56 case VgT_SWiden24: return "SWiden24";
57 case VgT_SWiden12: return "SWiden12";
58 case VgT_ZWiden14: return "ZWiden14";
59 case VgT_ZWiden24: return "ZWiden24";
60 case VgT_ZWiden12: return "ZWiden12";
61 case VgT_UifU4: return "UifU4";
62 case VgT_UifU2: return "UifU2";
63 case VgT_UifU1: return "UifU1";
64 case VgT_UifU0: return "UifU0";
65 case VgT_DifD4: return "DifD4";
66 case VgT_DifD2: return "DifD2";
67 case VgT_DifD1: return "DifD1";
68 case VgT_ImproveAND4_TQ: return "ImproveAND4_TQ";
69 case VgT_ImproveAND2_TQ: return "ImproveAND2_TQ";
70 case VgT_ImproveAND1_TQ: return "ImproveAND1_TQ";
71 case VgT_ImproveOR4_TQ: return "ImproveOR4_TQ";
72 case VgT_ImproveOR2_TQ: return "ImproveOR2_TQ";
73 case VgT_ImproveOR1_TQ: return "ImproveOR1_TQ";
74 case VgT_DebugFn: return "DebugFn";
75 default: VG_(panic)("vg_nameOfTagOp");
76 }
77}
78
79
80/* ---------------------------------------------------------------------
81 Debugging stuff.
82 ------------------------------------------------------------------ */
83
84/* Implementation for checking tag values. */
85
86UInt VG_(DebugFn) ( UInt a1, UInt a2 )
87{
88 vg_assert(2+2 == 5);
89 return 0;
90}
91
92
93/*--------------------------------------------------------------------*/
94/*--- end vg_vtagops.c ---*/
95/*--------------------------------------------------------------------*/