Question on movsi and movdi

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hello All,

I have a question on move si and move di.

I have a target, which is essentially a 32-bit processor, but it has a 64-bit load and store instruction.

Now, there is a
define_insn movsi,
and that's all nice and fancy and working, but I also need a define_insn movdi.
Simplified, it looks as follows:

(define_insn "movdi"
  [(set (match_operand:DI 0 "blueproc_nonimmediate_operand" "=r,r,m")
        (match_operand:DI 1 "input_operand" "r,m,r"))]

- The options 2 (m to r) and 3 (r to m), that is clear.
- The option 1 (r to r), the processor has no instruction for it. It needs to be translated to    2x the movsi instruction. Now, I would prefer to avoid duplicating the code written under the
   'movsi', and call the movsi definition.
   Q. Is this possible ?.
     I mean, I found it can be done with define_split, but then the compiler gets confused, splits the
     instruction, and cannot do the rename any more to avoid the copying.
     (There are cases where it should rename, and cases where it should copy.) So, it should be done
     in the define_insn, but I find no way to do it.

Best Regards,

Henri.




[Index of Archives]     [Linux C Programming]     [Linux Kernel]     [eCos]     [Fedora Development]     [Fedora Announce]     [Autoconf]     [The DWARVES Debugging Tools]     [Yosemite Campsites]     [Yosemite News]     [Linux GCC]

  Powered by Linux