9
0
Fork 0

Fixes for good build after type changes

git-svn-id: https://nuttx.svn.sourceforge.net/svnroot/nuttx/trunk@2387 7fd9a85b-ad96-42d3-883c-3090e2eb8679
This commit is contained in:
patacongo 2009-12-18 17:34:07 +00:00
parent 47f8e8a18f
commit 53e0b559d7
10 changed files with 61 additions and 64 deletions

View File

@ -54,8 +54,8 @@
****************************************************************************/
typedef uint16_t ustack_t; /* Stack values are 16-bits in length */
typedef int16_t sstack_t;
typedef uint16_t addr_t; /* Addresses are 16-bits in length */
typedef int16_t sstack_t;
typedef uint16_t paddr_t; /* Addresses are 16-bits in length */
typedef uint16_t level_t; /* Limits to MAXUINT16 levels */
union stack_u
@ -74,18 +74,18 @@ struct pexec_attr_s
/* Instruction space (I-Space) */
FAR uint8_t *ispace; /* Allocated I-Space containing p-code data */
addr_t entry; /* Entry point */
addr_t maxpc; /* Last valid p-code address */
paddr_t entry; /* Entry point */
paddr_t maxpc; /* Last valid p-code address */
/* Read-only data block */
FAR uint8_t *rodata; /* Address of read-only data block */
addr_t rosize; /* Size of read-only data block */
paddr_t rosize; /* Size of read-only data block */
/* Allocate for variable storage */
addr_t varsize; /* Variable storage size */
addr_t strsize; /* String storage size */
paddr_t varsize; /* Variable storage size */
paddr_t strsize; /* String storage size */
};
/* This structure defines the current state of the p-code interpreter */
@ -102,7 +102,7 @@ struct pexec_s
/* Address of last valid P-Code */
addr_t maxpc;
paddr_t maxpc;
/* These are the emulated P-Machine registers:
*
@ -116,19 +116,19 @@ struct pexec_s
* pc: Holds the current p-code location
*/
addr_t spb; /* Pascal stack base */
addr_t sp; /* Pascal stack pointer */
addr_t csp; /* Character stack pointer */
addr_t fp; /* Base of the current frame */
addr_t rop; /* Read-only data pointer */
addr_t pc; /* Program counter */
paddr_t spb; /* Pascal stack base */
paddr_t sp; /* Pascal stack pointer */
paddr_t csp; /* Character stack pointer */
paddr_t fp; /* Base of the current frame */
paddr_t rop; /* Read-only data pointer */
paddr_t pc; /* Program counter */
/* Info needed to perform a simulated reset */
addr_t strsize; /* String stack size */
addr_t rosize; /* Read-only stack size */
addr_t entry; /* Entry point */
addr_t stacksize; /* (debug only) */
paddr_t strsize; /* String stack size */
paddr_t rosize; /* Read-only stack size */
paddr_t entry; /* Entry point */
paddr_t stacksize; /* (debug only) */
};
/****************************************************************************
@ -142,7 +142,7 @@ extern "C" {
#define EXTERN extern
#endif
EXTERN FAR struct pexec_s *pload(const char *filename, addr_t varsize, addr_t strsize);
EXTERN FAR struct pexec_s *pload(const char *filename, paddr_t varsize, paddr_t strsize);
EXTERN FAR struct pexec_s *pexec_init(struct pexec_attr_s *attr);
EXTERN int pexec(FAR struct pexec_s *st);
EXTERN void pexec_reset(struct pexec_s *st);

View File

@ -49,4 +49,4 @@
int16_t BranchOptimize(void);
#endif /* __PJOPT_H */
#endif /* __PJOPT_H */

View File

@ -50,5 +50,5 @@
extern int16_t LoadOptimize ( void );
extern int16_t StoreOptimize ( void );
#endif __PLOPT_H
#endif /* __PLOPT_H */

View File

@ -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;

View File

@ -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 */

View File

@ -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;

View File

@ -38,7 +38,6 @@
****************************************************************************/
#include <stdint.h>
#include <stddefs.h>
#include <stdio.h>
#include <stdlib.h>
#include <getopt.h>

View File

@ -57,7 +57,7 @@
typedef uint32_t ustack_t; /* Stack values are 16-bits in length */
typedef int32_t sstack_t;
typedef uint32_t addr_t; /* Addresses are 16-bits in length */
typedef uint32_t paddr_t; /* Addresses are 16-bits in length */
typedef uint16_t level_t; /* Limits to MAXUINT16 levels */
union stack_u
@ -76,18 +76,18 @@ struct pexec_attr_s
/* Instruction space (I-Space) */
FAR uint8_t *ispace; /* Allocated I-Space containing p-code data */
addr_t entry; /* Entry point */
addr_t maxpc; /* Last valid p-code address */
paddr_t entry; /* Entry point */
paddr_t maxpc; /* Last valid p-code address */
/* Read-only data block */
FAR uint8_t *rodata; /* Address of read-only data block */
addr_t rosize; /* Size of read-only data block */
paddr_t rosize; /* Size of read-only data block */
/* Allocate for variable storage */
addr_t varsize; /* Variable storage size */
addr_t strsize; /* String storage size */
paddr_t varsize; /* Variable storage size */
paddr_t strsize; /* String storage size */
};
/* This structure defines the current state of the p-code interpreter */
@ -104,7 +104,7 @@ struct pexec_s
/* Address of last valid P-Code */
addr_t maxpc;
paddr_t maxpc;
/* These are the emulated P-Machine registers:
*
@ -119,20 +119,20 @@ struct pexec_s
* pc: Holds the current p-code location
*/
addr_t spb; /* Pascal stack base */
addr_t sp; /* Pascal stack pointer */
addr_t lsp; /* Level stack pointer */
addr_t csp; /* Character stack pointer */
addr_t fp; /* Base of the current frame */
addr_t rop; /* Read-only data pointer */
addr_t pc; /* Program counter */
paddr_t spb; /* Pascal stack base */
paddr_t sp; /* Pascal stack pointer */
paddr_t lsp; /* Level stack pointer */
paddr_t csp; /* Character stack pointer */
paddr_t fp; /* Base of the current frame */
paddr_t rop; /* Read-only data pointer */
paddr_t pc; /* Program counter */
/* Info needed to perform a simulated reset */
addr_t strsize; /* String stack size */
addr_t rosize; /* Read-only stack size */
addr_t entry; /* Entry point */
addr_t stacksize; /* (debug only) */
paddr_t strsize; /* String stack size */
paddr_t rosize; /* Read-only stack size */
paddr_t entry; /* Entry point */
paddr_t stacksize; /* (debug only) */
};
/****************************************************************************
@ -146,7 +146,7 @@ extern "C" {
#define EXTERN extern
#endif
EXTERN FAR struct pexec_s *pload(const char *filename, addr_t varsize, addr_t strsize);
EXTERN FAR struct pexec_s *pload(const char *filename, paddr_t varsize, paddr_t strsize);
EXTERN FAR struct pexec_s *pexec_init(struct pexec_attr_s *attr);
EXTERN int pexec(FAR struct pexec_s *st);
EXTERN void pexec_reset(struct pexec_s *st);

View File

@ -50,8 +50,6 @@
#include "perr.h" /* error() */
#include "pofflib.h" /* POFF library interface */
poffLibLineNumber_t
/**********************************************************************
* Pre-processor Definitions
**********************************************************************/

View File

@ -58,7 +58,7 @@ extern char *stringSP; /* Top of string stack */
***************************************************************************/
extern void getToken (void);
extern char getNextCharacter (boolean skipWhiteSpace);
extern char getNextCharacter (bool skipWhiteSpace);
extern int16_t primeTokenizer (unsigned long stringStackSize);
extern int16_t rePrimeTokenizer (void);