Parent Directory | Revision Log | Patch
revision 1.4 by misto, Sat Dec 28 16:28:11 2002 UTC | revision 1.5 by misto, Thu Jan 2 17:43:54 2003 UTC | |
---|---|---|
# | Line 34 class constant : public circuit { | Line 34 class constant : public circuit { |
34 | public: | public: |
35 | constant( int nout ) | constant( int nout ) |
36 | : circuit(1, nout) {}; | : circuit(1, nout) {}; |
37 | void process() { | void process( void ); |
bit_word res; | ||
iw = get_in(0); | ||
if ( iw.format == instr_word::primary_imm ) | ||
res = iw.imm13; | ||
else if (iw.format == instr_word::branch_format ) | ||
res = 4 * iw.dsp22; | ||
else if (iw.format == instr_word::call_format ) | ||
res = 4 * iw.dsp30; | ||
else if (iw.format == instr_word::sethi_format ) | ||
res = iw.imm22; | ||
set_out_all( res ); | ||
} | ||
38 | }; | }; |
39 | ||
40 | #endif | #endif |
|
savannah-hackers-public@gnu.org | ViewVC Help |
Powered by ViewVC 1.1.26 |