ppc: change bitsize of EVUIMM_4 insns

Aldy Hernandez aldyh@redhat.com
Thu Nov 7 09:39:00 GMT 2002


Hi guys.

On the SPE, having something like:

   evlwhos 0,40(9)

will error out with:

     Error: operand out of range (40 not between 0 and 31)

The assembler already scales this number by divinding it by 4 in
insert_ev4(), so it shouldn't be complaining that the number is > 31.
The easiest thing to do is to set the bit size to 7 instead.

(And yes, all the EVUIMM_4 instructions suffer from this, not just
evlwhos).

Is this ok?

2002-11-07  Aldy Hernandez  <aldyh@redhat.com>

	* opcodes/ppc-opc.c (EVUIMM_4): Change bit size to 7.

Index: ppc-opc.c
===================================================================
RCS file: /cvs/src/src/opcodes/ppc-opc.c,v
retrieving revision 1.40
diff -c -p -r1.40 ppc-opc.c
*** ppc-opc.c	7 Nov 2002 00:54:09 -0000	1.40
--- ppc-opc.c	7 Nov 2002 17:32:59 -0000
*************** const struct powerpc_operand powerpc_ope
*** 548,554 ****
  
    /* The other UIMM field in a word EVX form instruction. */
  #define EVUIMM_4 EVUIMM_2 + 1
!   { 5, 11, insert_ev4, extract_ev4, PPC_OPERAND_PARENS },
  
    /* The other UIMM field in a double EVX form instruction. */
  #define EVUIMM_8 EVUIMM_4 + 1
--- 548,554 ----
  
    /* The other UIMM field in a word EVX form instruction. */
  #define EVUIMM_4 EVUIMM_2 + 1
!   { 7, 11, insert_ev4, extract_ev4, PPC_OPERAND_PARENS },
  
    /* The other UIMM field in a double EVX form instruction. */
  #define EVUIMM_8 EVUIMM_4 + 1



More information about the Binutils mailing list