Hi Michael,

On 26 November 2013 17:48, David Holsgrove <david.holsgr...@xilinx.com> wrote:
> Hi Michael,
>
> Please find attached same patch based against latest from gcc master.
>
> Can this be applied and backported to gcc-4_8-branch when reviewed.
>
> thanks,
> David
>
> On 15 July 2013 14:49, David Holsgrove <david.holsgr...@xilinx.com> wrote:
>> MicroBlaze insn swaph swaps the contents of register rA as two
>> halfwords placing result in rD;
>>
>> (rD)[0:15]  <- (rA)[16:31]
>> (rD)[16:31] <- (rA)[0:15]
>>
>> gcc bswaphi2 is intended to reverse the order of the bytes in the
>> half integer in rA
>>
>> (rD)[8:15]  <- (rA)[0:7]
>> (rD)[7:0]   <- (rA)[8:15]
>> (rD)[24:31] <- (rA)[16:23]
>> (rD)[16:23] <- (rA)[24:31]
>>
>> Correct the microblaze bswaphi2 insn pattern to be a swapb followed
>> by swaph
>>
>> Changelog entry would be:
>>
>> 2013-07-15  David Holsgrove <david.holsgr...@xilinx.com>
>>
>>  * gcc/config/microblaze/microblaze.md: Fix bswaphi2
>>
>>
>> Can this also be backported to the gcc-4_8-branch?
>>

Updated patch attached which includes a testcase to check that
bswaphi2 is using a swapb followed by swaph for MicroBlaze.

Updated Changelogs are;

gcc/Changelog

    2014-01-22  David Holsgrove <david.holsgr...@xilinx.com>

     * gcc/config/microblaze/microblaze.md: Correct bswaphi2 / bswapsi2 insn

testsuite/ChangeLog

    2014-01-22  David Holsgrove <david.holsgr...@xilinx.com>

     * gcc/testsuite/gcc.target/microblaze/others/bswap16.c: New test.


>> thanks,
>> David

Attachment: 0001-Patch-microblaze-Fix-bswaphi2-implementation.patch
Description: Binary data

Reply via email to