This is the mail archive of the ecos-patches@sources.redhat.com mailing list for the eCos project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Extra infra alignment macros


I've been sitting on this change for quite some time, and although I haven't gotten around to using it where I intended to yet, I may as well flush it from my local tree.

Jifl

2004-04-15 Jonathan Larmour <jifl@eCosCentric.com>

	* include/cyg_type.h: added CYG_ATTRIB_ALIGN_MAX and
	CYGBLD_ATTRIB_ALIGNOFTYPE. Inspired by Robert Larice.


Index: include/cyg_type.h =================================================================== RCS file: /cvs/ecos/ecos/packages/infra/current/include/cyg_type.h,v retrieving revision 1.19 diff -u -5 -p -r1.19 cyg_type.h --- include/cyg_type.h 29 May 2002 18:28:22 -0000 1.19 +++ include/cyg_type.h 15 Apr 2004 01:03:39 -0000 @@ -360,10 +360,19 @@ typedef cyg_haladdrword CYG_ADDRWORD; // Give a type or object explicit minimum alignment # if !defined(CYGBLD_ATTRIB_ALIGN) # define CYGBLD_ATTRIB_ALIGN(__align__) __attribute__((aligned(__align__))) # endif

+# if !defined(CYGBLD_ATTRIB_ALIGN_MAX)
+#  define CYGBLD_ATTRIB_ALIGN_MAX __attribute__((aligned))
+# endif
+
+# if !defined(CYGBLD_ATTRIB_ALIGNOFTYPE)
+#  define CYGBLD_ATTRIB_ALIGNOFTYPE( _type_ ) \
+     __attribute__((aligned(__alignof__( _type_ ))))
+# endif
+
 // Teach compiler how to check format of printf-like functions
 # define CYGBLD_ATTRIB_PRINTF_FORMAT(__format__, __args__) \
         __attribute__((format (printf, __format__, __args__)))

#else // non-GNU
@@ -382,10 +391,14 @@ typedef cyg_haladdrword CYG_ADDRWORD;
# define CYGBLD_ATTRIB_ASM_ALIAS(__symbol__) !!!-- Asm alias not defined --!!!


# define CYGBLD_ATTRIB_CONST

# define CYGBLD_ATTRIB_ALIGN(__align__) !!!-- Alignment alias not defined --!!!
+
+# define CYGBLD_ATTRIB_ALIGN_MAX !!!-- Alignment alias not defined --!!!
+
+# define CYGBLD_ATTRIB_ALIGNOFTYPE !!!-- Alignment alias not defined --!!!


# define CYGBLD_ATTRIB_PRINTF_FORMAT(__format__, __args__)

#endif




-- eCosCentric http://www.eCosCentric.com/ The eCos and RedBoot experts --["No sense being pessimistic, it wouldn't work anyway"]-- Opinions==mine


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]