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: [PATCH] ia64: diagnostice for bad use of registers


On Thu, 2005-02-10 at 05:09, Jan Beulich wrote:
> 	* config/tc-ia64.c (parse_operands): New local variables reg1,
> reg2,
> 	reg_class. Check operands and emit diagnostics for illegal use
> of
> 	registers.

OK, but please add some comments describing the checks being performed,
and the assumptions in the code.

For instance, there are at most 2 output operands, except in the
ldfp+update case, in which case there is no need to record the third
update operand as it can't conflict with either of the first two
operands.

If we have two FP output operands, then we must have an ldfp
instruction, so we perform the checks required by that instruction.

Some of the checks destructively modify reg1, making them look like
general registers, so we can not put any additional general register
specific checks after this code.  Or probably simpler, just use regno
here instead of modifying reg1.

It should be possible for someone to understand the patch even if they
don't have your email message submitting the patch.

While checking the manual, I noticed a somewhat special case that
compares that set the same predicate register twice are invalid only if
the qualifying predicate is true, or if they are an unc type compare. 
But since we can't check the qualifying predicate, it is reasonable to
warn always.  I doubt that anyone is deliberately using compares as nop
instructions, and if they are, then the operands don't matter, and they
can change them to valid ones.

> 	(md_assemble): Defer resolution of move to/from application
> registers
> 	dynamic insns when they can be issued on either the I- or
> M-units.

This changelog entry is misplaced.  This change is not part of this
patch.
-- 
Jim Wilson, GNU Tools Support, http://www.SpecifixInc.com



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