This is the mail archive of the
mailing list for the GCC project.
[ARM] Fix unaligned accessed generated when using -mthumb -mtpcs-frame
- From: Khem Raj <kraj at mvista dot com>
- To: gcc-patches at gcc dot gnu dot org
- Date: Sat, 21 May 2005 13:00:27 -0700
- Subject: [ARM] Fix unaligned accessed generated when using -mthumb -mtpcs-frame
This patch was hinted by Daniel Jacobowitz offline.
The following patch fixes the unaligned stores generated when using
-mthumb -mtpcs-frame options for compiling.
The register mask of the register to be stored should have been
multiplied by 4 for generating correct offsets. This only
happens when the above mentioned options are used i.e when thumb
backtracking is on.
Tested arm-none-eabi on arm-sim/-mthumb/-mtpcs-frame there were mass
failures without this patch. The test results are far better with the patch.
RCS file: /cvsroot/gcc/gcc/gcc/config/arm/arm.c,v
retrieving revision 1.460
diff -u -r1.460 arm.c
--- arm.c 15 May 2005 18:29:32 -0000 1.460
+++ arm.c 21 May 2005 19:47:09 -0000
@@ -13487,7 +13487,7 @@
thumb_pushpop (f, l_mask, 1, &cfa_offset, l_mask);
- offset = bit_count (l_mask);
+ offset = bit_count (l_mask) * 4;
offset = 0;