-
Notifications
You must be signed in to change notification settings - Fork 2
/
isa.c
72 lines (48 loc) · 1.66 KB
/
isa.c
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
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
/*******************************************************************************
*
* Chronos: A Timing Analyzer for Embedded Software
* =============================================================================
* http://www.comp.nus.edu.sg/~rpembed/chronos/
*
* Copyright (C) 2005 Xianfeng Li
*
* This program is free software; you can redistribute it and/or modify it under
* the terms of the GNU General Public License as published by the Free Software
* Foundation; either version 2, or (at your option) any later version.
*
* This program is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more
* details.
*
* $Id: isa.c,v 1.2 2006/06/24 08:54:56 lixianfe Exp $
*
******************************************************************************/
#include <stdio.h>
#include "isa.h"
#include "common.h"
#include "arch_funcs.h"
isa_t *isa; // info of the instruction types of the ISA
int num_isa; // number of instruction types of the ISA
// initiate ISA info
void
init_isa()
{
// if SimpleScalar is used, call this to init SimpleScalar ISA info
init_isa_ss();
//dump_isa();
}
int
max_inst_lat(de_inst_t *inst)
{
return ss_max_inst_lat(inst);
}
// dump functions for debug usage
//==============================================================================
static void UNUSED
dump_isa(void)
{
int i;
for (i = 0; i < num_isa; i++)
printf("%3d: %-10s type %x\n", i, isa[i].name, isa[i].type);
}