https://gcc.gnu.org/bugzilla/show_bug.cgi?id=88469
Stefan Ring changed:
What|Removed |Added
Status|NEW |RESOLVED
Resolution|---
Component: target
Assignee: unassigned at gcc dot gnu.org
Reporter: stefanrin at gmail dot com
Target Milestone: ---
The compiler generates unaligned stack accesses for its own code, which causes
it to trap on armv5. The disassembly of the offending function looks like this
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=88469
--- Comment #2 from Stefan Ring ---
Created attachment 45222
--> https://gcc.gnu.org/bugzilla/attachment.cgi?id=45222&action=edit
Preprocessed sample
g++ -c -O2 -x c++ prep
produces the shown code.
$ g++ -v
Using built-in specs.
COLLECT_GCC=
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=88469
--- Comment #12 from Stefan Ring ---
Unfortunately my armv5 device has died in the meantime, so I cannot verify my
original use case. The behavior is indeed different on armv7. It does not trap,
even for the original misaligned code. And contrary
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=88469
--- Comment #14 from Stefan Ring ---
(In reply to Richard Earnshaw from comment #13)
> Note that if you have root access on your board you can modify the kernel's
> behaviour for various unaligned accesses by changing /proc/cpu/alignment
> (see D
: normal
Priority: P3
Component: target
Assignee: unassigned at gcc dot gnu.org
Reporter: stefanrin at gmail dot com
Target Milestone: ---
Target: x86_64
For this source:
int func(int, int, int, int, int, int);
int caller(int a, int b, int c, int d