diff options
Diffstat (limited to 'misc/pascal/insn16/prun')
-rw-r--r-- | misc/pascal/insn16/prun/pdbg.c | 26 | ||||
-rw-r--r-- | misc/pascal/insn16/prun/pexec.c | 12 | ||||
-rw-r--r-- | misc/pascal/insn16/prun/pload.c | 2 | ||||
-rw-r--r-- | misc/pascal/insn16/prun/prun.c | 1 |
4 files changed, 20 insertions, 21 deletions
diff --git a/misc/pascal/insn16/prun/pdbg.c b/misc/pascal/insn16/prun/pdbg.c index 9b7c4f5d2..4f9dc35d3 100644 --- a/misc/pascal/insn16/prun/pdbg.c +++ b/misc/pascal/insn16/prun/pdbg.c @@ -91,8 +91,8 @@ enum command_e struct trace_s { - addr_t pc; - addr_t sp; + paddr_t pc; + paddr_t sp; ustack_t tos; }; typedef struct trace_s trace_t; @@ -117,11 +117,11 @@ static void pdbg_execcommand(struct pexec_s *st, enum command_e cmd, uint32_t static int32_t pdbg_readdecimal(char *ptr); static int32_t pdbg_readhex(char *ptr, int32_t defaultvalue); static void pdbg_programstatus(struct pexec_s *st); -static addr_t pdbg_printpcode(struct pexec_s *st, addr_t pc, int16_t nitems); -static addr_t pdbg_printstack(struct pexec_s *st, addr_t sp, int16_t nitems); +static paddr_t pdbg_printpcode(struct pexec_s *st, paddr_t pc, int16_t nitems); +static paddr_t pdbg_printstack(struct pexec_s *st, paddr_t sp, int16_t nitems); static void pdbg_printregisters(struct pexec_s *st); static void pdbg_printtracearray(struct pexec_s *st); -static void pdbg_addbreakpoint(addr_t pc); +static void pdbg_addbreakpoint(paddr_t pc); static void pdbg_deletebreakpoint(int16_t bpno); static void pdbg_printbreakpoints(struct pexec_s *st); static void pdbg_checkbreakpoint(struct pexec_s *st); @@ -144,14 +144,14 @@ static uint16_t g_tracendx; /* This is the index into the circular g_tracearray */ static uint16_t g_ntracepoints; /* This is the number of valid enties in g_tracearray */ -static addr_t g_breakpoint[MAX_BREAK_POINTS]; +static paddr_t g_breakpoint[MAX_BREAK_POINTS]; /* Contains address associated with all active */ /* break points. */ -static addr_t g_untilpoint; +static paddr_t g_untilpoint; /* The 'g_untilpoint' is a temporary breakpoint */ static uint16_t g_nbreakpoints; /* Number of items in breakPoints[] */ -static addr_t g_displayloc; +static paddr_t g_displayloc; /* P-code display location display */ static bool g_bstopexecution; /* true means to stop program execution */ @@ -167,7 +167,7 @@ static char g_inline[LINE_SIZE+1]; void dbg_run(struct pexec_s *st) { - addr_t pc; + paddr_t pc; int i; pdbg_showcommands(); @@ -473,10 +473,10 @@ static void pdbg_programstatus(struct pexec_s *st) /***********************************************************************/ /* Print the disassembled P-Code at PC */ -static addr_t pdbg_printpcode(struct pexec_s *st, addr_t pc, int16_t nitems) +static paddr_t pdbg_printpcode(struct pexec_s *st, paddr_t pc, int16_t nitems) { OPTYPE op; - addr_t opsize; + paddr_t opsize; uint8_t *address; for (; ((pc < st->maxpc) && (nitems > 0)); nitems--) @@ -526,7 +526,7 @@ static addr_t pdbg_printpcode(struct pexec_s *st, addr_t pc, int16_t nitems) /***********************************************************************/ /* Print the stack value at SP */ -static addr_t pdbg_printstack(struct pexec_s *st, addr_t sp, int16_t nitems) +static paddr_t pdbg_printstack(struct pexec_s *st, paddr_t sp, int16_t nitems) { int32_t isp; @@ -591,7 +591,7 @@ static void pdbg_printtracearray(struct pexec_s *st) /***********************************************************************/ /* Add a breakpoint to the breakpoint array */ -static void pdbg_addbreakpoint(addr_t pc) +static void pdbg_addbreakpoint(paddr_t pc) { int i; diff --git a/misc/pascal/insn16/prun/pexec.c b/misc/pascal/insn16/prun/pexec.c index d73a22077..be3c044ec 100644 --- a/misc/pascal/insn16/prun/pexec.c +++ b/misc/pascal/insn16/prun/pexec.c @@ -302,8 +302,8 @@ static uint16_t pexec_libcall(struct pexec_s *st, uint16_t subfunc) { ustack_t uparm1; ustack_t uparm2; - addr_t addr1; - addr_t addr2; + paddr_t addr1; + paddr_t addr2; uint16_t *tmp; uint16_t *ref; uint8_t *src; @@ -1981,7 +1981,7 @@ static inline int pexec24(FAR struct pexec_s *st, uint8_t opcode, uint16_t imm16 return ret; branch_out: - st->pc = (addr_t)imm16; + st->pc = (paddr_t)imm16; return ret; } @@ -2174,7 +2174,7 @@ static int pexec32(FAR struct pexec_s *st, uint8_t opcode, uint8_t imm8, uint16_ uparm1 = st->sp; PUSH(st, st->pc + 4); st->fp = uparm1; - st->pc = (addr_t)imm16; + st->pc = (paddr_t)imm16; return eNOERROR; /* System Functions: @@ -2210,8 +2210,8 @@ static int pexec32(FAR struct pexec_s *st, uint8_t opcode, uint8_t imm8, uint16_ FAR struct pexec_s *pexec_init(struct pexec_attr_s *attr) { struct pexec_s *st; - addr_t stacksize; - addr_t adjusted_rosize; + paddr_t stacksize; + paddr_t adjusted_rosize; /* Allocate the p-machine state stucture */ diff --git a/misc/pascal/insn16/prun/pload.c b/misc/pascal/insn16/prun/pload.c index 8d5576019..0ffd633d4 100644 --- a/misc/pascal/insn16/prun/pload.c +++ b/misc/pascal/insn16/prun/pload.c @@ -76,7 +76,7 @@ * Public Functions ****************************************************************************/ -FAR struct pexec_s *pload(const char *filename, addr_t varsize, addr_t strsize) +FAR struct pexec_s *pload(const char *filename, paddr_t varsize, paddr_t strsize) { struct pexec_attr_s attr; struct pexec_s *st; diff --git a/misc/pascal/insn16/prun/prun.c b/misc/pascal/insn16/prun/prun.c index 5a92ef43c..a9fa92778 100644 --- a/misc/pascal/insn16/prun/prun.c +++ b/misc/pascal/insn16/prun/prun.c @@ -38,7 +38,6 @@ ****************************************************************************/ #include <stdint.h> -#include <stddefs.h> #include <stdio.h> #include <stdlib.h> #include <getopt.h> |