|
Message
From: OpenCores CVS Agent<cvs@o...>
Date: Thu Jan 27 14:17:05 CET 2005
Subject: [cvs-checkins] MODIFIED: or1k ...
Date: 00/05/01 27:14:17 Modified: or1k/or1ksim/cpu/or32 or32.c Log: Mark wich operand is the destination operand in the architechture definition Revision Changes Path 1.38 +31 -32 or1k/or1ksim/cpu/or32/or32.c http://www.opencores.org/cvsweb.shtml/or1k/or1ksim/cpu/or32/or32.c.diff?r1=1.37&r2=1.38 (In the diff below, changes in quantity of whitespace are not shown.) Index: or32.c =================================================================== RCS file: /cvsroot/nogj/or1k/or1ksim/cpu/or32/or32.c,v retrieving revision 1.37 retrieving revision 1.38 diff -u -b -r1.37 -r1.38 --- or32.c 11 Jan 2005 15:41:58 -0000 1.37 +++ or32.c 27 Jan 2005 13:15:50 -0000 1.38 @@ -20,6 +20,9 @@ /* * $Log: or32.c,v $ + * Revision 1.38 2005/01/27 13:15:50 nogj + * Mark wich operand is the destination operand in the architechture definition + * * Revision 1.37 2005/01/11 15:41:58 andreje * l.ff1 instruction added * @@ -85,26 +88,24 @@ code (when assembling). */ -#if defined HAS_EXECUTION && SIMPLE_EXECUTION -#define EFN &l_none -#define EF(func) &(func) -#define EFI &l_invalid +#ifdef HAS_EXECUTION +# if SIMPLE_EXECUTION +# define EFN &l_none +# define EF(func) &(func) +# define EFI &l_invalid +# else /* SIMPLE_EXECUTION */ +# define EFN "l_none" +# define EFI "l_invalid" +# ifdef __GNUC__ +# define EF(func) #func +# else +# define EF(func) "func" +# endif +# endif /* SIMPLE_EXECUTION */ #else /* HAS_EXECUTION */ - -#ifndef HAS_EXECUTION -#define EFN &l_none -#define EF(func) EFN -#define EFI EFN -#else /* !HAS_EXECUTION */ -#define EFN "l_none" -#define EFI "l_invalid" -#ifdef __GNUC__ -#define EF(func) #func -#else -#define EF(func) "func" -#endif -#endif /* !HAS_EXECUTION */ - +# define EFN &l_none +# define EF(func) EFN +# define EFI EFN #endif /* HAS_EXECUTION */ CONST struct or32_opcode or32_opcodes[] = @@ -292,10 +293,10 @@ { "lf.sfle.d", "rA,rB", "11 0x2 ----- AAAAA BBBB B--- 0x1 0xD", EFI, 0 }, { "lf.cust1.d", "rA,rB", "11 0x2 ----- AAAAA BBBB B--- 0xE ----", EFI, 0 }, -{ "l.sd", "I(rA),rB", "11 0x4 IIIII AAAAA BBBB BIII IIII IIII", EFI, 0 }, -{ "l.sw", "I(rA),rB", "11 0x5 IIIII AAAAA BBBB BIII IIII IIII", EF(l_sw), 0 }, -{ "l.sb", "I(rA),rB", "11 0x6 IIIII AAAAA BBBB BIII IIII IIII", EF(l_sb), 0 }, -{ "l.sh", "I(rA),rB", "11 0x7 IIIII AAAAA BBBB BIII IIII IIII", EF(l_sh), 0 }, +{ "l.sd", "I(rD),rB", "11 0x4 IIIII DDDDD BBBB BIII IIII IIII", EFI, 0 }, +{ "l.sw", "I(rD),rB", "11 0x5 IIIII DDDDD BBBB BIII IIII IIII", EF(l_sw), 0 }, +{ "l.sb", "I(rD),rB", "11 0x6 IIIII DDDDD BBBB BIII IIII IIII", EF(l_sb), 0 }, +{ "l.sh", "I(rD),rB", "11 0x7 IIIII DDDDD BBBB BIII IIII IIII", EF(l_sh), 0 }, { "l.add", "rD,rA,rB", "11 0x8 DDDDD AAAAA BBBB B-00 ---- 0x0", EF(l_add), OR32_W_FLAG }, { "l.addc", "rD,rA,rB", "11 0x8 DDDDD AAAAA BBBB B-00 ---- 0x1", EF(l_addc), OR32_W_FLAG }, @@ -369,12 +370,8 @@ /* **INDENT-ON** */ /* Define dummy, if debug is not defined. */ -#if !defined HAS_DEBUG -void debug(int level, const char *format, ...) -{ - /* Just to get rid of warnings. */ - format = level = 0; -} +#ifndef HAS_DEBUG +#define debug(l, fmt...) ;
#endif
CONST int num_opcodes = ((sizeof(or32_opcodes)) / (sizeof(struct or32_opcode))) - 1;
@@ -463,7 +460,7 @@
/*** Finite automata for instruction decoding building code ***/
-/* Find simbols in encoding. */
+/* Find symbols in encoding. */
unsigned long
insn_extract(param_ch, enc_initial)
char param_ch;
@@ -511,7 +508,7 @@
int nuncovered;
int curpass = 0;
-/* MM: Struct that hold runtime build information about instructions. */
+/* MM: Struct that holds runtime build information about instructions. */
struct temp_insn_struct
{
unsigned long insn;
@@ -658,6 +655,8 @@
{
args++;
type |= OPTYPE_REG;
+ if(args[1] == 'D')
+ type |= OPTYPE_DST;
}
else if (isalpha (*args))
{
|
 |