This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC 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: Illegal insn due to system register


"Rakesh Kumar - Software, Noida" wrote:
> Thanks for the reply and the fix. It is working fine with
> BUG.i. But I could not understand why you are returning 9
> from the function sh_register_move_cost. In any case, the insn
> moving MACL to FP register, or otherwise, is illegal,
> and it should be prevented. Let me know if this fix could
> fail in any unfavourable condition.

Well, we return 7 for moves between FPUL and MAC registers,
and FP regs are just one step away from FPUL.

REGISTER_MOVE_COST defines the cost to move data from register
in one class into a register of another class.  This can be
done in a single, direct move, or it can through one or more
intermediate registers.  If the cost is 2, reload will assume
that a single, direct move is possible, and won't bother to
look if the instruction needs fixing up.  Defining any higher
cost will make it inspect the instruction.

> As far as I know, only SH5 has vector moves. Why are we required
> to handle them for SH4 and other targets?

The SH4 can move V2SF vectors, and has instrutions to multiply V4SF
vectors.
	
-- 
--------------------------
SuperH (UK) Ltd.
2410 Aztec West / Almondsbury / BRISTOL / BS32 4QX
T:+44 1454 465658


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