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

Subversion Repositories openrisc_me

[/] [openrisc/] [trunk/] [or1ksim/] [cpu/] [or32/] [op-mftspr-op.h] - Blame information for rev 294

Go to most recent revision | Details | Compare with Previous | View Log

Line No. Rev Author Line
1 19 jeremybenn
/* op-mftspr-op.h -- Micro operations template for the m{f,t}spr operations
2
 
3
   Copyright (C) 2005 György `nog' Jeney, nog@sdf.lonestar.org
4
   Copyright (C) 2008 Embecosm Limited
5
 
6
   Contributor Jeremy Bennett <jeremy.bennett@embecosm.com>
7
 
8
   This file is part of Or1ksim, the OpenRISC 1000 Architectural Simulator.
9
 
10
   This program is free software; you can redistribute it and/or modify it
11
   under the terms of the GNU General Public License as published by the Free
12
   Software Foundation; either version 3 of the License, or (at your option)
13
   any later version.
14
 
15
   This program is distributed in the hope that it will be useful, but WITHOUT
16
   ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
17
   FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License for
18
   more details.
19
 
20
   You should have received a copy of the GNU General Public License along
21
   with this program.  If not, see <http://www.gnu.org/licenses/>.  */
22
 
23
/* This program is commented throughout in a fashion suitable for processing
24
   with Doxygen. */
25
 
26
 
27
#ifdef OP_2T
28
__or_dynop void glue (op_mfspr, T) (void)
29
{
30
  /* FIXME: NPC/PPC Handling is br0ke */
31
  if (env->sprs[SPR_SR] & SPR_SR_SM)
32
    T0 = mfspr (T1 + OP_PARAM1);
33
}
34
#endif
35
 
36
#ifdef OP_1T
37
__or_dynop void glue (op_mfspr_imm, T) (void)
38
{
39
  /* FIXME: NPC/PPC Handling is br0ke */
40
  if (env->sprs[SPR_SR] & SPR_SR_SM)
41
    T0 = mfspr (OP_PARAM1);
42
}
43
#endif
44
 
45
#ifdef OP_2T
46
__or_dynop void glue (op_mtspr, T) (void)
47
{
48
  /* FIXME: NPC handling DOES NOT WORK like this */
49
  if (env->sprs[SPR_SR] & SPR_SR_SM)
50
    mtspr (T0 + OP_PARAM1, T1);
51
}
52
#endif
53
 
54
#ifdef OP_1T
55
__or_dynop void glue (op_mtspr_clear, T) (void)
56
{
57
  /* FIXME: NPC handling DOES NOT WORK like this */
58
  if (env->sprs[SPR_SR] & SPR_SR_SM)
59
    mtspr (T0 + OP_PARAM1, 0);
60
}
61
 
62
__or_dynop void glue (op_mtspr_imm, T) (void)
63
{
64
  /* FIXME: NPC handling DOES NOT WORK like this */
65
  if (env->sprs[SPR_SR] & SPR_SR_SM)
66
    mtspr (OP_PARAM1, T0);
67
}
68
#endif
69
 
70
#if !defined(OP_1T) && !defined(OP_2T)
71
__or_dynop void
72
op_mtspr_imm_clear (void)
73
{
74
  /* FIXME: NPC handling DOES NOT WORK like this */
75
  if (env->sprs[SPR_SR] & SPR_SR_SM)
76
    mtspr (OP_PARAM1, 0);
77
}
78
#endif

powered by: WebSVN 2.1.0

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