aboutsummaryrefslogtreecommitdiff
path: root/sim/arm/armos.c
diff options
context:
space:
mode:
authorMike Frysinger <vapier@gentoo.org>2015-11-15 19:45:36 -0800
committerMike Frysinger <vapier@gentoo.org>2015-12-25 03:09:01 -0500
commit91d6df784db745df2b0a6827de8306246083bc94 (patch)
tree534b158dbd515d00ba54da07cd4986aed5695c0c /sim/arm/armos.c
parentf0c1b768b4f42c631547643ec01b020108c0ef8e (diff)
downloadgdb-91d6df784db745df2b0a6827de8306246083bc94.zip
gdb-91d6df784db745df2b0a6827de8306246083bc94.tar.gz
gdb-91d6df784db745df2b0a6827de8306246083bc94.tar.bz2
sim: arm: delete unused code
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.
Diffstat (limited to 'sim/arm/armos.c')
-rw-r--r--sim/arm/armos.c82
1 files changed, 0 insertions, 82 deletions
diff --git a/sim/arm/armos.c b/sim/arm/armos.c
index 6adfd94..c49036f 100644
--- a/sim/arm/armos.c
+++ b/sim/arm/armos.c
@@ -38,23 +38,6 @@
#include <unistd.h> /* For SEEK_SET etc. */
#endif
-#ifdef __riscos
-extern int _fisatty (FILE *);
-#define isatty_(f) _fisatty(f)
-#else
-#ifdef __ZTC__
-#include <io.h>
-#define isatty_(f) isatty((f)->_file)
-#else
-#ifdef macintosh
-#include <ioctl.h>
-#define isatty_(f) (~ioctl ((f)->_file, FIOINTERACTIVE, NULL))
-#else
-#define isatty_(f) isatty (fileno (f))
-#endif
-#endif
-#endif
-
#include "armdefs.h"
#include "armos.h"
#include "armemu.h"
@@ -74,17 +57,11 @@ 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 +70,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 +117,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 +140,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 +185,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 +862,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 */