From: Richard Earnshaw <rearnsha@arm.com>
To: Julian Brown <julian@codesourcery.com>
Cc: "gcc-patches@gcc.gnu.org" <gcc-patches@gcc.gnu.org>,
Ulrich Weigand <uweigand@de.ibm.com>,
"paul@codesourcery.com" <paul@codesourcery.com>,
Ramana Radhakrishnan <ramana.radhakrishnan@linaro.org>
Subject: Re: [PATCH, ARM] Unaligned accesses for packed structures [1/2]
Date: Thu, 08 Sep 2011 17:35:00 -0000 [thread overview]
Message-ID: <4E68E606.3080400@arm.com> (raw)
In-Reply-To: <20110826173920.51b3d3ac@rex.config>
On 26/08/11 17:39, Julian Brown wrote:
> On Thu, 25 Aug 2011 18:31:21 +0100
> Julian Brown <julian@codesourcery.com> wrote:
>
>> On Thu, 25 Aug 2011 16:46:50 +0100
>> Julian Brown <julian@codesourcery.com> wrote:
>>
>>> So, OK to apply this version, assuming testing comes out OK? (And
>>> the followup patch [2/2], which remains unchanged?)
>>
>> FWIW, all tests pass, apart from
>> gcc.target/arm/volatile-bitfields-3.c, which regresses. The output
>> contains:
>>
>> ldrh r0, [r3, #2] @ unaligned
>>
>> I believe that, to conform to the ARM EABI, that GCC must use an
>> (aligned) ldr in this case. Is that correct? If so, it looks like the
>> middle-end bitfield code does not take the setting of
>> -fstrict-volatile-bitfields into account.
>
> This version fixes the last issue, by adding additional checks for
> volatile accesses/-fstrict-volatile-bitfields. Tests now show no
> regressions.
>
> OK to apply?
>
+ /* On big-endian machines, we count bits from the most significant.
+ If the bit field insn does not, we must invert. */
It sounds to me like this comment is somewhat out of date now that we
have BITS_BIG_ENDIAN; it would be better re-worded to reflect the code
as it stands now.
Other than that, OK.
R.
> Thanks,
>
> Julian
>
> ChangeLog
>
> gcc/
> * config/arm/arm.c (arm_override_options): Add unaligned_access
> support.
> (arm_file_start): Emit attribute for unaligned access as
> appropriate.
> * config/arm/arm.md (UNSPEC_UNALIGNED_LOAD)
> (UNSPEC_UNALIGNED_STORE): Add constants for unspecs.
> (insv, extzv): Add unaligned-access support.
> (extv): Change to expander. Likewise.
> (extzv_t1, extv_regsi): Add helpers.
> (unaligned_loadsi, unaligned_loadhis, unaligned_loadhiu)
> (unaligned_storesi, unaligned_storehi): New.
> (*extv_reg): New (previous extv implementation).
> * config/arm/arm.opt (munaligned_access): Add option.
> * config/arm/constraints.md (Uw): New constraint.
> * expmed.c (store_bit_field_1): Adjust bitfield numbering according
> to size of access, not size of unit, when BITS_BIG_ENDIAN !=
> BYTES_BIG_ENDIAN. Don't use bitfield accesses for
> volatile accesses when -fstrict-volatile-bitfields is in effect.
> (extract_bit_field_1): Likewise.
>
next prev parent reply other threads:[~2011-09-08 15:58 UTC|newest]
Thread overview: 14+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-05-06 12:45 Julian Brown
2011-05-06 13:07 ` Richard Earnshaw
2011-05-09 17:50 ` Julian Brown
2011-05-10 14:03 ` Julian Brown
2011-05-26 17:06 ` Julian Brown
2011-07-04 11:44 ` Ulrich Weigand
2011-08-25 16:29 ` Julian Brown
2011-08-25 18:19 ` Julian Brown
2011-08-25 22:18 ` Ramana Radhakrishnan
2011-08-25 22:23 ` Joseph S. Myers
2011-08-26 17:37 ` Julian Brown
2011-09-08 17:35 ` Richard Earnshaw [this message]
2011-09-01 14:46 ` Ulrich Weigand
2011-09-22 6:47 ` Ye Joey
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=4E68E606.3080400@arm.com \
--to=rearnsha@arm.com \
--cc=gcc-patches@gcc.gnu.org \
--cc=julian@codesourcery.com \
--cc=paul@codesourcery.com \
--cc=ramana.radhakrishnan@linaro.org \
--cc=uweigand@de.ibm.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).