mirror of
https://github.com/open-simh/simh.git
synced 2026-04-26 20:26:59 +00:00
Compiler indicated cleanups
This commit is contained in:
@@ -1,6 +1,6 @@
|
||||
/* hp2100_cpu.c: HP 21xx/1000 CPU simulator
|
||||
|
||||
Copyright (c) 1993-2012, Robert M. Supnik
|
||||
Copyright (c) 1993-2013, Robert M. Supnik
|
||||
|
||||
Permission is hereby granted, free of charge, to any person obtaining a
|
||||
copy of this software and associated documentation files (the "Software"),
|
||||
@@ -29,6 +29,7 @@
|
||||
DMA1,DMA2 12607B/12578A/12895A direct memory access controller
|
||||
DCPC1,DCPC2 12897B dual channel port controller
|
||||
|
||||
18-Mar-13 JDB Removed redundant extern declarations
|
||||
09-May-12 JDB Separated assignments from conditional expressions
|
||||
13-Jan-12 JDB Minor speedup in "is_mapped"
|
||||
Added casts to cpu_mod, dmasio, dmapio, cpu_reset, dma_reset
|
||||
@@ -444,6 +445,7 @@
|
||||
|
||||
#include "hp2100_defs.h"
|
||||
#include "hp2100_cpu.h"
|
||||
#include "hp2100_cpu1.h"
|
||||
|
||||
|
||||
/* Memory protect constants */
|
||||
@@ -561,8 +563,9 @@ uint16 dms_map[MAP_NUM * MAP_LNT] = { 0 }; /* dms maps */
|
||||
|
||||
/* External data */
|
||||
|
||||
extern char halt_msg[];
|
||||
extern char halt_msg []; /* halt message */
|
||||
extern DIB clk_dib; /* CLK DIB for idle check */
|
||||
extern const BOOT_ROM ptr_rom, dq_rom, ms_rom, ds_rom; /* boot ROMs for cpu_boot routine */
|
||||
|
||||
/* CPU local routines */
|
||||
|
||||
@@ -601,14 +604,6 @@ IOHANDLER dmapio;
|
||||
IOHANDLER dmasio;
|
||||
IOHANDLER nullio;
|
||||
|
||||
/* External routines */
|
||||
|
||||
extern t_stat cpu_eau (uint32 IR, uint32 intrq);
|
||||
extern t_stat cpu_uig_0 (uint32 IR, uint32 intrq, uint32 iotrap);
|
||||
extern t_stat cpu_uig_1 (uint32 IR, uint32 intrq, uint32 iotrap);
|
||||
|
||||
extern void (*sim_vm_post) (t_bool from_scp);
|
||||
|
||||
|
||||
/* Table of CPU features by model.
|
||||
|
||||
@@ -3959,7 +3954,6 @@ t_stat cpu_show_idle (FILE *st, UNIT *uptr, int32 val, void *desc)
|
||||
|
||||
t_stat cpu_boot (int32 unitno, DEVICE *dptr)
|
||||
{
|
||||
extern const BOOT_ROM ptr_rom, dq_rom, ms_rom, ds_rom;
|
||||
int32 dev = (SR >> IBL_V_DEV) & I_DEVMASK;
|
||||
int32 sel = (SR >> IBL_V_SEL) & IBL_M_SEL;
|
||||
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
/* hp2100_cpu.h: HP 2100 CPU definitions
|
||||
|
||||
Copyright (c) 2005-2010, Robert M. Supnik
|
||||
Copyright (c) 2005-2013, Robert M. Supnik
|
||||
|
||||
Permission is hereby granted, free of charge, to any person obtaining a
|
||||
copy of this software and associated documentation files (the "Software"),
|
||||
@@ -23,6 +23,7 @@
|
||||
be used in advertising or otherwise to promote the sale, use or other dealings
|
||||
in this Software without prior written authorization from Robert M Supnik.
|
||||
|
||||
18-Mar-13 JDB Added declarations for the MP abort handler and CPU registers
|
||||
03-Jan-10 RMS Changed declarations of mp_control, mp_mefvv, for VMS compiler
|
||||
15-Jul-08 JDB Rearranged declarations with hp2100_cpu.c and hp2100_defs.h
|
||||
26-Jun-08 JDB Added mp_control to CPU state externals
|
||||
@@ -298,6 +299,7 @@ extern uint32 pcq_p;
|
||||
extern uint32 stop_inst;
|
||||
extern UNIT cpu_unit;
|
||||
extern DEVICE cpu_dev;
|
||||
extern REG cpu_reg [];
|
||||
extern jmp_buf save_env;
|
||||
|
||||
|
||||
|
||||
@@ -305,11 +305,17 @@ extern t_stat cpu_signal (uint32 IR, uint32 intrq); /* [7] SIGNA
|
||||
|
||||
/* Microcode helper functions */
|
||||
|
||||
OP ReadOp (uint32 va, OPSIZE precision); /* generalized operand read */
|
||||
void WriteOp (uint32 va, OP operand, OPSIZE precision); /* generalized operand write */
|
||||
t_stat cpu_ops (OP_PAT pattern, OPS op, uint32 irq); /* operand processor */
|
||||
extern OP ReadOp (uint32 va, OPSIZE precision); /* generalized operand read */
|
||||
extern void WriteOp (uint32 va, OP operand, OPSIZE precision); /* generalized operand write */
|
||||
extern t_stat cpu_ops (OP_PAT pattern, OPS op, uint32 irq); /* operand processor */
|
||||
|
||||
void fprint_ops (OP_PAT pattern, OPS op); /* debug print operands */
|
||||
void fprint_regs (char *caption, uint32 regs, uint32 base); /* debug print CPU registers */
|
||||
extern void fprint_ops (OP_PAT pattern, OPS op); /* debug print operands */
|
||||
extern void fprint_regs (char *caption, uint32 regs, uint32 base); /* debug print CPU registers */
|
||||
|
||||
/* implemented in hp2100_cpu5.c (RTE-IV EMA functions) */
|
||||
|
||||
extern t_stat cpu_ema_eres (uint32 *rtn, uint32 dtbl, uint32 atbl, t_bool debug);
|
||||
extern t_stat cpu_ema_eseg (uint32 *rtn, uint32 ir, uint32 tbl, t_bool debug);
|
||||
extern t_stat cpu_ema_vset (uint32 *rtn, OPS op, t_bool debug);
|
||||
|
||||
#endif
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
/* hp2100_cpu6.c: HP 1000 RTE-6/VM OS instructions
|
||||
|
||||
Copyright (c) 2006-2012, J. David Bryan
|
||||
Copyright (c) 2006-2013, J. David Bryan
|
||||
|
||||
Permission is hereby granted, free of charge, to any person obtaining a
|
||||
copy of this software and associated documentation files (the "Software"),
|
||||
@@ -25,6 +25,7 @@
|
||||
|
||||
CPU6 RTE-6/VM OS instructions
|
||||
|
||||
18-Mar-13 JDB Use MP abort handler declaration in hp2100_cpu.h
|
||||
09-May-12 JDB Separated assignments from conditional expressions
|
||||
29-Oct-10 JDB DMA channels renamed from 0,1 to 1,2 to match documentation
|
||||
18-Sep-08 JDB Corrected .SIP debug formatting
|
||||
@@ -53,11 +54,6 @@
|
||||
#include "hp2100_cpu1.h"
|
||||
|
||||
|
||||
/* external variables */
|
||||
|
||||
extern jmp_buf save_env; /* MP abort handler */
|
||||
|
||||
|
||||
/* Offsets to data and addresses within RTE. */
|
||||
|
||||
static const uint32 xi = 0001647; /* XI address */
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
/* hp2100_cpu7.c: HP 1000 VIS and SIGNAL/1000 microcode
|
||||
|
||||
Copyright (c) 2008, Holger Veit
|
||||
Copyright (c) 2006-2012, J. David Bryan
|
||||
Copyright (c) 2006-2013, J. David Bryan
|
||||
|
||||
Permission is hereby granted, free of charge, to any person obtaining a
|
||||
copy of this software and associated documentation files (the "Software"),
|
||||
@@ -26,6 +26,7 @@
|
||||
|
||||
CPU7 Vector Instruction Set and SIGNAL firmware
|
||||
|
||||
18-Mar-13 JDB Moved EMA helper declarations to hp2100_cpu1.h
|
||||
09-May-12 JDB Separated assignments from conditional expressions
|
||||
06-Feb-12 JDB Corrected "opsize" parameter type in vis_abs
|
||||
11-Sep-08 JDB Moved microcode function prototypes to hp2100_cpu1.h
|
||||
@@ -123,11 +124,6 @@ static const OP zero = { { 0, 0, 0, 0, 0 } }; /* DEC 0.0D0 */
|
||||
- VIS Microcode Source (12824-18059, revision 3).
|
||||
*/
|
||||
|
||||
/* implemented in hp2100_cpu5.c (RTE-IV EMA functions) */
|
||||
extern t_stat cpu_ema_eres(uint32* rtn,uint32 dtbl,uint32 atbl, t_bool debug);
|
||||
extern t_stat cpu_ema_eseg(uint32* rtn,uint32 ir,uint32 tbl, t_bool debug);
|
||||
extern t_stat cpu_ema_vset(uint32* rtn,OPS op, t_bool debug);
|
||||
|
||||
static const OP_PAT op_vis[16] = {
|
||||
OP_N, OP_AAKAKAKK,OP_AKAKK, OP_AAKK, /* .VECT VPIV VABS VSUM */
|
||||
OP_AAKK, OP_AAKAKK, OP_AAKK, OP_AAKK, /* VNRM VDOT VMAX VMAB */
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
/* hp2100_defs.h: HP 2100 simulator definitions
|
||||
|
||||
Copyright (c) 1993-2012, Robert M. Supnik
|
||||
Copyright (c) 1993-2013, Robert M. Supnik
|
||||
|
||||
Permission is hereby granted, free of charge, to any person obtaining a
|
||||
copy of this software and associated documentation files (the "Software"),
|
||||
@@ -23,6 +23,7 @@
|
||||
be used in advertising or otherwise to promote the sale, use or other dealings
|
||||
in this Software without prior written authorization from Robert M Supnik.
|
||||
|
||||
18-Mar-13 JDB Added "-Wdangling-else" to the suppression pragmas
|
||||
14-Dec-12 JDB Added "-Wbitwise-op-parentheses" to the suppression pragmas
|
||||
12-May-12 JDB Added pragmas to suppress logical operator precedence warnings
|
||||
10-Feb-12 JDB Added hp_setsc, hp_showsc functions to support SC modifier
|
||||
@@ -81,6 +82,7 @@
|
||||
#pragma GCC diagnostic ignored "-Wpragmas"
|
||||
#pragma GCC diagnostic ignored "-Wlogical-op-parentheses"
|
||||
#pragma GCC diagnostic ignored "-Wbitwise-op-parentheses"
|
||||
#pragma GCC diagnostic ignored "-Wdangling-else"
|
||||
#endif
|
||||
|
||||
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
/* hp2100_ds.c: HP 13037D/13175D disc controller/interface simulator
|
||||
|
||||
Copyright (c) 2004-2012, Robert M. Supnik
|
||||
Copyright (c) 2012 J. David Bryan
|
||||
Copyright (c) 2012-2013 J. David Bryan
|
||||
|
||||
Permission is hereby granted, free of charge, to any person obtaining a
|
||||
copy of this software and associated documentation files (the "Software"),
|
||||
@@ -26,6 +26,7 @@
|
||||
|
||||
DS 13037D/13175D disc controller/interface
|
||||
|
||||
18-Mar-13 JDB Fixed poll_drives definition to match declaration
|
||||
24-Oct-12 JDB Changed CNTLR_OPCODE to title case to avoid name clash
|
||||
29-Mar-12 JDB Rewritten to use the MAC/ICD disc controller library
|
||||
ioIOO now notifies controller service of parameter output
|
||||
@@ -1337,7 +1338,7 @@ return;
|
||||
sets the flag to notify the CPU.
|
||||
*/
|
||||
|
||||
void poll_drives (void)
|
||||
static void poll_drives (void)
|
||||
{
|
||||
if (mac_cntlr.state == cntlr_idle && ds.control == SET) /* is the controller idle and interrupts are allowed? */
|
||||
if (dl_poll_drives (&mac_cntlr, ds_unit, DL_MAXDRIVE)) /* poll the drives; was Attention seen? */
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
/* hp2100_fp1.c: HP 1000 multiple-precision floating point routines
|
||||
|
||||
Copyright (c) 2005-2012, J. David Bryan
|
||||
Copyright (c) 2005-2013, J. David Bryan
|
||||
|
||||
Permission is hereby granted, free of charge, to any person obtaining a
|
||||
copy of this software and associated documentation files (the "Software"),
|
||||
@@ -23,6 +23,7 @@
|
||||
in advertising or otherwise to promote the sale, use or other dealings in
|
||||
this Software without prior written authorization from the author.
|
||||
|
||||
18-Mar-13 JDB Changed type of mantissa masks array to to unsigned
|
||||
06-Feb-12 JDB Added missing precision on constant "one" in fp_trun
|
||||
21-Jun-11 JDB Completed the comments for divide; no code changes
|
||||
08-Jun-08 JDB Quieted bogus gcc warning in fp_exec
|
||||
@@ -309,7 +310,7 @@ static const uint32 op_start[6] = { IN_V_SNUM,
|
||||
FP_V_TMANT,
|
||||
FP_V_EMANT };
|
||||
|
||||
static const t_int64 mant_mask[6] = { IN_SSMAGN,
|
||||
static const t_uint64 mant_mask[6] = { IN_SSMAGN,
|
||||
IN_SDMAGN,
|
||||
FP_SFMANT,
|
||||
FP_SXMANT,
|
||||
@@ -439,7 +440,7 @@ FPU unpacked;
|
||||
unpacked.precision = precision; /* set value's precision */
|
||||
|
||||
unpacked.mantissa = /* unpack and mask mantissa */
|
||||
unpack_int (packed, precision) & mant_mask[precision];
|
||||
unpack_int (packed, precision) & (t_int64) mant_mask[precision];
|
||||
|
||||
switch (precision) {
|
||||
|
||||
@@ -596,11 +597,11 @@ sign = (unpacked->mantissa < 0); /* save mantissa sign */
|
||||
if (sign) /* round and mask the number */
|
||||
unpacked->mantissa =
|
||||
(unpacked->mantissa + n_half_lsb[unpacked->precision]) &
|
||||
mant_mask[unpacked->precision];
|
||||
(t_int64) mant_mask[unpacked->precision];
|
||||
else
|
||||
unpacked->mantissa =
|
||||
(unpacked->mantissa + p_half_lsb[unpacked->precision]) &
|
||||
mant_mask[unpacked->precision];
|
||||
(t_int64) mant_mask[unpacked->precision];
|
||||
|
||||
if (sign != (unpacked->mantissa < 0)) /* mantissa overflow? */
|
||||
lsrx (unpacked, 1); /* correct by shifting */
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
/* hp2100_sys.c: HP 2100 simulator interface
|
||||
|
||||
Copyright (c) 1993-2012, Robert M. Supnik
|
||||
Copyright (c) 1993-2013, Robert M. Supnik
|
||||
|
||||
Permission is hereby granted, free of charge, to any person obtaining a
|
||||
copy of this software and associated documentation files (the "Software"),
|
||||
@@ -23,6 +23,7 @@
|
||||
used in advertising or otherwise to promote the sale, use or other dealings
|
||||
in this Software without prior written authorization from Robert M Supnik.
|
||||
|
||||
18-Mar-13 JDB Moved CPU state variable declarations to hp2100_cpu.h
|
||||
09-May-12 JDB Quieted warnings for assignments in conditional expressions
|
||||
10-Feb-12 JDB Deprecated DEVNO in favor of SC
|
||||
Added hp_setsc, hp_showsc functions to support SC modifier
|
||||
@@ -61,9 +62,6 @@
|
||||
#include "hp2100_cpu.h"
|
||||
#include <ctype.h>
|
||||
|
||||
extern DEVICE cpu_dev;
|
||||
extern UNIT cpu_unit;
|
||||
extern REG cpu_reg[];
|
||||
|
||||
extern DEVICE mp_dev;
|
||||
extern DEVICE dma1_dev, dma2_dev;
|
||||
|
||||
Reference in New Issue
Block a user