diff mbox

FreeBSD armv6 unaligned access

Message ID 579eb27a-25ff-f419-215d-abe431f5399b@fgznet.ch
State New
Headers show

Commit Message

Andreas Tobler June 10, 2016, 6:07 p.m. UTC
Hi all,

FreeBSD 11 will bring unaligned access support for armv6 and up.
This patch enables it.

If no objection I'll commit it to trunk, gcc-6 branch and gcc-5 branch 
in the next days.

Thanks,
Andreas

2016-06-10  Andreas Tobler  <andreast@gcc.gnu.org>

	* config/arm/freebsd.h: Enable unaligned access for armv6 on
	FreeBSD 11.

Comments

Gerald Pfeifer June 10, 2016, 8:26 p.m. UTC | #1
Hi Andreas,

On Fri, 10 Jun 2016, Andreas Tobler wrote:
> FreeBSD 11 will bring unaligned access support for armv6 and up.
> This patch enables it.
> 
> If no objection I'll commit it to trunk, gcc-6 branch and gcc-5 
> branch in the next days.

As FreeBSD maintainer, you don't need to wait, though it is 
considered good practice to first start on trunk and push back
to release branches after a few days (or weeks).  

For a straightforward change like this I don't think that is 
necessary, though.

> 2016-06-10  Andreas Tobler  <andreast@gcc.gnu.org>
> 
> 	* config/arm/freebsd.h: Enable unaligned access for armv6 on
> 	FreeBSD 11.

Two comments on this ChangeLog:  Right now all versions are enabled,
aren't they?  And this is not specific to FreeBSD 11, but 11 and above?

So, how about the following variation?

	* config/arm/freebsd.h: Only enable unaligned access for armv6 
	on FreeBSD 11 and above.

Gerald
Andreas Tobler June 10, 2016, 9:12 p.m. UTC | #2
Hi Gerald,

On 10.06.16 22:26, Gerald Pfeifer wrote:

> On Fri, 10 Jun 2016, Andreas Tobler wrote:
>> FreeBSD 11 will bring unaligned access support for armv6 and up.
>> This patch enables it.
>>
>> If no objection I'll commit it to trunk, gcc-6 branch and gcc-5
>> branch in the next days.
>
> As FreeBSD maintainer, you don't need to wait, though it is
> considered good practice to first start on trunk and push back
> to release branches after a few days (or weeks).
>
> For a straightforward change like this I don't think that is
> necessary, though.

I know. But I prefer to make my FreeBSD only patches available for 
comments to all before I commit. I could have done a commit to all 
branches w/o timed notice, just with the patch and CL.

>> 2016-06-10  Andreas Tobler  <andreast@gcc.gnu.org>
>>
>> 	* config/arm/freebsd.h: Enable unaligned access for armv6 on
>> 	FreeBSD 11.
>
> Two comments on this ChangeLog:  Right now all versions are enabled,
> aren't they?  And this is not specific to FreeBSD 11, but 11 and above?

The first part I do not understand. The second part, sure, 11 and above.

> So, how about the following variation?
>
> 	* config/arm/freebsd.h: Only enable unaligned access for armv6
> 	on FreeBSD 11 and above.

Np with me.

Thanks,
Andreas
Thanks,
Andreas
diff mbox

Patch

Index: config/arm/freebsd.h
===================================================================
--- config/arm/freebsd.h	(revision 237314)
+++ config/arm/freebsd.h	(working copy)
@@ -120,6 +120,9 @@ 
 #define SUBTARGET_CPU_DEFAULT   TARGET_CPU_arm9
 #endif
 
+/* FreeBSD 10 does not support unaligned access for armv6 and up.
+   Unaligned access support was added in FreeBSD 11.  */
+#if FBSD_MAJOR < 11
 #define SUBTARGET_OVERRIDE_INTERNAL_OPTIONS				\
 do {									\
     if (opts_set->x_unaligned_access == 1)				\
@@ -127,6 +130,7 @@ 
     if (opts->x_unaligned_access)					\
 	opts->x_unaligned_access = 0;					\
 } while (0)
+#endif
 
 #undef MAX_SYNC_LIBFUNC_SIZE
 #define MAX_SYNC_LIBFUNC_SIZE 4 /* UNITS_PER_WORD not defined yet.  */