Bug 20196 - Opcode regressions for e6500
Summary: Opcode regressions for e6500
Status: RESOLVED FIXED
Alias: None
Product: binutils
Classification: Unclassified
Component: gas (show other bugs)
Version: 2.26
: P2 normal
Target Milestone: ---
Assignee: Not yet assigned to anyone
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2016-06-03 09:41 UTC by Sebastian Huber
Modified: 2016-06-06 08:46 UTC (History)
1 user (show)

See Also:
Host:
Target: powerpc
Build:
Last reconfirmed:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Sebastian Huber 2016-06-03 09:41:26 UTC
The following commit

https://sourceware.org/git/gitweb.cgi?p=binutils-gdb.git;a=commit;h=4fff86c517abb5ba454befe0ec0f284f720dde00

broke the e6500 support.

cat test.s
lbarx   3, 0, 2
stbcx.  0, 0, 2
sync    0, 0x8
sync    0, 0x1

powerpc-rtems4.12-as -v -me6500 -memb -a32 -o test.o test.s
GNU assembler version 2.26.51 (powerpc-rtems4.12) using BFD version (GNU Binutils) 2.26.51.20160530
test.s: Assembler messages:
test.s:1: Error: unrecognized opcode: `lbarx'
test.s:2: Error: unrecognized opcode: `stbcx.'
test.s:3: Error: incompatible L operand value
test.s:4: Error: incompatible L operand value

It worked with Binutils 2.25.
Comment 1 Peter Bergner 2016-06-03 22:47:52 UTC
I have a fix.
Comment 2 Sourceware Commits 2016-06-03 23:38:50 UTC
The master branch has been updated by Peter Bergner <bergner@sourceware.org>:

https://sourceware.org/git/gitweb.cgi?p=binutils-gdb.git;h=026122a670440bc51266f8e013e5c5877c19b54e

commit 026122a670440bc51266f8e013e5c5877c19b54e
Author: Peter Bergner <bergner@vnet.ibm.com>
Date:   Fri Jun 3 18:38:02 2016 -0500

    Re-add support for lbarx, lharx, stbcx. and sthcx. insns back to the E6500 cpu.
    
    opcodes/
    	PR binutils/20196
    	* ppc-opc.c (powerpc_opcodes <lbarx, lharx, stbcx., sthcx.>): Enable
    	opcodes for E6500.
    
    gas/
    	PR binutils/20196
    	* gas/testsuite/gas/ppc/e6500.s <lbarx, lharx, lwarx, ldarx,
    	stbcx., sthcx., stwcx., stdcx.>: Add tests.
    	* gas/testsuite/gas/ppc/e6500.d: Likewise.
    	* gas/testsuite/gas/ppc/power8.s: Likewise.
    	* gas/testsuite/gas/ppc/power8.d: Likewise.
    	* gas/testsuite/gas/ppc/power4.s <lwarx, ldarx, stwcx.,
    	stdcx.>: Add tests.
    	* gas/testsuite/gas/ppc/power4.d: Likewise.
Comment 3 Peter Bergner 2016-06-03 23:49:07 UTC
Fixed.  I'll commit this to the 2.26 branch soon too.
Comment 4 Sourceware Commits 2016-06-04 02:00:55 UTC
The binutils-2_26-branch branch has been updated by Peter Bergner <bergner@sourceware.org>:

https://sourceware.org/git/gitweb.cgi?p=binutils-gdb.git;h=4f952ba68c8672cd921b3f4916c18ee6a1b86adb

commit 4f952ba68c8672cd921b3f4916c18ee6a1b86adb
Author: Peter Bergner <bergner@vnet.ibm.com>
Date:   Fri Jun 3 21:00:04 2016 -0500

    Re-add support for lbarx, lharx, stbcx. and sthcx. insns back to the E6500 cpu.
    
    opcodes/
    	Backport from master
    	2016-06-03  Peter Bergner <bergner@vnet.ibm.com>
    
    	PR binutils/20196
    	* ppc-opc.c (powerpc_opcodes <lbarx, lharx, stbcx., sthcx.>): Enable
    	opcodes for E6500.
    
    gas/
    	Backport from master
    	2016-06-03  Peter Bergner <bergner@vnet.ibm.com>
    
    	PR binutils/20196
    	* gas/testsuite/gas/ppc/e6500.s <lbarx, lharx, lwarx, ldarx,
    	stbcx., sthcx., stwcx., stdcx.>: Add tests.
    	* gas/testsuite/gas/ppc/e6500.d: Likewise.
    	* gas/testsuite/gas/ppc/power8.s: Likewise.
    	* gas/testsuite/gas/ppc/power8.d: Likewise.
    	* gas/testsuite/gas/ppc/power4.s <lwarx, ldarx, stwcx.,
    	stdcx.>: Add tests.
    	* gas/testsuite/gas/ppc/power4.d: Likewise.
Comment 5 Peter Bergner 2016-06-04 02:03:10 UTC
And fixed on the 2.26 release branch too.
Comment 6 Sebastian Huber 2016-06-06 08:46:55 UTC
Thanks a lot for this really quick fix.

In addition, thanks for adding the consistency checks to the sync L, E in

https://sourceware.org/git/gitweb.cgi?p=binutils-gdb.git;h=7b9341139a693eac8d316275004b2d752b1f0cb8

Thus, error 3 and 4 are actually errors on our side thanks to the vague e6500 reference manual. The Power ISA 2.07 document clarified this.