return poly & AO_LISP_CONST;
}
-#define AO_LISP_POOL_BASE (ao_lisp_pool - 4)
-#define AO_LISP_CONST_BASE (ao_lisp_const - 4)
-
#define AO_LISP_IS_CONST(a) (ao_lisp_const <= ((uint8_t *) (a)) && ((uint8_t *) (a)) < ao_lisp_const + AO_LISP_POOL_CONST)
#define AO_LISP_IS_POOL(a) (ao_lisp_pool <= ((uint8_t *) (a)) && ((uint8_t *) (a)) < ao_lisp_pool + AO_LISP_POOL)
return ((uint8_t *) addr) - ao_lisp_pool;
}
-/*
- * Convert back and forth between 'poly's used
- * as short addresses in the pool and addresses.
- * These are used in the chunk code.
- */
-static inline ao_poly pool_poly(void *addr) {
-#if DBG_MEM
- if (!AO_LISP_IS_POOL(addr))
- ao_lisp_abort();
-#endif
- return ((uint8_t *) addr) - AO_LISP_POOL_BASE;
-}
-
-static inline void *pool_ref(ao_poly p) {
- return AO_LISP_POOL_BASE + p;
-}
-
static inline void mark(uint8_t *tag, int offset) {
int byte = offset >> 5;
int bit = (offset >> 2) & 7;
if (poly == AO_LISP_NIL)
return NULL;
if (poly & AO_LISP_CONST)
- return (void *) (AO_LISP_CONST_BASE + (poly & AO_LISP_REF_MASK));
- return (void *) (AO_LISP_POOL_BASE + (poly & AO_LISP_REF_MASK));
+ return (void *) (ao_lisp_const + (poly & AO_LISP_REF_MASK) - 4);
+ return (void *) (ao_lisp_pool + (poly & AO_LISP_REF_MASK) - 4);
}
ao_poly
if (a == NULL)
return AO_LISP_NIL;
if (AO_LISP_IS_CONST(a))
- return AO_LISP_CONST | (a - AO_LISP_CONST_BASE) | type;
- return (a - AO_LISP_POOL_BASE) | type;
+ return AO_LISP_CONST | (a - ao_lisp_const + 4) | type;
+ return (a - ao_lisp_pool + 4) | type;
}
KALMAN=make-kalman
-CFLAGS=-I.. -I. -I../kernel -I../drivers -I../micropeak -I../product -I../lisp -O3 -g -Wall -DAO_LISP_TEST -no-pie
+CFLAGS=-I.. -I. -I../kernel -I../drivers -I../micropeak -I../product -I../lisp -O0 -g -Wall -DAO_LISP_TEST -no-pie
all: $(PROGS) ao_aprs_data.wav