Update ROCm for multi-target support
[deliverable/binutils-gdb.git] / sim / m68hc11 / interrupts.c
index 6fa5b04003cd45dcb66368d4ab8714826f5db574..dd1b479c18c5752349b5fcd4422558d9a2472192 100644 (file)
@@ -1,22 +1,21 @@
 /* interrupts.c -- 68HC11 Interrupts Emulation
-   Copyright 1999, 2000, 2001, 2002, 2003, 2007 Free Software Foundation, Inc.
+   Copyright 1999-2020 Free Software Foundation, Inc.
    Written by Stephane Carrez (stcarrez@nerim.fr)
 
 This file is part of GDB, GAS, and the GNU binutils.
 
-GDB, GAS, and the GNU binutils are free software; you can redistribute
-them and/or modify them under the terms of the GNU General Public
-License as published by the Free Software Foundation; either version
-1, or (at your option) any later version.
+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 Software Foundation; either version 3 of the License, or
+(at your option) any later version.
 
-GDB, GAS, and the GNU binutils are distributed in the hope that they
-will be useful, but WITHOUT ANY WARRANTY; without even the implied
-warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See
-the GNU General Public License for more details.
+This program is distributed in the hope that it will be useful,
+but WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+GNU General Public License for more details.
 
 You should have received a copy of the GNU General Public License
-along with this file; see the file COPYING.  If not, write to the Free
-Software Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.  */
+along with this program.  If not, see <http://www.gnu.org/licenses/>.  */
 
 #include "sim-main.h"
 #include "sim-options.h"
@@ -92,7 +91,6 @@ struct interrupt_def idefs[] = {
 #endif
 };
 
-#define TableSize(X) (sizeof X / sizeof(X[0]))
 #define CYCLES_MAX ((((signed64) 1) << 62) - 1)
 
 enum
@@ -124,11 +122,11 @@ static const OPTION interrupt_options[] =
 
 /* Initialize the interrupts module.  */
 void
-interrupts_initialize (SIM_DESC sd, struct _sim_cpu *proc)
+interrupts_initialize (SIM_DESC sd, sim_cpu *cpu)
 {
-  struct interrupts *interrupts = &proc->cpu_interrupts;
+  struct interrupts *interrupts = &cpu->cpu_interrupts;
   
-  interrupts->cpu          = proc;
+  interrupts->cpu          = cpu;
 
   sim_add_option_table (sd, 0, interrupt_options);
 }
@@ -291,7 +289,7 @@ interrupts_update_pending (struct interrupts *interrupts)
   set_mask = 0;
   ioregs = &interrupts->cpu->ios[0];
   
-  for (i = 0; i < TableSize(idefs); i++)
+  for (i = 0; i < ARRAY_SIZE (idefs); i++)
     {
       struct interrupt_def *idef = &idefs[i];
       uint8 data;
This page took 0.028458 seconds and 4 git commands to generate.