patch for 102785-CR-1

Chandra Chavva cchavva@cygnus.com
Fri Feb 11 17:11:00 GMT 2000


Hi Nick,

Here is the patch with all the modification mentioned by use. Please 
verify and let me whether i did all the corrects mentioned by us.


Thanks
Chandra

        * d30v (FLAG_2WORD): Redefined as operation cannot be combined in
        parallel with ADD/SUBppp.

	d30v-opc.c (d30v_opcode_tab) : Added FLAG_2WORD to ST2H, STB, STH
        STHH, STW and ST2H opcodes to prohibit parallel procedure.


Index: d30v.h
===================================================================
RCS file: /cvs/cvsfiles/devo/include/opcode/d30v.h,v
retrieving revision 1.10.32.1
diff -p -r1.10.32.1 d30v.h
*** d30v.h	1999/10/29 02:45:47	1.10.32.1
--- d30v.h	2000/02/12 01:06:55
*************** struct d30v_opcode
*** 147,153 ****
  #define FLAG_JMP	(1L<<13)	/* instruction is a branch */
  #define FLAG_JSR	(1L<<14)	/* subroutine call.  must be aligned */
  #define FLAG_MEM	(1L<<15)	/* reads/writes memory */
! #define FLAG_2WORD	(1L<<16)	/* 2 word/4 byte operation */
  #define FLAG_MUL16	(1L<<17)	/* 16 bit multiply */
  #define FLAG_MUL32	(1L<<18)	/* 32 bit multiply */
  #define FLAG_ADDSUBppp	(1L<<19)	/* ADDppp or SUBppp */
--- 147,155 ----
  #define FLAG_JMP	(1L<<13)	/* instruction is a branch */
  #define FLAG_JSR	(1L<<14)	/* subroutine call.  must be aligned */
  #define FLAG_MEM	(1L<<15)	/* reads/writes memory */
! #define FLAG_2WORD	(1L<<16)	/* Old meaning: a 2 word 4 byter operation
! 					   New meaning: operation cannot be 
! 					   combined in parallel with ADD/SUBppp.
  #define FLAG_MUL16	(1L<<17)	/* 16 bit multiply */
  #define FLAG_MUL32	(1L<<18)	/* 32 bit multiply */
  #define FLAG_ADDSUBppp	(1L<<19)	/* ADDppp or SUBppp */
Index: d30v-opc.c
===================================================================
RCS file: /cvs/cvsfiles/devo/opcodes/d30v-opc.c,v
retrieving revision 1.19.8.1
diff -p -r1.19.8.1 d30v-opc.c
*** d30v-opc.c	1999/10/29 02:46:39	1.19.8.1
--- d30v-opc.c	2000/02/12 01:08:17
*************** const struct d30v_opcode d30v_opcode_tab
*** 311,323 ****
    { "srl2h", LOGIC, 0x13, { SHORT_A }, EITHER, 0, 0, 0 },
    { "srlhh", LOGIC, 0x7, { SHORT_A }, EITHER, 0, 0, 0 },
    { "srlhl", LOGIC, 0x6, { SHORT_A }, EITHER, 0, 0, 0 },
!   { "st2h", IMEM, 0x13, { SHORT_M2, LONG_M2 }, MU, 0, FLAG_MEM, 0 },
    { "st2w", IMEM, 0x16, { SHORT_M2, LONG_M2 }, MU, 0, FLAG_MEM | FLAG_2WORD, 0 },
    { "st4hb", IMEM, 0x15, { SHORT_M2, LONG_M2 }, MU, 0, FLAG_MEM | FLAG_2WORD, 0 },
!   { "stb", IMEM, 0x10, { SHORT_M, LONG_M }, MU, 0, FLAG_MEM, 0 },
!   { "sth", IMEM, 0x12, { SHORT_M, LONG_M }, MU, 0, FLAG_MEM, 0 },
!   { "sthh", IMEM, 0x11, { SHORT_M, LONG_M }, MU, 0, FLAG_MEM, 0 },
!   { "stw", IMEM, 0x14, { SHORT_M, LONG_M }, MU, 0, FLAG_MEM, 0 },
    { "sub", IALU1, 0x2, { SHORT_A, LONG}, EITHER, 0, FLAG_CVVA, 0 },
    { "sub2h", IALU1, 0x3, { SHORT_A, LONG}, EITHER, 0, 0, 0 },
    { "subb", IALU1, 0x5, { SHORT_A, LONG}, EITHER, FLAG_C, FLAG_CVVA, 0 },
--- 311,323 ----
    { "srl2h", LOGIC, 0x13, { SHORT_A }, EITHER, 0, 0, 0 },
    { "srlhh", LOGIC, 0x7, { SHORT_A }, EITHER, 0, 0, 0 },
    { "srlhl", LOGIC, 0x6, { SHORT_A }, EITHER, 0, 0, 0 },
!   { "st2h", IMEM, 0x13, { SHORT_M2, LONG_M2 }, MU, 0, FLAG_MEM | FLAG_2WORD, 0 },
    { "st2w", IMEM, 0x16, { SHORT_M2, LONG_M2 }, MU, 0, FLAG_MEM | FLAG_2WORD, 0 },
    { "st4hb", IMEM, 0x15, { SHORT_M2, LONG_M2 }, MU, 0, FLAG_MEM | FLAG_2WORD, 0 },
!   { "stb", IMEM, 0x10, { SHORT_M, LONG_M }, MU, 0, FLAG_MEM | FLAG_2WORD, 0 },
!   { "sth", IMEM, 0x12, { SHORT_M, LONG_M }, MU, 0, FLAG_MEM | FLAG_2WORD, 0 },
!   { "sthh", IMEM, 0x11, { SHORT_M, LONG_M }, MU, 0, FLAG_MEM | FLAG_2WORD, 0 },
!   { "stw", IMEM, 0x14, { SHORT_M, LONG_M }, MU, 0, FLAG_MEM | FLAG_2WORD, 0 },
    { "sub", IALU1, 0x2, { SHORT_A, LONG}, EITHER, 0, FLAG_CVVA, 0 },
    { "sub2h", IALU1, 0x3, { SHORT_A, LONG}, EITHER, 0, 0, 0 },
    { "subb", IALU1, 0x5, { SHORT_A, LONG}, EITHER, FLAG_C, FLAG_CVVA, 0 },



On Fri, 11 Feb 2000, Nick Clifton wrote:

> Hi Chandra,
> 
> : Here is the patch for it. Please let me know if the patch is fine or
> : not.
> 
> This patch is basically OK, but there are a couple of things that need
> to be fixed:
> 
>   1. You only supplied a ChangeLog entry for the patch tp d30v-opc.c.
>      You also need to supply a ChangeLog entry for the patch to
>      d30v.h.
> 
>   2. The change of the comment in d30v.h is incorrect.
> 
> ! #define FLAG_2WORD	(1L<<16)	/* 1 word/2 byte &2 word/4 byte 
> ! 					   operations. Need to be fixed later */
> 
>      This ought to read:
> 
> ! #define FLAG_2WORD	(1L<<16)	/* Old meaning: a 2 word, 4 byte operation.
> ! 					   New meaning: operation cannot be combined
> !                                           in parallel with ADD/SUBppp.  */
> 
> 
> Also there are a couple of procedural points as well:
> 
> Firstly when you include a ChangeLog entry with a patch, please do not
> do it as a context diff, rather just attach it as plain text.
> ChangeLogs change so frequently that it is rarely possible to just
> apply a patch to them.
> 
> Secondly, since this patch only affects the assembler for the d30v
> there is no need to send the patch to the gcc-patches mailing list.
> That list is only intended for patches that affect gcc in some way.
> 
> Please fix these small problems and then resubmit your patch.
> 
> Cheers
> 	Nick
> 


More information about the Binutils mailing list