aboutsummaryrefslogtreecommitdiff
path: root/gcc
diff options
context:
space:
mode:
authorJim Wilson <wilson@gcc.gnu.org>1994-04-21 12:56:11 -0700
committerJim Wilson <wilson@gcc.gnu.org>1994-04-21 12:56:11 -0700
commitf5da225ef4db99f6efa1a5f81a820a00a57cc12f (patch)
tree13c3fac533019e8fd567a08e5f82fde82b522428 /gcc
parent9db8b14a27423427cff86b0d399ece20a5e36965 (diff)
downloadgcc-f5da225ef4db99f6efa1a5f81a820a00a57cc12f.zip
gcc-f5da225ef4db99f6efa1a5f81a820a00a57cc12f.tar.gz
gcc-f5da225ef4db99f6efa1a5f81a820a00a57cc12f.tar.bz2
(mem_aligned_8): Don't assume addresses with
MEM_IN_STRUCT_P set are 8 byte aligned. From-SVN: r7128
Diffstat (limited to 'gcc')
-rw-r--r--gcc/config/sparc/sparc.c11
1 files changed, 7 insertions, 4 deletions
diff --git a/gcc/config/sparc/sparc.c b/gcc/config/sparc/sparc.c
index 4b8c162..7b90997 100644
--- a/gcc/config/sparc/sparc.c
+++ b/gcc/config/sparc/sparc.c
@@ -1032,10 +1032,13 @@ mem_aligned_8 (mem)
}
/* Anything else we know is properly aligned unless TARGET_UNALIGNED_DOUBLES
is true, in which case we can only assume that an access is aligned if
- it is to an aggregate, it is to a constant address, or the address
- involves a LO_SUM. */
- else if (! TARGET_UNALIGNED_DOUBLES || MEM_IN_STRUCT_P (mem)
- || CONSTANT_P (addr) || GET_CODE (addr) == LO_SUM)
+ it is to a constant address, or the address involves a LO_SUM.
+
+ We used to assume an address was aligned if MEM_IN_STRUCT_P was true.
+ That assumption was deleted so that gcc generated code can be used with
+ memory allocators that only guarantee 4 byte alignment. */
+ else if (! TARGET_UNALIGNED_DOUBLES || CONSTANT_P (addr)
+ || GET_CODE (addr) == LO_SUM)
return 1;
/* An obviously unaligned address. */