From patchwork Mon Nov 16 07:46:34 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Mike Frysinger X-Patchwork-Id: 9686 X-Patchwork-Delegate: vapier@gentoo.org Received: (qmail 2154 invoked by alias); 16 Nov 2015 07:46:42 -0000 Mailing-List: contact gdb-patches-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Unsubscribe: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-patches-owner@sourceware.org Delivered-To: mailing list gdb-patches@sourceware.org Received: (qmail 2134 invoked by uid 89); 16 Nov 2015 07:46:40 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-1.2 required=5.0 tests=AWL, BAYES_20, RP_MATCHES_RCVD, SPF_PASS autolearn=ham version=3.3.2 X-HELO: smtp.gentoo.org Received: from smtp.gentoo.org (HELO smtp.gentoo.org) (140.211.166.183) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with (AES256-GCM-SHA384 encrypted) ESMTPS; Mon, 16 Nov 2015 07:46:37 +0000 Received: from localhost.localdomain (localhost [127.0.0.1]) by smtp.gentoo.org (Postfix) with ESMTP id A5931340662 for ; Mon, 16 Nov 2015 07:46:35 +0000 (UTC) From: Mike Frysinger To: gdb-patches@sourceware.org Subject: [PATCH/RFC] sim: arm: delete unused code Date: Mon, 16 Nov 2015 02:46:34 -0500 Message-Id: <1447659994-26003-1-git-send-email-vapier@gentoo.org> X-IsSubscribed: yes These vestiges of the 20 year old emulator are just getting in the way. Punt all the dead code we either don't compile or don't use. --- sim/arm/Makefile.in | 2 +- sim/arm/armdefs.h | 24 - sim/arm/armemu.c | 1 - sim/arm/arminit.c | 4 - sim/arm/armopts.h | 22 - sim/arm/armos.c | 64 --- sim/arm/armrdi.c | 1246 ------------------------------------------------- sim/arm/armvirt.c | 8 - sim/arm/bag.c | 165 ------- sim/arm/bag.h | 42 -- sim/arm/communicate.c | 254 ---------- sim/arm/communicate.h | 35 -- sim/arm/dbg_conf.h | 48 -- sim/arm/dbg_cp.h | 69 --- sim/arm/dbg_hif.h | 43 -- sim/arm/dbg_rdi.h | 253 ---------- sim/arm/gdbhost.c | 112 ----- sim/arm/gdbhost.h | 22 - sim/arm/kid.c | 539 --------------------- sim/arm/main.c | 193 -------- sim/arm/parent.c | 480 ------------------- sim/arm/wrapper.c | 8 - 22 files changed, 1 insertion(+), 3633 deletions(-) delete mode 100644 sim/arm/armopts.h delete mode 100644 sim/arm/armrdi.c delete mode 100644 sim/arm/bag.c delete mode 100644 sim/arm/bag.h delete mode 100644 sim/arm/communicate.c delete mode 100644 sim/arm/communicate.h delete mode 100644 sim/arm/dbg_conf.h delete mode 100644 sim/arm/dbg_cp.h delete mode 100644 sim/arm/dbg_hif.h delete mode 100644 sim/arm/gdbhost.c delete mode 100644 sim/arm/gdbhost.h delete mode 100644 sim/arm/kid.c delete mode 100644 sim/arm/main.c delete mode 100644 sim/arm/parent.c diff --git a/sim/arm/Makefile.in b/sim/arm/Makefile.in index 1eeec25..d23da0a 100644 --- a/sim/arm/Makefile.in +++ b/sim/arm/Makefile.in @@ -25,7 +25,7 @@ SIM_OBJS = \ $(SIM_NEW_COMMON_OBJS) \ sim-hload.o \ armemu26.o armemu32.o arminit.o armos.o armsupp.o \ - armvirt.o bag.o thumbemu.o \ + armvirt.o thumbemu.o \ armcopro.o maverick.o iwmmxt.o ## COMMON_POST_CONFIG_FRAG diff --git a/sim/arm/armdefs.h b/sim/arm/armdefs.h index 4595e56..2b5ff9b 100644 --- a/sim/arm/armdefs.h +++ b/sim/arm/armdefs.h @@ -72,7 +72,6 @@ struct ARMul_State { ARMword Emulate; /* to start and stop emulation */ unsigned EndCondition; /* reason for stopping */ - unsigned ErrorCode; /* type of illegal instruction */ ARMword Reg[16]; /* the current register file */ ARMword RegBank[7][16]; /* all the registers */ /* 40 bit accumulator. We always keep this 64 bits wide, @@ -162,16 +161,6 @@ struct ARMul_State ARMword FPSCR; /* Floating Point Status Register. */ }; -#define ResetPin NresetSig -#define FIQPin NfiqSig -#define IRQPin NirqSig -#define AbortPin abortSig -#define TransPin NtransSig -#define BigEndPin bigendSig -#define Prog32Pin prog32Sig -#define Data32Pin data32Sig -#define LateAbortPin lateabtSig - /***************************************************************************\ * Properties of ARM we know about * \***************************************************************************/ @@ -417,25 +406,12 @@ extern int XScale_debug_moe (ARMul_State * state, int moe); \***************************************************************************/ extern unsigned ARMul_OSInit (ARMul_State * state); -extern void ARMul_OSExit (ARMul_State * state); extern unsigned ARMul_OSHandleSWI (ARMul_State * state, ARMword number); -extern ARMword ARMul_OSLastErrorP (ARMul_State * state); - -extern ARMword ARMul_Debug (ARMul_State * state, ARMword pc, ARMword instr); -extern unsigned ARMul_OSException (ARMul_State * state, ARMword vector, - ARMword pc); -extern int rdi_log; /***************************************************************************\ * Host-dependent stuff * \***************************************************************************/ -#ifdef macintosh -pascal void SpinCursor (short increment); /* copied from CursorCtl.h */ -# define HOURGLASS SpinCursor( 1 ) -# define HOURGLASS_RATE 1023 /* 2^n - 1 */ -#endif - extern void ARMul_UndefInstr (ARMul_State *, ARMword); extern void ARMul_FixCPSR (ARMul_State *, ARMword, ARMword); extern void ARMul_FixSPSR (ARMul_State *, ARMword, ARMword); diff --git a/sim/arm/armemu.c b/sim/arm/armemu.c index f2a84eb..171c662 100644 --- a/sim/arm/armemu.c +++ b/sim/arm/armemu.c @@ -1293,7 +1293,6 @@ ARMul_Emulate26 (ARMul_State * state) if (state->CallDebug > 0) { - instr = ARMul_Debug (state, pc, instr); if (state->Emulate < ONCE) { state->NextInstr = RESUME; diff --git a/sim/arm/arminit.c b/sim/arm/arminit.c index dd7808a..851d356 100644 --- a/sim/arm/arminit.c +++ b/sim/arm/arminit.c @@ -198,7 +198,6 @@ ARMul_Reset (ARMul_State * state) FLUSHPIPE; state->EndCondition = 0; - state->ErrorCode = 0; state->Exception = FALSE; state->NresetSig = HIGH; @@ -280,9 +279,6 @@ ARMul_Abort (ARMul_State * state, ARMword vector) state->Aborted = FALSE; - if (ARMul_OSException (state, vector, ARMul_GetPC (state))) - return; - if (state->prog32Sig) if (ARMul_MODE26BIT) temp = R15PC; diff --git a/sim/arm/armopts.h b/sim/arm/armopts.h deleted file mode 100644 index 57dc749..0000000 diff --git a/sim/arm/armos.c b/sim/arm/armos.c index 6adfd94..49f21a2 100644 --- a/sim/arm/armos.c +++ b/sim/arm/armos.c @@ -74,17 +74,12 @@ extern int _fisatty (FILE *); extern host_callback *sim_callback; extern unsigned ARMul_OSInit (ARMul_State *); -extern void ARMul_OSExit (ARMul_State *); extern unsigned ARMul_OSHandleSWI (ARMul_State *, ARMword); extern unsigned ARMul_OSException (ARMul_State *, ARMword, ARMword); -extern ARMword ARMul_OSLastErrorP (ARMul_State *); -extern ARMword ARMul_Debug (ARMul_State *, ARMword, ARMword); -#define BUFFERSIZE 4096 #ifndef FOPEN_MAX #define FOPEN_MAX 64 #endif -#define UNIQUETEMPS 256 #ifndef PATH_MAX #define PATH_MAX 1024 #endif @@ -93,28 +88,9 @@ extern ARMword ARMul_Debug (ARMul_State *, ARMword, ARMword); struct OSblock { - ARMword Time0; - ARMword ErrorP; ARMword ErrorNo; - FILE *FileTable[FOPEN_MAX]; - char FileFlags[FOPEN_MAX]; - char *tempnames[UNIQUETEMPS]; }; -#define NOOP 0 -#define BINARY 1 -#define READOP 2 -#define WRITEOP 4 - -#ifdef macintosh -#define FIXCRLF(t,c) ((t & BINARY) ? \ - c : \ - ((c == '\n' || c == '\r' ) ? (c ^ 7) : c) \ - ) -#else -#define FIXCRLF(t,c) c -#endif - /* Bit mask of enabled SWI implementations. */ unsigned int swi_mask = -1; @@ -159,7 +135,6 @@ ARMul_OSInit (ARMul_State * state) } OSptr = (struct OSblock *) state->OSptr; - OSptr->ErrorP = 0; state->Reg[13] = ADDRSUPERSTACK; /* Set up a stack for the current mode... */ ARMul_SetReg (state, SVC32MODE, 13, ADDRSUPERSTACK);/* ...and for supervisor mode... */ ARMul_SetReg (state, ABORT32MODE, 13, ADDRSUPERSTACK);/* ...and for abort 32 mode... */ @@ -183,12 +158,6 @@ ARMul_OSInit (ARMul_State * state) for (i = 0; i < sizeof (softvectorcode); i += 4) ARMul_WriteWord (state, SOFTVECTORCODE + i, softvectorcode[i / 4]); - for (i = 0; i < FOPEN_MAX; i++) - OSptr->FileTable[i] = NULL; - - for (i = 0; i < UNIQUETEMPS; i++) - OSptr->tempnames[i] = NULL; - ARMul_ConsolePrint (state, ", Demon 1.01"); /* #ifndef ASIM */ @@ -234,20 +203,6 @@ ARMul_OSInit (ARMul_State * state) return TRUE; } -void -ARMul_OSExit (ARMul_State * state) -{ - free ((char *) state->OSptr); -} - - -/* Return the last Operating System Error. */ - -ARMword ARMul_OSLastErrorP (ARMul_State * state) -{ - return ((struct OSblock *) state->OSptr)->ErrorP; -} - static int translate_open_mode[] = { TARGET_O_RDONLY, /* "r" */ @@ -925,22 +880,3 @@ ARMul_OSHandleSWI (ARMul_State * state, ARMword number) return TRUE; } - -#ifndef NOOS -#ifndef ASIM - -/* The emulator calls this routine when an Exception occurs. The second - parameter is the address of the relevant exception vector. Returning - FALSE from this routine causes the trap to be taken, TRUE causes it to - be ignored (so set state->Emulate to FALSE!). */ - -unsigned -ARMul_OSException (ARMul_State * state ATTRIBUTE_UNUSED, - ARMword vector ATTRIBUTE_UNUSED, - ARMword pc ATTRIBUTE_UNUSED) -{ - return FALSE; -} - -#endif -#endif /* NOOS */ diff --git a/sim/arm/armrdi.c b/sim/arm/armrdi.c deleted file mode 100644 index e9ef77d..0000000 diff --git a/sim/arm/armvirt.c b/sim/arm/armvirt.c index c5af8d6..4f95ed8 100644 --- a/sim/arm/armvirt.c +++ b/sim/arm/armvirt.c @@ -22,7 +22,6 @@ freed as they might be needed again. A single area of memory may be defined to generate aborts. */ -#include "armopts.h" #include "armos.h" #include "armdefs.h" #include "ansidecl.h" @@ -217,13 +216,6 @@ ARMword ARMul_LoadInstrS (ARMul_State * state, ARMword address, ARMword isize) { state->NumScycles++; -#ifdef HOURGLASS - if ((state->NumScycles & HOURGLASS_RATE) == 0) - { - HOURGLASS; - } -#endif - return ARMul_ReLoadInstr (state, address, isize); } diff --git a/sim/arm/bag.c b/sim/arm/bag.c deleted file mode 100644 index f1b6a2c..0000000 diff --git a/sim/arm/bag.h b/sim/arm/bag.h deleted file mode 100644 index 6a237c2..0000000 diff --git a/sim/arm/communicate.c b/sim/arm/communicate.c deleted file mode 100644 index 4d97647..0000000 diff --git a/sim/arm/communicate.h b/sim/arm/communicate.h deleted file mode 100644 index e234246..0000000 diff --git a/sim/arm/dbg_conf.h b/sim/arm/dbg_conf.h deleted file mode 100644 index 27c486c..0000000 diff --git a/sim/arm/dbg_cp.h b/sim/arm/dbg_cp.h deleted file mode 100644 index 640d1f2..0000000 diff --git a/sim/arm/dbg_hif.h b/sim/arm/dbg_hif.h deleted file mode 100644 index a4c48c2..0000000 diff --git a/sim/arm/dbg_rdi.h b/sim/arm/dbg_rdi.h index 34e4354..a312c07 100644 --- a/sim/arm/dbg_rdi.h +++ b/sim/arm/dbg_rdi.h @@ -75,259 +75,6 @@ #define RDIError_UnimplementedMessage 254 #define RDIError_UndefinedMessage 255 -/***************************************************************************\ -* RDP Message Numbers * -\***************************************************************************/ - -#define RDP_Start (unsigned char)0x0 -#define RDP_End (unsigned char)0x1 -#define RDP_Read (unsigned char)0x2 -#define RDP_Write (unsigned char)0x3 -#define RDP_CPUread (unsigned char)0x4 -#define RDP_CPUwrite (unsigned char)0x5 -#define RDP_CPread (unsigned char)0x6 -#define RDP_CPwrite (unsigned char)0x7 -#define RDP_SetBreak (unsigned char)0xa -#define RDP_ClearBreak (unsigned char)0xb -#define RDP_SetWatch (unsigned char)0xc -#define RDP_ClearWatch (unsigned char)0xd -#define RDP_Execute (unsigned char)0x10 -#define RDP_Step (unsigned char)0x11 -#define RDP_Info (unsigned char)0x12 -#define RDP_OSOpReply (unsigned char)0x13 - -#define RDP_AddConfig (unsigned char)0x14 -#define RDP_LoadConfigData (unsigned char)0x15 -#define RDP_SelectConfig (unsigned char)0x16 -#define RDP_LoadAgent (unsigned char)0x17 - -#define RDP_Stopped (unsigned char)0x20 -#define RDP_OSOp (unsigned char)0x21 -#define RDP_Fatal (unsigned char)0x5e -#define RDP_Return (unsigned char)0x5f -#define RDP_Reset (unsigned char)0x7f - -/***************************************************************************\ -* Other RDI values * -\***************************************************************************/ - -#define RDISex_Little 0 /* the byte sex of the debuggee */ -#define RDISex_Big 1 -#define RDISex_DontCare 2 - -#define RDIPoint_EQ 0 /* the different types of break/watchpoints */ -#define RDIPoint_GT 1 -#define RDIPoint_GE 2 -#define RDIPoint_LT 3 -#define RDIPoint_LE 4 -#define RDIPoint_IN 5 -#define RDIPoint_OUT 6 -#define RDIPoint_MASK 7 - -#define RDIPoint_Inquiry 64 /* ORRed with point type in extended RDP */ -#define RDIPoint_Handle 128 /* messages */ - -#define RDIWatch_ByteRead 1 /* types of data accesses to watch for */ -#define RDIWatch_HalfRead 2 -#define RDIWatch_WordRead 4 -#define RDIWatch_ByteWrite 8 -#define RDIWatch_HalfWrite 16 -#define RDIWatch_WordWrite 32 - -#define RDIReg_R15 (1L << 15) /* mask values for CPU */ -#define RDIReg_PC (1L << 16) -#define RDIReg_CPSR (1L << 17) -#define RDIReg_SPSR (1L << 18) -#define RDINumCPURegs 19 - -#define RDINumCPRegs 10 /* current maximum */ - -#define RDIMode_Curr 255 - -/* Bits set in return value from RDIInfo_Target */ -#define RDITarget_LogSpeed 0x0f -#define RDITarget_HW 0x10 /* else emulator */ -#define RDITarget_AgentMaxLevel 0xe0 -#define RDITarget_AgentLevelShift 5 -#define RDITarget_DebuggerMinLevel 0x700 -#define RDITarget_DebuggerLevelShift 8 -#define RDITarget_CanReloadAgent 0x800 -#define RDITarget_CanInquireLoadSize 0x1000 - -/* Bits set in return value from RDIInfo_Step */ -#define RDIStep_Multiple 1 -#define RDIStep_PCChange 2 -#define RDIStep_Single 4 - -/* Bits set in return value from RDIInfo_Points */ -#define RDIPointCapability_Comparison 1 -#define RDIPointCapability_Range 2 -/* 4 to 128 are RDIWatch_xx{Read,Write} left-shifted by two */ -#define RDIPointCapability_Mask 256 -#define RDIPointCapability_Status 512 /* Point status enquiries available */ - -/* RDI_Info subcodes */ -#define RDIInfo_Target 0 -#define RDIInfo_Points 1 -#define RDIInfo_Step 2 -#define RDIInfo_MMU 3 -#define RDIInfo_DownLoad 4 /* Inquires whether configuration download - and selection is available. - */ -#define RDIInfo_SemiHosting 5 /* Inquires whether RDISemiHosting_* RDI_Info - calls are available. - */ -#define RDIInfo_CoPro 6 /* Inquires whether CoPro RDI_Info calls are - available. - */ -#define RDIInfo_Icebreaker 7 - -/* The next two are only to be used if the value returned by RDIInfo_Points */ -/* has RDIPointCapability_Status set. */ -#define RDIPointStatus_Watch 0x80 -#define RDIPointStatus_Break 0x81 - -#define RDISignal_Stop 0x100 - -#define RDIVector_Catch 0x180 - -/* The next four are only to be used if RDIInfo_Semihosting returned no error */ -#define RDISemiHosting_SetState 0x181 -#define RDISemiHosting_GetState 0x182 -#define RDISemiHosting_SetVector 0x183 -#define RDISemiHosting_GetVector 0x184 - -/* The next two are only to be used if RDIInfo_Icebreaker returned no error */ -#define RDIIcebreaker_GetLocks 0x185 -#define RDIIcebreaker_SetLocks 0x186 - -/* Only if RDIInfo_Target returned RDITarget_CanInquireLoadSize */ -#define RDIInfo_GetLoadSize 0x187 - -#define RDICycles 0x200 -#define RDICycles_Size 48 -#define RDIErrorP 0x201 - -#define RDISet_Cmdline 0x300 -#define RDISet_RDILevel 0x301 -#define RDISet_Thread 0x302 - -/* The next two are only to be used if RDIInfo_CoPro returned no error */ -#define RDIInfo_DescribeCoPro 0x400 -#define RDIInfo_RequestCoProDesc 0x401 - -#define RDIInfo_Log 0x800 -#define RDIInfo_SetLog 0x801 - -typedef unsigned long PointHandle; -typedef unsigned long ThreadHandle; -#define RDINoPointHandle ((PointHandle)-1L) -#define RDINoHandle ((ThreadHandle)-1L) - -struct Dbg_ConfigBlock; -struct Dbg_HostosInterface; -struct Dbg_MCState; -typedef int rdi_open_proc (unsigned type, - struct Dbg_ConfigBlock const *config, - struct Dbg_HostosInterface const *i, - struct Dbg_MCState *dbg_state); -typedef int rdi_close_proc (void); -typedef int rdi_read_proc (ARMword source, void *dest, unsigned *nbytes); -typedef int rdi_write_proc (const void *source, ARMword dest, - unsigned *nbytes); -typedef int rdi_CPUread_proc (unsigned mode, unsigned long mask, - ARMword * state); -typedef int rdi_CPUwrite_proc (unsigned mode, unsigned long mask, - ARMword const *state); -typedef int rdi_CPread_proc (unsigned CPnum, unsigned long mask, - ARMword * state); -typedef int rdi_CPwrite_proc (unsigned CPnum, unsigned long mask, - ARMword const *state); -typedef int rdi_setbreak_proc (ARMword address, unsigned type, ARMword bound, - PointHandle * handle); -typedef int rdi_clearbreak_proc (PointHandle handle); -typedef int rdi_setwatch_proc (ARMword address, unsigned type, - unsigned datatype, ARMword bound, - PointHandle * handle); -typedef int rdi_clearwatch_proc (PointHandle handle); -typedef int rdi_execute_proc (PointHandle * handle); -typedef int rdi_step_proc (unsigned ninstr, PointHandle * handle); -typedef int rdi_info_proc (unsigned type, ARMword * arg1, ARMword * arg2); -typedef int rdi_pointinq_proc (ARMword * address, unsigned type, - unsigned datatype, ARMword * bound); - -typedef enum -{ - RDI_ConfigCPU, - RDI_ConfigSystem -} -RDI_ConfigAspect; - -typedef enum -{ - RDI_MatchAny, - RDI_MatchExactly, - RDI_MatchNoEarlier -} -RDI_ConfigMatchType; - -typedef int rdi_addconfig_proc (unsigned long nbytes); -typedef int rdi_loadconfigdata_proc (unsigned long nbytes, char const *data); -typedef int rdi_selectconfig_proc (RDI_ConfigAspect aspect, char const *name, - RDI_ConfigMatchType matchtype, - unsigned versionreq, unsigned *versionp); - -typedef char *getbufferproc (void *getbarg, unsigned long *sizep); -typedef int rdi_loadagentproc (ARMword dest, unsigned long size, - getbufferproc * getb, void *getbarg); - -typedef struct -{ - int itemmax; - char const *const *names; -} -RDI_NameList; - -typedef RDI_NameList const *rdi_namelistproc (void); - -typedef int rdi_errmessproc (char *buf, int buflen, int errno); - -struct RDIProcVec -{ - char rditypename[12]; - - rdi_open_proc *open; - rdi_close_proc *close; - rdi_read_proc *read; - rdi_write_proc *write; - rdi_CPUread_proc *CPUread; - rdi_CPUwrite_proc *CPUwrite; - rdi_CPread_proc *CPread; - rdi_CPwrite_proc *CPwrite; - rdi_setbreak_proc *setbreak; - rdi_clearbreak_proc *clearbreak; - rdi_setwatch_proc *setwatch; - rdi_clearwatch_proc *clearwatch; - rdi_execute_proc *execute; - rdi_step_proc *step; - rdi_info_proc *info; - /* V2 RDI */ - rdi_pointinq_proc *pointinquiry; - - /* These three useable only if RDIInfo_DownLoad returns no error */ - rdi_addconfig_proc *addconfig; - rdi_loadconfigdata_proc *loadconfigdata; - rdi_selectconfig_proc *selectconfig; - - rdi_namelistproc *drivernames; - rdi_namelistproc *cpunames; - - rdi_errmessproc *errmess; - - /* Only if RDIInfo_Target returns a value with RDITarget_LoadAgent set */ - rdi_loadagentproc *loadagent; -}; - #endif extern unsigned int swi_mask; diff --git a/sim/arm/gdbhost.c b/sim/arm/gdbhost.c deleted file mode 100644 index aacaacc..0000000 diff --git a/sim/arm/gdbhost.h b/sim/arm/gdbhost.h deleted file mode 100644 index f24fb60..0000000 diff --git a/sim/arm/kid.c b/sim/arm/kid.c deleted file mode 100644 index 340b999..0000000 diff --git a/sim/arm/main.c b/sim/arm/main.c deleted file mode 100644 index 2ce1af1..0000000 diff --git a/sim/arm/parent.c b/sim/arm/parent.c deleted file mode 100644 index ef33d3f..0000000 diff --git a/sim/arm/wrapper.c b/sim/arm/wrapper.c index 79f0b1d..db96cca 100644 --- a/sim/arm/wrapper.c +++ b/sim/arm/wrapper.c @@ -163,14 +163,6 @@ ARMul_ConsolePrint (ARMul_State * state, } } -ARMword -ARMul_Debug (ARMul_State * state ATTRIBUTE_UNUSED, - ARMword pc ATTRIBUTE_UNUSED, - ARMword instr ATTRIBUTE_UNUSED) -{ - return 0; -} - int sim_write (SIM_DESC sd ATTRIBUTE_UNUSED, SIM_ADDR addr,