📄 ia64.md
字号:
(define_expand "movdi" [(set (match_operand:DI 0 "general_operand" "") (match_operand:DI 1 "general_operand" ""))] ""{ rtx op1 = ia64_expand_move (operands[0], operands[1]); if (!op1) DONE; operands[1] = op1;});; This is used during early compilation to delay the decision on;; how to refer to a variable as long as possible. This is especially;; important between initial rtl generation and optimization for;; deferred functions, since we may acquire additional information;; on the variables used in the meantime.(define_insn_and_split "movdi_symbolic" [(set (match_operand:DI 0 "register_operand" "=r") (match_operand:DI 1 "symbolic_operand" "s")) (clobber (match_scratch:DI 2 "=r")) (use (reg:DI 1))] "" "* abort ();" "!no_new_pseudos || reload_completed" [(const_int 0)]{ rtx scratch = operands[2]; if (!reload_completed) scratch = gen_reg_rtx (Pmode); ia64_expand_load_address (operands[0], operands[1], scratch); DONE;});; This is used as a placeholder for the return address during early;; compilation. We won't know where we've placed this until during;; reload, at which point it can wind up in b0, a general register,;; or memory. The only safe destination under these conditions is a;; general register.(define_insn_and_split "*movdi_ret_addr" [(set (match_operand:DI 0 "register_operand" "=r") (unspec:DI [(const_int 0)] UNSPEC_RET_ADDR))] "" "#" "reload_completed" [(const_int 0)]{ ia64_split_return_addr_rtx (operands[0]); DONE;} [(set_attr "itanium_class" "ialu")])(define_insn "*movdi_internal" [(set (match_operand:DI 0 "destination_operand" "=r,r,r,r, m, r,*f,*f,*f, Q, r,*b, r,*e, r,*d, r,*c") (match_operand:DI 1 "move_operand" "rO,J,i,m,rO,*f,rO,*f, Q,*f,*b,rO,*e,rK,*d,rK,*c,rO"))] "ia64_move_ok (operands[0], operands[1])"{ static const char * const alt[] = { "%,mov %0 = %r1", "%,addl %0 = %1, r0", "%,movl %0 = %1", "%,ld8%O1 %0 = %1%P1", "%,st8%Q0 %0 = %r1%P0", "%,getf.sig %0 = %1", "%,setf.sig %0 = %r1", "%,mov %0 = %1", "%,ldf8 %0 = %1%P1", "%,stf8 %0 = %1%P0", "%,mov %0 = %1", "%,mov %0 = %r1", "%,mov %0 = %1", "%,mov %0 = %1", "%,mov %0 = %1", "%,mov %0 = %1", "mov %0 = pr", "mov pr = %1, -1" }; if (which_alternative == 2 && ! TARGET_NO_PIC && symbolic_operand (operands[1], VOIDmode)) abort (); return alt[which_alternative];} [(set_attr "itanium_class" "ialu,ialu,long_i,ld,st,frfr,tofr,fmisc,fld,stf,frbr,tobr,frar_i,toar_i,frar_m,toar_m,frpr,topr")])(define_split [(set (match_operand:DI 0 "register_operand" "") (match_operand:DI 1 "symbolic_operand" ""))] "reload_completed && ! TARGET_NO_PIC" [(const_int 0)]{ ia64_expand_load_address (operands[0], operands[1], NULL_RTX); DONE;})(define_expand "load_fptr" [(set (match_dup 2) (plus:DI (reg:DI 1) (match_operand 1 "function_operand" ""))) (set (match_operand:DI 0 "register_operand" "") (match_dup 3))] ""{ operands[2] = no_new_pseudos ? operands[0] : gen_reg_rtx (DImode); operands[3] = gen_rtx_MEM (DImode, operands[2]); RTX_UNCHANGING_P (operands[3]) = 1;})(define_insn "*load_fptr_internal1" [(set (match_operand:DI 0 "register_operand" "=r") (plus:DI (reg:DI 1) (match_operand 1 "function_operand" "s")))] "" "addl %0 = @ltoff(@fptr(%1)), gp" [(set_attr "itanium_class" "ialu")])(define_insn "load_gprel" [(set (match_operand:DI 0 "register_operand" "=r") (plus:DI (reg:DI 1) (match_operand 1 "sdata_symbolic_operand" "s")))] "" "addl %0 = @gprel(%1), gp" [(set_attr "itanium_class" "ialu")])(define_insn "gprel64_offset" [(set (match_operand:DI 0 "register_operand" "=r") (minus:DI (match_operand:DI 1 "symbolic_operand" "") (reg:DI 1)))] "" "movl %0 = @gprel(%1)" [(set_attr "itanium_class" "long_i")])(define_expand "load_gprel64" [(set (match_dup 2) (minus:DI (match_operand:DI 1 "symbolic_operand" "") (match_dup 3))) (set (match_operand:DI 0 "register_operand" "") (plus:DI (match_dup 3) (match_dup 2)))] ""{ operands[2] = no_new_pseudos ? operands[0] : gen_reg_rtx (DImode); operands[3] = pic_offset_table_rtx;})(define_expand "load_symptr" [(set (match_operand:DI 2 "register_operand" "") (plus:DI (high:DI (match_operand:DI 1 "got_symbolic_operand" "")) (match_dup 3))) (set (match_operand:DI 0 "register_operand" "") (lo_sum:DI (match_dup 2) (match_dup 1)))] ""{ operands[3] = pic_offset_table_rtx;})(define_insn "*load_symptr_high" [(set (match_operand:DI 0 "register_operand" "=r") (plus:DI (high:DI (match_operand 1 "got_symbolic_operand" "s")) (match_operand:DI 2 "register_operand" "a")))] ""{ if (HAVE_AS_LTOFFX_LDXMOV_RELOCS) return "%,addl %0 = @ltoffx(%1), %2"; else return "%,addl %0 = @ltoff(%1), %2";} [(set_attr "itanium_class" "ialu")])(define_insn "*load_symptr_low" [(set (match_operand:DI 0 "register_operand" "=r") (lo_sum:DI (match_operand:DI 1 "register_operand" "r") (match_operand 2 "got_symbolic_operand" "s")))] ""{ if (HAVE_AS_LTOFFX_LDXMOV_RELOCS) return "%,ld8.mov %0 = [%1], %2"; else return "%,ld8 %0 = [%1]";} [(set_attr "itanium_class" "ld")])(define_insn "load_ltoff_dtpmod" [(set (match_operand:DI 0 "register_operand" "=r") (plus:DI (reg:DI 1) (unspec:DI [(match_operand:DI 1 "symbolic_operand" "")] UNSPEC_LTOFF_DTPMOD)))] "" "addl %0 = @ltoff(@dtpmod(%1)), gp" [(set_attr "itanium_class" "ialu")])(define_insn "load_ltoff_dtprel" [(set (match_operand:DI 0 "register_operand" "=r") (plus:DI (reg:DI 1) (unspec:DI [(match_operand:DI 1 "symbolic_operand" "")] UNSPEC_LTOFF_DTPREL)))] "" "addl %0 = @ltoff(@dtprel(%1)), gp" [(set_attr "itanium_class" "ialu")])(define_expand "load_dtprel" [(set (match_operand:DI 0 "register_operand" "") (unspec:DI [(match_operand:DI 1 "symbolic_operand" "")] UNSPEC_DTPREL))] "" "")(define_insn "*load_dtprel64" [(set (match_operand:DI 0 "register_operand" "=r") (unspec:DI [(match_operand:DI 1 "symbolic_operand" "")] UNSPEC_DTPREL))] "TARGET_TLS64" "movl %0 = @dtprel(%1)" [(set_attr "itanium_class" "long_i")])(define_insn "*load_dtprel22" [(set (match_operand:DI 0 "register_operand" "=r") (unspec:DI [(match_operand:DI 1 "symbolic_operand" "")] UNSPEC_DTPREL))] "" "addl %0 = @dtprel(%1), r0" [(set_attr "itanium_class" "ialu")])(define_expand "add_dtprel" [(set (match_operand:DI 0 "register_operand" "") (plus:DI (match_operand:DI 1 "register_operand" "") (unspec:DI [(match_operand:DI 2 "symbolic_operand" "")] UNSPEC_DTPREL)))] "!TARGET_TLS64" "")(define_insn "*add_dtprel14" [(set (match_operand:DI 0 "register_operand" "=r") (plus:DI (match_operand:DI 1 "register_operand" "r") (unspec:DI [(match_operand:DI 2 "symbolic_operand" "")] UNSPEC_DTPREL)))] "TARGET_TLS14" "adds %0 = @dtprel(%2), %1" [(set_attr "itanium_class" "ialu")])(define_insn "*add_dtprel22" [(set (match_operand:DI 0 "register_operand" "=r") (plus:DI (match_operand:DI 1 "register_operand" "a") (unspec:DI [(match_operand:DI 2 "symbolic_operand" "")] UNSPEC_DTPREL)))] "TARGET_TLS22" "addl %0 = @dtprel(%2), %1" [(set_attr "itanium_class" "ialu")])(define_insn "load_ltoff_tprel" [(set (match_operand:DI 0 "register_operand" "=r") (plus:DI (reg:DI 1) (unspec:DI [(match_operand:DI 1 "symbolic_operand" "")] UNSPEC_LTOFF_TPREL)))] "" "addl %0 = @ltoff(@tprel(%1)), gp" [(set_attr "itanium_class" "ialu")])(define_expand "load_tprel" [(set (match_operand:DI 0 "register_operand" "") (unspec:DI [(match_operand:DI 1 "symbolic_operand" "")] UNSPEC_TPREL))] "" "")(define_insn "*load_tprel64" [(set (match_operand:DI 0 "register_operand" "=r") (unspec:DI [(match_operand:DI 1 "symbolic_operand" "")] UNSPEC_TPREL))] "TARGET_TLS64" "movl %0 = @tprel(%1)" [(set_attr "itanium_class" "long_i")])(define_insn "*load_tprel22" [(set (match_operand:DI 0 "register_operand" "=r") (unspec:DI [(match_operand:DI 1 "symbolic_operand" "")] UNSPEC_TPREL))] "" "addl %0 = @tprel(%1), r0" [(set_attr "itanium_class" "ialu")])(define_expand "add_tprel" [(set (match_operand:DI 0 "register_operand" "") (plus:DI (match_operand:DI 1 "register_operand" "") (unspec:DI [(match_operand:DI 2 "symbolic_operand" "")] UNSPEC_TPREL)))] "!TARGET_TLS64" "")(define_insn "*add_tprel14" [(set (match_operand:DI 0 "register_operand" "=r") (plus:DI (match_operand:DI 1 "register_operand" "r") (unspec:DI [(match_operand:DI 2 "symbolic_operand" "")] UNSPEC_TPREL)))] "TARGET_TLS14" "adds %0 = @tprel(%2), %1" [(set_attr "itanium_class" "ialu")])(define_insn "*add_tprel22" [(set (match_operand:DI 0 "register_operand" "=r") (plus:DI (match_operand:DI 1 "register_operand" "a") (unspec:DI [(match_operand:DI 2 "symbolic_operand" "")] UNSPEC_TPREL)))] "TARGET_TLS22" "addl %0 = @tprel(%2), %1" [(set_attr "itanium_class" "ialu")]);; With no offsettable memory references, we've got to have a scratch;; around to play with the second word.(define_expand "movti" [(parallel [(set (match_operand:TI 0 "general_operand" "") (match_operand:TI 1 "general_operand" "")) (clobber (match_scratch:DI 2 ""))])] ""{ rtx op1 = ia64_expand_move (operands[0], operands[1]); if (!op1) DONE; operands[1] = op1;})(define_insn_and_split "*movti_internal" [(set (match_operand:TI 0 "nonimmediate_operand" "=r,r,m") (match_operand:TI 1 "general_operand" "ri,m,r")) (clobber (match_scratch:DI 2 "=X,&r,&r"))] "ia64_move_ok (operands[0], operands[1])" "#" "reload_completed" [(const_int 0)]{ rtx adj1, adj2, in[2], out[2], insn; int first; adj1 = ia64_split_timode (in, operands[1], operands[2]); adj2 = ia64_split_timode (out, operands[0], operands[2]); first = 0; if (reg_overlap_mentioned_p (out[0], in[1])) { if (reg_overlap_mentioned_p (out[1], in[0])) abort (); first = 1; } if (adj1 && adj2) abort (); if (adj1) emit_insn (adj1); if (adj2) emit_insn (adj2); insn = emit_insn (gen_rtx_SET (VOIDmode, out[first], in[first])); if (GET_CODE (out[first]) == MEM && GET_CODE (XEXP (out[first], 0)) == POST_MODIFY) REG_NOTES (insn) = gen_rtx_EXPR_LIST (REG_INC, XEXP (XEXP (out[first], 0), 0), REG_NOTES (insn)); insn = emit_insn (gen_rtx_SET (VOIDmode, out[!first], in[!first])); if (GET_CODE (out[!first]) == MEM && GET_CODE (XEXP (out[!first], 0)) == POST_MODIFY) REG_NOTES (insn) = gen_rtx_EXPR_LIST (REG_INC, XEXP (XEXP (out[!first], 0), 0), REG_NOTES (insn)); DONE;} [(set_attr "itanium_class" "unknown") (set_attr "predicable" "no")]);; ??? SSA creates these. Can't allow memories since we don't have;; the scratch register. Fortunately combine will know how to add;; the clobber and scratch.(define_insn_and_split "*movti_internal_reg" [(set (match_operand:TI 0 "register_operand" "=r") (match_operand:TI 1 "nonmemory_operand" "ri"))] "" "#" "reload_completed" [(const_int 0)]{ rtx in[2], out[2]; int first; ia64_split_timode (in, operands[1], NULL_RTX); ia64_split_timode (out, operands[0], NULL_RTX); first = 0; if (reg_overlap_mentioned_p (out[0], in[1])) { if (reg_overlap_mentioned_p (out[1], in[0])) abort (); first = 1; }
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -