From ef7ab3bf2bd90d5971cb0d3371c20e5d8ad671b3 Mon Sep 17 00:00:00 2001 From: patacongo Date: Sun, 15 Feb 2009 19:10:29 +0000 Subject: Added support for M16C small memory model git-svn-id: svn://svn.code.sf.net/p/nuttx/code/trunk@1507 42af7a65-404d-4744-a932-0658087f49c3 --- nuttx/include/nuttx/compiler.h | 17 ++++++++++++++++- 1 file changed, 16 insertions(+), 1 deletion(-) (limited to 'nuttx/include') diff --git a/nuttx/include/nuttx/compiler.h b/nuttx/include/nuttx/compiler.h index db66d037a..f78f5c261 100644 --- a/nuttx/include/nuttx/compiler.h +++ b/nuttx/include/nuttx/compiler.h @@ -1,7 +1,7 @@ /**************************************************************************** * include/nuttx/compiler.h * - * Copyright (C) 2007, 2008 Gregory Nutt. All rights reserved. + * Copyright (C) 2007, 2008, 2009 Gregory Nutt. All rights reserved. * Author: Gregory Nutt * * Redistribution and use in source and binary forms, with or without @@ -99,6 +99,20 @@ # define DSEG # define CODE +#ifdef __m32c__ +/* Select the small, 16-bit addressing model */ + +# define CONFIG_SMALL_MEMORY 1 + +/* Long and int are not the same size */ + +# define CONFIG_LONG_IS_NOT_INT 1 + +/* Pointers and int are the same size */ + +# undef CONFIG_PTR_IS_NOT_INT + +#else /* Select the large, 32-bit addressing model */ # undef CONFIG_SMALL_MEMORY @@ -110,6 +124,7 @@ /* Pointers and int are the same size */ # undef CONFIG_PTR_IS_NOT_INT +#endif /* GCC supports inlined functions */ -- cgit v1.2.3