This is the mail archive of the gcc@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: load large immediate


daniel tian wrote:

>     there is a 'movm' problem that puzzled me. In my target machine,
> to load a large immediate data, can only move into zero register "R0".
> but R0 is a generally register. I defined the the way in the
> following:
> 
>     if the immediate data (op1) is larger than 1024
>      then do
>      {
>          emit_move_insn(r0_reg_rtx, gen_rtx_CONST_INT(SImode, op1));
> //Move the immediate data into R0 register
>          emit_move_insn(force_reg (mode, operands[0]), r0_reg_rtx);
>                               //move  r0 to default register.
>      }

  When/where/how are you calling this code?

>      the address label "common_reg " used many times. I think it will
> load one time. But after optimized with '-Os' or '-O2', it still loads
> the label "common_reg " six times..

  I wonder if you're generating it too late for the optimisers to do anything?

    cheers,
      DaveK


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