sime-base.h: fix typos in STATE_CPU() examples
[binutils-gdb.git] / sim / common / sim-base.h
index 856181ec84c44e635364afd5e1baadf021f6d157..ab5eb68cd16c86023ac3f602ff1af65272486390 100644 (file)
@@ -1,6 +1,7 @@
 /* Simulator pseudo baseclass.
 
-   Copyright 1997, 1998, 2003, 2007 Free Software Foundation, Inc.
+   Copyright 1997, 1998, 2003, 2007, 2008, 2009, 2010
+   Free Software Foundation, Inc.
 
    Contributed by Cygnus Support.
 
@@ -43,11 +44,11 @@ along with this program.  If not, see <http://www.gnu.org/licenses/>.  */
      };
 
      struct sim_state {
-       sim_cpu cpu[MAX_NR_PROCESSORS];
+       sim_cpu *cpu[MAX_NR_PROCESSORS];
      #if (WITH_SMP)
-     #define STATE_CPU(sd,n) (&(sd)->cpu[n])
+     #define STATE_CPU(sd,n) ((sd)->cpu[n])
      #else
-     #define STATE_CPU(sd,n) (&(sd)->cpu[0])
+     #define STATE_CPU(sd,n) ((sd)->cpu[0])
      #endif
        ... simulator specific members ...
        sim_state_base base;