[RTEMS Project] #3767: Should all PPC BSPs build with -mstrict-align?

RTEMS trac trac at rtems.org
Thu Jul 18 19:00:23 UTC 2019

#3767: Should all PPC BSPs build with -mstrict-align?
 Reporter:  Michael Davidsaver  |       Owner:  (none)
     Type:  defect              |      Status:  new
 Priority:  normal              |   Milestone:  5.1
Component:  arch/powerpc        |     Version:  5
 Severity:  normal              |  Resolution:
 Keywords:                      |  Blocked By:
 Blocking:                      |

Comment (by Michael Davidsaver):

 I forgot to link to our analysis https://github.com/epics-base/epics-

 The effect can be seen by compiling:

 #include <string.h>
 void test_double(char *dest, double src)
    memcpy(dest, &src, sizeof(src));

 void test_int64(char *dest, long long src)
    memcpy(dest, &src, sizeof(src));


 powerpc-rtems4.10-gcc -mcpu=7400 -g -O3 -o copyme.o -c copyme.c  &&
 powerpc-rtems4.10-objdump -dS copyme.o

 Then add -mstrict-align and see the difference.

 I should also note that -mcpu=8540 (mvme3100) doesn't seem to need
 -mstrict-align.  Not sure if this is implied for this target.

Ticket URL: <http://devel.rtems.org/ticket/3767#comment:3>
RTEMS Project <http://www.rtems.org/>
RTEMS Project

More information about the bugs mailing list