[AArch64][PATCH 2/5] Make BIC, other logical instructions, available. (was: Add BIC instruction.)

Matthew Wahab matthew.wahab@foss.arm.com
Mon Sep 21 11:16:00 GMT 2015


On 18/09/15 09:05, James Greenhalgh wrote:
> On Thu, Sep 17, 2015 at 05:40:48PM +0100, Matthew Wahab wrote:
>> Hello,
>>
>> ARMv8.1 adds atomic swap and atomic load-operate instructions with
>> optional memory ordering specifiers. This patch adds an expander to
>> generate a BIC instruction that can be explicitly called when
>> implementing the atomic_<op>_fetch pattern to calculate the value to
>> be returned by the operation.
>>
>
> Why not make the "*<LOGICAL:optab>_one_cmpl_<SHIFT:optab><mode>3" pattern
> named (remove the leading *) and call that in your atomic_<op>_fetch
> patterns as:
>
>    and_one_cmpl_<shift><mode>3
>
> I'd rather that than to add a pettern that simply expands to the same
> thing.

I overlooked that pattern when I was trying to find the bic emitter. I've attached an 
updated patch.

Tested as part of the series for aarch64-none-linux-gnu with native bootstrap and
make check. Also tested for aarch64-none-elf with cross-compiled
check-gcc on an ARMv8.1 emulator with +lse enabled by default.

Ok for trunk?
Matthew

2015-09-21  Matthew Wahab  <matthew.wahab@arm.com>

	* config/aarch64/aarch64.md
	(<LOGICAL:optab>_one_cmpl_<SHIFT:optab><mode>3): Make a named
	pattern.

-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0002-Make-BIC-other-logical-instructions-available-for-us.patch
Type: text/x-patch
Size: 851 bytes
Desc: not available
URL: <http://gcc.gnu.org/pipermail/gcc-patches/attachments/20150921/11739569/attachment.bin>


More information about the Gcc-patches mailing list