On Wed, 2023-12-27 at 16:46 +0800, Lulu Cheng wrote:
> +(define_insn "movdi_pcrel64"
> + [(set (match_operand:DI 0 "register_operand" "=&r")
> +       (match_operand:DI 1 "symbolic_pcrel64_operand"))
> +  (unspec:DI [(const_int 0)]
> +    UNSPEC_MOV_PCREL64)
> +  (use (reg:DI T3_REGNUM))
> +  (clobber (reg:DI T3_REGNUM))]

It's better not to hard code $t3 here.  We can write

[(set (match_operand:DI 0 "register_operand" "=r")
      (match_operand:DI 1 "symbolic_pcrel64_operand"))
 (clobber (match_operand:DI 2 "register_operand "=&r"))]

And use

  gen_movdi_pcrel64 (operands[0], operands[1], gen_reg_rtx(DImode))

in expand.

> + "TARGET_64BIT"
> + "la.local %0,$r15,%1"
> + [(set_attr "mode" "DI")
> +  (set_attr "length" "5")])

-- 
Xi Ruoyao <xry...@xry111.site>
School of Aerospace Science and Technology, Xidian University

Reply via email to