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

Subversion Repositories openrisc

[/] [openrisc/] [tags/] [or1ksim/] [or1ksim-0.3.0/] [cpu/] [or32/] [op-mftspr-op.h] - Diff between revs 19 and 21

Go to most recent revision | Only display areas with differences | Details | Blame | View Log

Rev 19 Rev 21
/* op-mftspr-op.h -- Micro operations template for the m{f,t}spr operations
/* op-mftspr-op.h -- Micro operations template for the m{f,t}spr operations
 
 
   Copyright (C) 2005 György `nog' Jeney, nog@sdf.lonestar.org
   Copyright (C) 2005 György `nog' Jeney, nog@sdf.lonestar.org
   Copyright (C) 2008 Embecosm Limited
   Copyright (C) 2008 Embecosm Limited
 
 
   Contributor Jeremy Bennett <jeremy.bennett@embecosm.com>
   Contributor Jeremy Bennett <jeremy.bennett@embecosm.com>
 
 
   This file is part of Or1ksim, the OpenRISC 1000 Architectural Simulator.
   This file is part of Or1ksim, the OpenRISC 1000 Architectural Simulator.
 
 
   This program is free software; you can redistribute it and/or modify it
   This program is free software; you can redistribute it and/or modify it
   under the terms of the GNU General Public License as published by the Free
   under the terms of the GNU General Public License as published by the Free
   Software Foundation; either version 3 of the License, or (at your option)
   Software Foundation; either version 3 of the License, or (at your option)
   any later version.
   any later version.
 
 
   This program is distributed in the hope that it will be useful, but WITHOUT
   This program is distributed in the hope that it will be useful, but WITHOUT
   ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
   ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
   FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License for
   FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License for
   more details.
   more details.
 
 
   You should have received a copy of the GNU General Public License along
   You should have received a copy of the GNU General Public License along
   with this program.  If not, see <http://www.gnu.org/licenses/>.  */
   with this program.  If not, see <http://www.gnu.org/licenses/>.  */
 
 
/* This program is commented throughout in a fashion suitable for processing
/* This program is commented throughout in a fashion suitable for processing
   with Doxygen. */
   with Doxygen. */
 
 
 
 
#ifdef OP_2T
#ifdef OP_2T
__or_dynop void glue (op_mfspr, T) (void)
__or_dynop void glue (op_mfspr, T) (void)
{
{
  /* FIXME: NPC/PPC Handling is br0ke */
  /* FIXME: NPC/PPC Handling is br0ke */
  if (env->sprs[SPR_SR] & SPR_SR_SM)
  if (env->sprs[SPR_SR] & SPR_SR_SM)
    T0 = mfspr (T1 + OP_PARAM1);
    T0 = mfspr (T1 + OP_PARAM1);
}
}
#endif
#endif
 
 
#ifdef OP_1T
#ifdef OP_1T
__or_dynop void glue (op_mfspr_imm, T) (void)
__or_dynop void glue (op_mfspr_imm, T) (void)
{
{
  /* FIXME: NPC/PPC Handling is br0ke */
  /* FIXME: NPC/PPC Handling is br0ke */
  if (env->sprs[SPR_SR] & SPR_SR_SM)
  if (env->sprs[SPR_SR] & SPR_SR_SM)
    T0 = mfspr (OP_PARAM1);
    T0 = mfspr (OP_PARAM1);
}
}
#endif
#endif
 
 
#ifdef OP_2T
#ifdef OP_2T
__or_dynop void glue (op_mtspr, T) (void)
__or_dynop void glue (op_mtspr, T) (void)
{
{
  /* FIXME: NPC handling DOES NOT WORK like this */
  /* FIXME: NPC handling DOES NOT WORK like this */
  if (env->sprs[SPR_SR] & SPR_SR_SM)
  if (env->sprs[SPR_SR] & SPR_SR_SM)
    mtspr (T0 + OP_PARAM1, T1);
    mtspr (T0 + OP_PARAM1, T1);
}
}
#endif
#endif
 
 
#ifdef OP_1T
#ifdef OP_1T
__or_dynop void glue (op_mtspr_clear, T) (void)
__or_dynop void glue (op_mtspr_clear, T) (void)
{
{
  /* FIXME: NPC handling DOES NOT WORK like this */
  /* FIXME: NPC handling DOES NOT WORK like this */
  if (env->sprs[SPR_SR] & SPR_SR_SM)
  if (env->sprs[SPR_SR] & SPR_SR_SM)
    mtspr (T0 + OP_PARAM1, 0);
    mtspr (T0 + OP_PARAM1, 0);
}
}
 
 
__or_dynop void glue (op_mtspr_imm, T) (void)
__or_dynop void glue (op_mtspr_imm, T) (void)
{
{
  /* FIXME: NPC handling DOES NOT WORK like this */
  /* FIXME: NPC handling DOES NOT WORK like this */
  if (env->sprs[SPR_SR] & SPR_SR_SM)
  if (env->sprs[SPR_SR] & SPR_SR_SM)
    mtspr (OP_PARAM1, T0);
    mtspr (OP_PARAM1, T0);
}
}
#endif
#endif
 
 
#if !defined(OP_1T) && !defined(OP_2T)
#if !defined(OP_1T) && !defined(OP_2T)
__or_dynop void
__or_dynop void
op_mtspr_imm_clear (void)
op_mtspr_imm_clear (void)
{
{
  /* FIXME: NPC handling DOES NOT WORK like this */
  /* FIXME: NPC handling DOES NOT WORK like this */
  if (env->sprs[SPR_SR] & SPR_SR_SM)
  if (env->sprs[SPR_SR] & SPR_SR_SM)
    mtspr (OP_PARAM1, 0);
    mtspr (OP_PARAM1, 0);
}
}
#endif
#endif
 
 

powered by: WebSVN 2.1.0

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