altos/lisp: Tell compiler that the two lisp memory pools are aligned
authorKeith Packard <keithp@keithp.com>
Tue, 10 Jan 2017 22:45:59 +0000 (14:45 -0800)
committerKeith Packard <keithp@keithp.com>
Mon, 20 Feb 2017 19:16:52 +0000 (11:16 -0800)
Otherwise, it will generate unaligned accesses to things fetched from
them. Sigh.

Signed-off-by: Keith Packard <keithp@keithp.com>
src/lisp/ao_lisp.h

index fa3632b157afaeb8c38c8c7a9c7810efe5395434..8f5c3d8e47aeb72969e8ddcda9685652ffb62abd 100644 (file)
@@ -50,7 +50,7 @@ ao_lisp_os_restore(void);
 
 #ifdef AO_LISP_MAKE_CONST
 #define AO_LISP_POOL_CONST     16384
-extern uint8_t ao_lisp_const[AO_LISP_POOL_CONST];
+extern uint8_t ao_lisp_const[AO_LISP_POOL_CONST] __attribute__((aligned(4)));
 #define ao_lisp_pool ao_lisp_const
 #define AO_LISP_POOL AO_LISP_POOL_CONST
 
@@ -84,7 +84,7 @@ extern uint8_t ao_lisp_const[AO_LISP_POOL_CONST];
 #ifndef AO_LISP_POOL
 #define AO_LISP_POOL   3072
 #endif
-extern uint8_t         ao_lisp_pool[AO_LISP_POOL + AO_LISP_POOL_EXTRA];
+extern uint8_t         ao_lisp_pool[AO_LISP_POOL + AO_LISP_POOL_EXTRA] __attribute__((aligned(4)));
 #endif
 
 /* Primitive types */