Subversion Repositories tendra.SVN

Rev

Rev 2 | Details | Compare with Previous | Last modification | View Log | RSS feed

Rev Author Line No. Line
2 7u83 1
/*
7 7u83 2
 * Copyright (c) 2002-2005 The TenDRA Project <http://www.tendra.org/>.
3
 * All rights reserved.
4
 *
5
 * Redistribution and use in source and binary forms, with or without
6
 * modification, are permitted provided that the following conditions are met:
7
 *
8
 * 1. Redistributions of source code must retain the above copyright notice,
9
 *    this list of conditions and the following disclaimer.
10
 * 2. Redistributions in binary form must reproduce the above copyright notice,
11
 *    this list of conditions and the following disclaimer in the documentation
12
 *    and/or other materials provided with the distribution.
13
 * 3. Neither the name of The TenDRA Project nor the names of its contributors
14
 *    may be used to endorse or promote products derived from this software
15
 *    without specific, prior written permission.
16
 *
17
 * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS ``AS
18
 * IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
19
 * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
20
 * PURPOSE ARE DISCLAIMED.  IN NO EVENT SHALL THE COPYRIGHT HOLDERS OR
21
 * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
22
 * EXEMPLARY OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
23
 * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS;
24
 * OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
25
 * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
26
 * OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
27
 * ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
28
 *
29
 * $Id$
30
 */
31
/*
2 7u83 32
    		 Crown Copyright (c) 1997
7 7u83 33
 
2 7u83 34
    This TenDRA(r) Computer Program is subject to Copyright
35
    owned by the United Kingdom Secretary of State for Defence
36
    acting through the Defence Evaluation and Research Agency
37
    (DERA).  It is made available to Recipients with a
38
    royalty-free licence for its use, reproduction, transfer
39
    to other parties and amendment for any purpose not excluding
40
    product development provided that any such use et cetera
41
    shall be deemed to be acceptance of the following conditions:-
7 7u83 42
 
2 7u83 43
        (1) Its Recipients shall ensure that this Notice is
44
        reproduced upon any copies or amended versions of it;
7 7u83 45
 
2 7u83 46
        (2) Any amended version of it shall be clearly marked to
47
        show both the nature of and the organisation responsible
48
        for the relevant amendment or amendments;
7 7u83 49
 
2 7u83 50
        (3) Its onward transfer from a recipient to another
51
        party shall be deemed to be that party's acceptance of
52
        these conditions;
7 7u83 53
 
2 7u83 54
        (4) DERA gives no warranty or assurance as to its
55
        quality or suitability for any purpose and DERA accepts
56
        no liability whatsoever in relation to any use to which
57
        it may be put.
58
*/
59
 
60
 
61
/* 	inst_fmtdecs.h,v 1.4 1995/09/04 16:23:56 john Exp	 */
62
 
63
 
64
/*
65
   instfmtdecs.h
66
   declarations of functions used to output assembler instructions.
67
*/
68
#ifndef INSTFMTDECS_H
69
#define INSTFMTDECS_H
70
#include "addresstypes.h"
71
#include "cross.h"
72
#include "instypes.h"
73
#include "ins_data.h"
74
#include "exptypes.h"
75
#include "procrectypes.h"
76
#if DO_SCHEDULE
77
#include "scheduler.h"
78
#endif
79
#define IMMEDIATE_MAX	255
80
#define IMMEDIATE_MIN	-128
81
 
7 7u83 82
extern char *outass(char *);
83
extern void load_store(instruction,int,baseoff);
84
extern void load_store_immediate(instruction,int,INT64);
85
extern void load_store_label(instruction,int,int);
86
extern void integer_branch(instruction,int,int);
87
extern void integer_jump(instruction,int,int,int);
88
extern void integer_jump_external(instruction,int,baseoff);
89
extern void integer_jump_fn(instruction,int,exp,space);
90
extern void operate_fmt(instruction,int,int,int);
91
extern void operate_fmt_immediate(instruction,int,int,int);
92
extern void operate_fmt_big_immediate(instruction,int,INT64,int);
93
extern void float_load_store(instruction,int,baseoff);
94
extern void float_branch(instruction,int,int);
95
extern void float_op(instruction,int,int,int);
96
extern void float_convert(instruction,int,int);
97
extern void float_load_store_immediate(instruction,int,char*);
98
extern void call_pal(instruction, instruction);
99
extern void fetch(instruction,baseoff);
100
extern void no_parameter_instructions(instruction);
101
extern void single_parameter_instructions(instruction,int);
102
extern void memory_fmt(instruction,int,int);
103
extern void operate_fmt(instruction,int,int,int);
2 7u83 104
#if DO_SCHEDULE
7 7u83 105
extern void out_code(Instruction_data);
106
extern void add_instruction(Instruction);
107
extern Instruction_data get_new_ins_data(void);
108
extern void output_instruction(Class,char*,char*);
109
extern void output_data(char*,char*);
2 7u83 110
 
111
typedef struct String_dat
112
{
113
    char data;
114
    struct String_dat *next;
115
} StringData;
116
 
117
typedef struct
118
{
119
    StringData *head,*tail;
120
} String;
121
 
122
#else
7 7u83 123
#define output_instruction(class,string,op)op
124
#define output_data(string,op)op
2 7u83 125
#endif
126
 
127
#endif /*INSTFMTDECS_H*/
128
 
129
 
130
 
131
 
132
 
7 7u83 133
 
134
 
135