NetBSD-Bugs archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

Re: toolchain/46865: built-in memcpy() unaligned problem on the strict-align CPU



The following reply was made to PR toolchain/46865; it has been noted by GNATS.

From: Martin Husemann <martin%duskware.de@localhost>
To: gnats-bugs%NetBSD.org@localhost
Cc: 
Subject: Re: toolchain/46865: built-in memcpy() unaligned problem on the 
strict-align CPU
Date: Fri, 31 Aug 2012 00:17:55 +0200

 --bg08WKrSYDhXBjb5
 Content-Type: text/plain; charset=us-ascii
 Content-Disposition: inline
 
 I think the analyzis in the bugzilla ticket is incomplete.
 
 The only change I could come up that fixes it for me on sparc64 is a
 very big hammer effectively disabling most of the builtin_*
 optimizations for STRICT_ALIGNMENT architectures.
 
 All better solutions welcome (assuming we can't switch to gcc 4.7 for
 netbsd-6 [HI RIZ!]).
 
 Martin
 
 --bg08WKrSYDhXBjb5
 Content-Type: text/plain; charset=us-ascii
 Content-Disposition: attachment; filename="builtins.c.patch"
 
 Index: builtins.c
 ===================================================================
 RCS file: /cvsroot/src/external/gpl3/gcc/dist/gcc/builtins.c,v
 retrieving revision 1.1.1.1
 diff -c -u -r1.1.1.1 builtins.c
 --- builtins.c 21 Jun 2011 01:20:19 -0000      1.1.1.1
 +++ builtins.c 30 Aug 2012 22:07:57 -0000
 @@ -347,7 +347,7 @@
  can_trust_pointer_alignment (void)
  {
    /* We rely on TER to compute accurate alignment information.  */
 -  return (optimize && flag_tree_ter);
 +  return (!STRICT_ALIGNMENT && optimize && flag_tree_ter);
  }
  
  /* Return the alignment in bits of EXP, a pointer valued expression.
 
 --bg08WKrSYDhXBjb5--
 


Home | Main Index | Thread Index | Old Index