This is the mail archive of the binutils@sources.redhat.com mailing list for the binutils project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [Fwd: Re: [PATCH] MIPS32 DSP instructions again]


On Mon, 2005-06-13 at 14:47 -0700, Chao-ying Fu wrote:
> Hello,
> 
> 1. I didn't see any new line after case '5' from my patch.

The tabs in the table.

> 3. For checking the immediate range, my original code is
> as follows.
> 
> case ':': /* dsp 7-bit signed immediate in bit 19 */
>   my_getExpression (&imm_expr, s);
>   check_absolute_expr (ip, &imm_expr);
>   if ((unsigned long) (imm_expr.X_add_number + 64) > 127)
>     {
>       as_warn (_("DSP immediate not in range -64..63 (%ld)"),
>                (long) imm_expr.X_add_number);
>     }
> 
>   But, I changed the magic number 64 to
> ((OP_MASK_DSPSFT_7 + 1) >> 1).
> And, I changed the comparison of 127 to "AND" the inverse
> of the mask.  Do you prefer my original code or may I put
> some comments to explain the code?
> 

Both ways are pretty foul. I suppose as long as the warning message
contains the actual number range I'm ok with it. But why don't you just
check that the number is in the range, as opposed to the bizarre
addition and shifts?

> 4. For case 'c', I change the warning message, because
> our DSP instructions reuse this 'c' format.  The old
> warning message said "Illegal break code" which is not suitable
> for DSP instructions.
> 

Why are you reusing?

> 6. WR_a/RD_a reuse WR_HILO/RD_HILO, because DSP accumulators
> may map to the old HI/LO and we want to maintain correct
> dependences of reading and writing HI/LO.

What do you mean "map to the old HI/LO"?

-eric


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]