URL
https://opencores.org/ocsvn/or1k/or1k/trunk
[/] [or1k/] [trunk/] [or1ksim/] [cpu/] [or32/] [generate.c] - Diff between revs 1346 and 1350
Go to most recent revision |
Show entire file |
Details |
Blame |
View Log
Rev 1346 |
Rev 1350 |
Line 24... |
Line 24... |
#include <stdarg.h>
|
#include <stdarg.h>
|
#include <ctype.h>
|
#include <ctype.h>
|
|
|
#include "config.h"
|
#include "config.h"
|
#include "opcode/or32.h"
|
#include "opcode/or32.h"
|
#include "abstract.h"
|
|
|
|
static char *in_file;
|
static char *in_file;
|
static char *out_file;
|
static char *out_file;
|
|
|
/* Whether this instruction stores something in register */
|
/* Whether this instruction stores something in register */
|
Line 142... |
Line 141... |
int sbit;
|
int sbit;
|
int dis_op = -1;
|
int dis_op = -1;
|
|
|
write_to_reg = 0;
|
write_to_reg = 0;
|
|
|
shift_fprintf (level, fo, "unsigned long ");
|
shift_fprintf (level, fo, "uorreg_t ");
|
|
|
/* Count number of operands */
|
/* Count number of operands */
|
for (i = 0, num_ops = 0;; i++) {
|
for (i = 0, num_ops = 0;; i++) {
|
if (!(opd[i].type & OPTYPE_OP))
|
if (!(opd[i].type & OPTYPE_OP))
|
continue;
|
continue;
|
Line 277... |
Line 276... |
/* Generates .c file header */
|
/* Generates .c file header */
|
static int generate_header (FILE *fo)
|
static int generate_header (FILE *fo)
|
{
|
{
|
fprintf (fo, "/* This file was automatically generated by generate (see cpu/or32/generate.c) */\n\n");
|
fprintf (fo, "/* This file was automatically generated by generate (see cpu/or32/generate.c) */\n\n");
|
fprintf (fo, "static inline void decode_execute (struct iqueue_entry *current)\n{\n");
|
fprintf (fo, "static inline void decode_execute (struct iqueue_entry *current)\n{\n");
|
fprintf (fo, " unsigned long insn = current->insn;\n");
|
fprintf (fo, " uint32_t insn = current->insn;\n");
|
out_lines = 5;
|
out_lines = 5;
|
return 0;
|
return 0;
|
}
|
}
|
|
|
/* Generates .c file footer */
|
/* Generates .c file footer */
|
© copyright 1999-2025
OpenCores.org, equivalent to Oliscience, all rights reserved. OpenCores®, registered trademark.