X-Git-Url: http://drtracing.org/?a=blobdiff_plain;f=sim%2Fd10v%2Fgencode.c;h=2d1269be996dda380744dce672b380c1180b6cca;hb=27842f65f27045c0f1d7885d4f34ac37625e645c;hp=71e92e8e746bb742fda8b2f029f2ec3cf9af0ab1;hpb=e98fe4f7b54cbdf29aef9287bbb1bea8801dd05a;p=deliverable%2Fbinutils-gdb.git diff --git a/sim/d10v/gencode.c b/sim/d10v/gencode.c index 71e92e8e74..2d1269be99 100644 --- a/sim/d10v/gencode.c +++ b/sim/d10v/gencode.c @@ -1,4 +1,10 @@ -#include "d10v_sim.h" +#include "config.h" +#include +#include +#include +#include "ansidecl.h" +#include "callback.h" +#include "opcode/d10v.h" static void write_header PARAMS ((void)); static void write_opcodes PARAMS ((void)); @@ -122,7 +128,7 @@ write_opcodes () if ((flags & OPERAND_REG) || (flags & OPERAND_NUM) || (flags & OPERAND_ADDR)) j++; } - printf ("%d,{",j); + printf ("%d,",j); j = 0; for (i=0;i<6;i++) @@ -131,7 +137,9 @@ write_opcodes () int shift = d10v_operands[opcode->operands[i]].shift; if ((flags & OPERAND_REG) || (flags & OPERAND_NUM)|| (flags & OPERAND_ADDR)) { - if (j) + if (j == 0) + printf ("{"); + else printf (", "); if ((flags & OPERAND_REG) && (opcode->format == LONG_L)) shift += 15; @@ -139,8 +147,10 @@ write_opcodes () j = 1; } } - printf ("}},\n"); + if (j) + printf ("}"); + printf ("},\n"); } } - printf ("{ 0,0,0,0,0,0,NULL,0,{ }},\n};\n"); + printf ("{ 0,0,0,0,0,0,0,(void (*)(void))0,0,{0,0,0}},\n};\n"); }