24 #ifndef OTAWA_SEM_INST_H_
25 #define OTAWA_SEM_INST_H_
28 #include <elm/genstruct/Vector.h>
34 namespace hard {
class Platform; }
123 { _d = d; args.regs.a = a; }
125 { _d = d; args.regs.a = a; args.regs.b = b; }
152 inline inst _if(
int cond,
int sr,
int jump) { ASSERT(cond >= 0 && cond <
MAX_COND);
return inst(
IF, cond, sr, jump); }
struct otawa::sem::inst inst
t::int16 b
Definition: inst.h:115
inst shr(int d, int a, int b)
Definition: inst.h:166
inst cmp(int d, int a, int b)
Definition: inst.h:161
inst(opcode _op, int d, int a, int b)
Definition: inst.h:124
cond_t invert(cond_t cond)
Invert the given condition.
Definition: sem.cpp:499
inst setp(int d, unsigned long cst)
Definition: inst.h:160
InstIter(const InstIter &iter)
Definition: inst.h:189
t::int16 _d
Definition: inst.h:112
inst spec(int d, unsigned long cst)
Definition: inst.h:179
inst mulh(int d, int a, int b)
Definition: inst.h:180
inst _and(int d, int a, int b)
Definition: inst.h:170
inst mul(int d, int a, int b)
Definition: inst.h:172
inst asr(int d, int a, int b)
Definition: inst.h:167
inst divu(int d, int a, int b)
Definition: inst.h:175
t::int16 addr(void) const
Definition: inst.h:136
t::uint32 cst(void) const
Definition: inst.h:194
inst modu(int d, int a, int b)
Definition: inst.h:177
union otawa::sem::inst::@2 args
A block represents a sequence of semantic instructions inst.
Definition: inst.h:183
const hard::Platform * pf
Definition: inst.h:208
t::int16 reg(void) const
Definition: inst.h:135
inst cmpu(int d, int a, int b)
Definition: inst.h:162
elm::io::Output & operator<<(elm::io::Output &out, Address addr)
Definition: base.cpp:188
enum otawa::sem::type_t type_t
inst(opcode _op, int d, int a)
Definition: inst.h:122
opcode op(void) const
Definition: inst.h:190
t::int16 sr(void) const
Definition: inst.h:141
t::int16 a(void) const
Definition: inst.h:192
t::int16 b(void) const
Definition: inst.h:129
enum otawa::sem::opcode opcode
inst cont(void)
Definition: inst.h:151
enum otawa::sem::cond_t cond_t
t::uint32 cst(void) const
Definition: inst.h:132
inst(opcode _op, int d)
Definition: inst.h:120
inst trap(void)
Definition: inst.h:150
type_t
Definition: inst.h:94
type_t type(void) const
Definition: inst.h:137
opcode
Definition: inst.h:40
inst mulu(int d, int a, int b)
Definition: inst.h:173
void print(elm::io::Output &out) const
Print the current block.
Definition: sem.cpp:390
t::int16 d(void) const
Definition: inst.h:127
inst(void)
Definition: inst.h:118
inst scratch(int d)
Definition: inst.h:157
sys::SystemOutStream & out
void print(elm::io::Output &out) const
Output the current instruction to the given output.
Definition: sem.cpp:375
cond_t
Definition: inst.h:76
inst load(int d, int a, type_t t)
Definition: inst.h:154
inst _if(int cond, int sr, int jump)
Definition: inst.h:152
t::int16 a(void) const
Definition: inst.h:128
t::int16 b(void) const
Definition: inst.h:193
inst add(int d, int a, int b)
Definition: inst.h:163
inst sub(int d, int a, int b)
Definition: inst.h:164
elm::genstruct::Vector< inst > S
Definition: inst.h:184
cond_t cond(void) const
Definition: inst.h:140
t::uint32 cst
Definition: inst.h:114
Printer class for semantic instructions (resolve the generic register value to the their real platfor...
Definition: inst.h:201
inst _xor(int d, int a, int b)
Definition: inst.h:178
t::uint16 op
Definition: inst.h:111
Printer(const hard::Platform *platform=0)
Definition: inst.h:203
t::uint16 jump(void) const
Definition: inst.h:142
This structure class represents an instruction in the semantics representation of machine instruction...
Definition: inst.h:110
t::int16 d(void) const
Definition: inst.h:191
inst store(int d, int a, type_t t)
Definition: inst.h:156
Definition: Microprocessor.h:52
const Type & type(void)
Definition: type.h:163
inst mod(int d, int a, int b)
Definition: inst.h:176
inst neg(int d, int a)
Definition: inst.h:168
inst branch(int to)
Definition: inst.h:149
inst shl(int d, int a, int b)
Definition: inst.h:165
Definition: Microprocessor.h:51
inst(opcode _op)
Definition: inst.h:119
InstIter(const Block &block)
Definition: inst.h:188
inst _or(int d, int a, int b)
Definition: inst.h:171
inst seti(int d, unsigned long cst)
Definition: inst.h:159
inst div(int d, int a, int b)
Definition: inst.h:174
inst nop(void)
Definition: inst.h:148
inst _not(int d, int a)
Definition: inst.h:169