OpenCores
URL https://opencores.org/ocsvn/openrisc/openrisc/trunk

Subversion Repositories openrisc

[/] [openrisc/] [trunk/] [or1ksim/] [cpu/] [or32/] [or32.c] - Diff between revs 420 and 458

Go to most recent revision | Show entire file | Details | Blame | View Log

Rev 420 Rev 458
Line 1088... Line 1088...
int           trace_dest_reg;
int           trace_dest_reg;
int           trace_store_addr_reg;
int           trace_store_addr_reg;
unsigned int  trace_store_imm;
unsigned int  trace_store_imm;
int           trace_store_val_reg;
int           trace_store_val_reg;
int           trace_store_width;
int           trace_store_width;
 
int           trace_dest_spr;
 
 
/* Automagically does zero- or sign- extension and also finds correct
/* Automagically does zero- or sign- extension and also finds correct
   sign bit position if sign extension is correct extension. Which extension
   sign bit position if sign extension is correct extension. Which extension
   is proper is figured out from letter description. */
   is proper is figured out from letter description. */
 
 
Line 1318... Line 1319...
  int                i;
  int                i;
  char              *dest        = or1ksim_disassembled;
  char              *dest        = or1ksim_disassembled;
 
 
  /* Set trace result defaults. */
  /* Set trace result defaults. */
  trace_dest_reg       = -1;
  trace_dest_reg       = -1;
 
  trace_dest_spr       = -1;
  trace_store_addr_reg = -1;
  trace_store_addr_reg = -1;
  trace_store_imm      =  0;
  trace_store_imm      =  0;
  trace_store_val_reg  = -1;
  trace_store_val_reg  = -1;
  trace_store_width    =  0;     /* Non-zero if we have a store */
  trace_store_width    =  0;     /* Non-zero if we have a store */
 
 
Line 1344... Line 1346...
      else if (0 == strcmp ("l.sw", opcode->name))
      else if (0 == strcmp ("l.sw", opcode->name))
        {
        {
          trace_store_width = 4;
          trace_store_width = 4;
        }
        }
 
 
 
      /* Is it a move to SPR opcode? */
 
      if (0 == strcmp ("l.mtspr", opcode->name))
 
        {
 
          trace_dest_spr = 1;
 
        }
 
 
      /* Copy the opcode and pad */
      /* Copy the opcode and pad */
      strcpy (dest, opcode->name);
      strcpy (dest, opcode->name);
 
 
      for (i = 0; i < OPC_WIDTH; i++)
      for (i = 0; i < OPC_WIDTH; i++)
        {
        {
Line 1409... Line 1417...
                      trace_store_imm =
                      trace_store_imm =
                        or1ksim_or32_extract (*s, opcode->encoding, insn);
                        or1ksim_or32_extract (*s, opcode->encoding, insn);
                      trace_store_imm =
                      trace_store_imm =
                        or1ksim_extend_imm (trace_store_imm, *s);
                        or1ksim_extend_imm (trace_store_imm, *s);
                    }
                    }
 
 
 
                  if (1 == trace_dest_spr)
 
                  {
 
                          trace_dest_spr =
 
                                  or1ksim_or32_extract ('K', opcode->encoding,
 
                                                        insn);
 
                          trace_dest_reg =
 
                                  or1ksim_or32_extract ('A', opcode->encoding,
 
                                                        insn);
 
                  }
 
 
                }
                }
              else
              else
                {
                {
                  *dest++ = *s;
                  *dest++ = *s;
                  *dest = 0;
                  *dest = 0;

powered by: WebSVN 2.1.0

© copyright 1999-2024 OpenCores.org, equivalent to Oliscience, all rights reserved. OpenCores®, registered trademark.