Created attachment 6835 [details] Patch that fixes mpydp decoding with x-path bit set MPYDP instruction opcode doesn't seem to have any restriction on the value of the x bit the opcode and it should be valid for the instruction to be able to use the cross-path (see SPRUFE8B.pdf p.318). Hence instruction of the form mpydp .M2X b1:b0,a1:a0,b1:b0 should also be valid but current implementation forbids the use of cross path for the src2 operand. Proposed patch : - modify gas test-case for mpydp instruction to accept it as a valid instruction - rename mpydp's specific operand type from ORREGD1324 to ORXREGD1324 - and use tic6x_operand_xregpair for ORXREGD1324 operand type so that operand register can use cross-path. - remove the FIX 'x' (x-path) opcode field in FIXed fields list - remove the TIC6X_FLAG_NO_CROSS This has been verified by looking at disassembled working code, didn't cross-checked with Ti SDK though...
Ti's dis6x output for the case (compiled with cl6x -mv6740) : 00000000 .text: 00000000 00000000 NOP 00000004 00001702 MPYDP.M2X B1:B0,A1:A0,B1:B0
Created attachment 6872 [details] Patch that fixes mpydp decoding with x-path bit set Add changelog entries for all modified files
CVSROOT: /cvs/src Module name: src Changes by: nickc@sourceware.org 2013-03-20 16:56:34 Modified files: include/opcode : ChangeLog tic6x-opcode-table.h gas/testsuite : ChangeLog gas/testsuite/gas/tic6x: insns-bad-1.l insns-bad-1.s insns-c674x.d insns-c674x.s Log message: PR gas/15082 * tic6x-opcode-table.h: Rename mpydp's specific operand type macro from ORREGD1324 to ORXREGD1324 and make it cross-path-able through tic6x_operand_xregpair operand coding type. Make mpydp instruction cross-path-able, ie: remove the FIXed 'x' opcode field, usu ORXREGD1324 for the src2 operand and remove the TIC6X_FLAG_NO_CROSS. * gas/tic6x/insns-bad-1.s: Remove test-case for mpydp with cross-path. * gas/tic6x/insns-bad-1.l: Update expected output. * gas/tic6x/insns-c674x.s: Add a test-case for mpydp with cross-path. * gas/tic6x/insns-c674x.d: Update expected output. Patches: http://sourceware.org/cgi-bin/cvsweb.cgi/src/include/opcode/ChangeLog.diff?cvsroot=src&r1=1.488&r2=1.489 http://sourceware.org/cgi-bin/cvsweb.cgi/src/include/opcode/tic6x-opcode-table.h.diff?cvsroot=src&r1=1.4&r2=1.5 http://sourceware.org/cgi-bin/cvsweb.cgi/src/gas/testsuite/ChangeLog.diff?cvsroot=src&r1=1.2205&r2=1.2206 http://sourceware.org/cgi-bin/cvsweb.cgi/src/gas/testsuite/gas/tic6x/insns-bad-1.l.diff?cvsroot=src&r1=1.2&r2=1.3 http://sourceware.org/cgi-bin/cvsweb.cgi/src/gas/testsuite/gas/tic6x/insns-bad-1.s.diff?cvsroot=src&r1=1.2&r2=1.3 http://sourceware.org/cgi-bin/cvsweb.cgi/src/gas/testsuite/gas/tic6x/insns-c674x.d.diff?cvsroot=src&r1=1.4&r2=1.5 http://sourceware.org/cgi-bin/cvsweb.cgi/src/gas/testsuite/gas/tic6x/insns-c674x.s.diff?cvsroot=src&r1=1.4&r2=1.5
Patch applied.