This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


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

M68K alignment patch....


The asm(.align xx); trick only works in C files not cpp.

The  __attribute__((aligned(xx))) which gcc docs claim you should be using 
fails with a warning
directive with the current compiler, I have fixed this by adding the following:


#define MAX_OFILE_ALIGNMENT 128

in .....gcc\config\m68k\m68k.h

This allows one to specify alignments up to 16 bytes.
(16 byte alignment is needed for the Ethernet stuff in the new 5272)

I have been using this change for about three months and it seems to do 
what it claims and introduce no bugs.

Paul 
diff -N -P -c -r gcc-2.95.3.orig/gcc/config/m68k/m68k.h gcc-2.95.3/gcc/config/m68k/m68k.h*** gcc-2.95.3.orig/gcc/config/m68k/m68k.h	Thu Jan 25 14:03:34 2001--- gcc-2.95.3/gcc/config/m68k/m68k.h	Mon Apr  2 22:35:28 2001****************** 2083,2088 ****--- 2083,2093 ----    #define PRINT_OPERAND_ADDRESS(FILE, ADDR) print_operand_address (FILE, ADDR)  + /* The maximum alignment which the object file format can support. */+ #undef MAX_OFILE_ALIGNMENT+ #define MAX_OFILE_ALIGNMENT 128+ +   /* Define functions defined in aux-output.c and used in templates.  */    extern char *output_move_const_into_data_reg ();

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