📄 pa.md
字号:
(match_operand:SI 1 "register_operand" "q")) (const_int 0)) (pc) (label_ref (match_operand 2 "" ""))))] "" "*{ return output_bvb (operands, INSN_ANNULLED_BRANCH_P (insn), get_attr_length (insn), 1, insn, 1);}"[(set_attr "type" "cbranch") (set (attr "length") (if_then_else (lt (abs (minus (match_dup 2) (plus (pc) (const_int 8)))) (const_int 8184)) (const_int 4) (const_int 8)))]);; Floating point branches(define_insn "" [(set (pc) (if_then_else (ne (reg:CCFP 0) (const_int 0)) (label_ref (match_operand 0 "" "")) (pc)))] "! TARGET_SOFT_FLOAT" "*{ if (INSN_ANNULLED_BRANCH_P (insn)) return \"ftest\;b,n %0\"; else return \"ftest\;b%* %0\";}" [(set_attr "type" "fbranch") (set_attr "length" "8")])(define_insn "" [(set (pc) (if_then_else (ne (reg:CCFP 0) (const_int 0)) (pc) (label_ref (match_operand 0 "" ""))))] "! TARGET_SOFT_FLOAT" "*{ if (INSN_ANNULLED_BRANCH_P (insn)) return \"ftest\;add,tr %%r0,%%r0,%%r0\;b,n %0\"; else return \"ftest\;add,tr %%r0,%%r0,%%r0\;b%* %0\";}" [(set_attr "type" "fbranch") (set_attr "length" "12")]);; Move instructions(define_expand "movsi" [(set (match_operand:SI 0 "general_operand" "") (match_operand:SI 1 "general_operand" ""))] "" "{ if (emit_move_sequence (operands, SImode, 0)) DONE;}");; Reloading an SImode or DImode value requires a scratch register if;; going in to or out of float point registers.(define_expand "reload_insi" [(set (match_operand:SI 0 "register_operand" "=Z") (match_operand:SI 1 "non_hard_reg_operand" "")) (clobber (match_operand:SI 2 "register_operand" "=&r"))] "" "{ if (emit_move_sequence (operands, SImode, operands[2])) DONE; /* We don't want the clobber emitted, so handle this ourselves. */ emit_insn (gen_rtx_SET (VOIDmode, operands[0], operands[1])); DONE;}")(define_expand "reload_outsi" [(set (match_operand:SI 0 "non_hard_reg_operand" "") (match_operand:SI 1 "register_operand" "Z")) (clobber (match_operand:SI 2 "register_operand" "=&r"))] "" "{ if (emit_move_sequence (operands, SImode, operands[2])) DONE; /* We don't want the clobber emitted, so handle this ourselves. */ emit_insn (gen_rtx_SET (VOIDmode, operands[0], operands[1])); DONE;}");;; pic symbol references(define_insn "" [(set (match_operand:SI 0 "register_operand" "=r") (mem:SI (plus:SI (match_operand:SI 1 "register_operand" "r") (match_operand:SI 2 "symbolic_operand" ""))))] "flag_pic && operands[1] == pic_offset_table_rtx" "ldw T'%2(%1),%0" [(set_attr "type" "load") (set_attr "length" "4")])(define_insn "" [(set (match_operand:SI 0 "reg_or_nonsymb_mem_operand" "=r,r,r,r,r,Q,*q,!f,f,*TR") (match_operand:SI 1 "move_operand" "r,J,N,K,RQ,rM,rM,!fM,*RT,f"))] "(register_operand (operands[0], SImode) || reg_or_0_operand (operands[1], SImode)) && ! TARGET_SOFT_FLOAT" "@ copy %1,%0 ldi %1,%0 ldil L'%1,%0 zdepi %Z1,%0 ldw%M1 %1,%0 stw%M0 %r1,%0 mtsar %r1 fcpy,sgl %f1,%0 fldw%F1 %1,%0 fstw%F0 %1,%0" [(set_attr "type" "move,move,move,shift,load,store,move,fpalu,fpload,fpstore") (set_attr "pa_combine_type" "addmove") (set_attr "length" "4,4,4,4,4,4,4,4,4,4")])(define_insn "" [(set (match_operand:SI 0 "reg_or_nonsymb_mem_operand" "=r,r,r,r,r,Q,*q") (match_operand:SI 1 "move_operand" "r,J,N,K,RQ,rM,rM"))] "(register_operand (operands[0], SImode) || reg_or_0_operand (operands[1], SImode)) && TARGET_SOFT_FLOAT" "@ copy %1,%0 ldi %1,%0 ldil L'%1,%0 zdepi %Z1,%0 ldw%M1 %1,%0 stw%M0 %r1,%0 mtsar %r1" [(set_attr "type" "move,move,move,move,load,store,move") (set_attr "pa_combine_type" "addmove") (set_attr "length" "4,4,4,4,4,4,4")])(define_insn "" [(set (match_operand:SI 0 "register_operand" "=r") (mem:SI (plus:SI (match_operand:SI 1 "basereg_operand" "r") (match_operand:SI 2 "register_operand" "r"))))] "! TARGET_DISABLE_INDEXING" "*{ /* Reload can create backwards (relative to cse) unscaled index address modes when eliminating registers and possibly for pseudos that don't get hard registers. Deal with it. */ if (operands[2] == hard_frame_pointer_rtx || operands[2] == stack_pointer_rtx) return \"ldwx %1(%2),%0\"; else return \"ldwx %2(%1),%0\";}" [(set_attr "type" "load") (set_attr "length" "4")])(define_insn "" [(set (match_operand:SI 0 "register_operand" "=r") (mem:SI (plus:SI (match_operand:SI 1 "register_operand" "r") (match_operand:SI 2 "basereg_operand" "r"))))] "! TARGET_DISABLE_INDEXING" "*{ /* Reload can create backwards (relative to cse) unscaled index address modes when eliminating registers and possibly for pseudos that don't get hard registers. Deal with it. */ if (operands[1] == hard_frame_pointer_rtx || operands[1] == stack_pointer_rtx) return \"ldwx %2(%1),%0\"; else return \"ldwx %1(%2),%0\";}" [(set_attr "type" "load") (set_attr "length" "4")]);; Load or store with base-register modification.(define_insn "pre_ldwm" [(set (match_operand:SI 0 "register_operand" "=r") (mem:SI (plus:SI (match_operand:SI 1 "register_operand" "+r") (match_operand:SI 2 "pre_cint_operand" "")))) (set (match_dup 1) (plus:SI (match_dup 1) (match_dup 2)))] "" "*{ if (INTVAL (operands[2]) < 0) return \"ldwm %2(%1),%0\"; return \"ldws,mb %2(%1),%0\";}" [(set_attr "type" "load") (set_attr "length" "4")])(define_insn "pre_stwm" [(set (mem:SI (plus:SI (match_operand:SI 0 "register_operand" "+r") (match_operand:SI 1 "pre_cint_operand" ""))) (match_operand:SI 2 "reg_or_0_operand" "rM")) (set (match_dup 0) (plus:SI (match_dup 0) (match_dup 1)))] "" "*{ if (INTVAL (operands[1]) < 0) return \"stwm %r2,%1(%0)\"; return \"stws,mb %r2,%1(%0)\";}" [(set_attr "type" "store") (set_attr "length" "4")])(define_insn "post_ldwm" [(set (match_operand:SI 0 "register_operand" "=r") (mem:SI (match_operand:SI 1 "register_operand" "+r"))) (set (match_dup 1) (plus:SI (match_dup 1) (match_operand:SI 2 "post_cint_operand" "")))] "" "*{ if (INTVAL (operands[2]) > 0) return \"ldwm %2(%1),%0\"; return \"ldws,ma %2(%1),%0\";}" [(set_attr "type" "load") (set_attr "length" "4")])(define_insn "post_stwm" [(set (mem:SI (match_operand:SI 0 "register_operand" "+r")) (match_operand:SI 1 "reg_or_0_operand" "rM")) (set (match_dup 0) (plus:SI (match_dup 0) (match_operand:SI 2 "post_cint_operand" "")))] "" "*{ if (INTVAL (operands[2]) > 0) return \"stwm %r1,%2(%0)\"; return \"stws,ma %r1,%2(%0)\";}" [(set_attr "type" "store") (set_attr "length" "4")]);; For pic;; Note since this pattern can be created at reload time (via movsi), all;; the same rules for movsi apply here. (no new pseudos, no temporaries).(define_insn "pic_load_label" [(set (match_operand:SI 0 "register_operand" "=a") (match_operand:SI 1 "pic_label_operand" ""))] "" "*{ rtx label_rtx = gen_label_rtx (); rtx xoperands[3]; extern FILE *asm_out_file; xoperands[0] = operands[0]; xoperands[1] = operands[1]; xoperands[2] = label_rtx; output_asm_insn (\"bl .+8,%0\", xoperands); output_asm_insn (\"depi 0,31,2,%0\", xoperands); ASM_OUTPUT_INTERNAL_LABEL (asm_out_file, \"L\", CODE_LABEL_NUMBER (label_rtx)); /* If we're trying to load the address of a label that happens to be close, then we can use a shorter sequence. */ if (GET_CODE (operands[1]) == LABEL_REF && insn_addresses && abs (insn_addresses[INSN_UID (XEXP (operands[1], 0))] - insn_addresses[INSN_UID (insn)]) < 8100) { /* Prefixing with R% here is wrong, it extracts just 11 bits and is always non-negative. */ output_asm_insn (\"ldo %1-%2(%0),%0\", xoperands); } else { output_asm_insn (\"addil L%%%1-%2,%0\", xoperands); output_asm_insn (\"ldo R%%%1-%2(%0),%0\", xoperands); } return \"\";}" [(set_attr "type" "multi") (set_attr "length" "16")]) ; 12 or 16(define_insn "pic2_highpart" [(set (match_operand:SI 0 "register_operand" "=a") (plus:SI (match_operand:SI 1 "register_operand" "r") (high:SI (match_operand 2 "" ""))))] "symbolic_operand (operands[2], Pmode) && ! function_label_operand (operands[2]) && flag_pic == 2" "addil LT'%G2,%1" [(set_attr "type" "binary") (set_attr "length" "4")]); We need this to make sure CSE doesn't simplify a memory load with a; symbolic address, whose content it think it knows. For PIC, what CSE; think is the real value will be the address of that value.(define_insn "pic2_lo_sum" [(set (match_operand:SI 0 "register_operand" "=r") (mem:SI (lo_sum:SI (match_operand:SI 1 "register_operand" "r") (unspec:SI [(match_operand:SI 2 "symbolic_operand" "")] 0))))] "" "*{ if (flag_pic != 2) abort (); return \"ldw RT'%G2(%1),%0\";}" [(set_attr "type" "load") (set_attr "length" "4")]);; Always use addil rather than ldil;add sequences. This allows the;; HP linker to eliminate the dp relocation if the symbolic operand;; lives in the TEXT space.(define_insn "" [(set (match_operand:SI 0 "register_operand" "=a") (high:SI (match_operand 1 "" "")))] "symbolic_operand (operands[1], Pmode) && ! function_label_operand (operands[1]) && ! read_only_operand (operands[1]) && ! flag_pic" "*{ if (TARGET_LONG_LOAD_STORE) return \"addil NLR'%H1,%%r27\;ldo N'%H1(%%r1),%%r1\"; else return \"addil LR'%H1,%%r27\";}" [(set_attr "type" "binary") (set (attr "length") (if_then_else (eq (symbol_ref "TARGET_LONG_LOAD_STORE") (const_int 0)) (const_int 4) (const_int 8)))]);; This is for use in the prologue/epilogue code. We need it;; to add large constants to a stack pointer or frame pointer.;; Because of the additional %r1 pressure, we probably do not;; want to use this in general code, so make it available;; only after reload.(define_insn "add_high_const" [(set (match_operand:SI 0 "register_operand" "=!a,*r") (plus:SI (match_operand:SI 1 "register_operand" "r,r") (high:SI (match_operand 2 "const_int_operand" ""))))] "reload_completed" "@ addil L'%G2,%1 ldil L'%G2,%0\;addl %0,%1,%0" [(set_attr "type" "binary,binary") (set_attr "length" "4,8")])(define_insn "" [(set (match_operand:SI 0 "register_operand" "=r") (high:SI (match_operand 1 "" "")))] "(!flag_pic || !symbolic_operand (operands[1]), Pmode) && !is_function_label_plus_const (operands[1])" "*{ if (symbolic_operand (operands[1], Pmode)) return \"ldil LR'%H1,%0\"; else return \"ldil L'%G1,%0\";}" [(set_attr "type" "move") (set_attr "length" "4")])(define_insn "" [(set (match_operand:SI 0 "register_operand" "=r") (lo_sum:SI (match_operand:SI 1 "register_operand" "r") (match_operand:SI 2 "immediate_operand" "i")))] "!is_function_label_plus_const (operands[2])" "*{ if (flag_pic && symbolic_operand (operands[2], Pmode)) abort (); else if (symbolic_operand (operands[2], Pmode)) return \"ldo RR'%G2(%1),%0\"; else return \"ldo R'%G2(%1),%0\";}" [(set_attr "type" "move") (set_attr "length" "4")]);; Now that a symbolic_address plus a constant is broken up early;; in the compilation phase (for better CSE) we need a special;; combiner pattern to load the symbolic address plus the constant;; in only 2 instructions. (For cases where the symbolic address;; was not a common subexpression.)(define_split [(set (match_operand:SI 0 "register_operand" "") (match_operand:SI 1 "symbolic_operand" "")) (clobber (match_operand:SI 2 "register_operand" ""))] "! (flag_pic && pic_label_operand (operands[1], SImode))" [(set (match_dup 2) (high:SI (match_dup 1))) (set (match_dup 0) (lo_sum:SI (match_dup 2) (match_dup 1)))] "");; hppa_legitimize_address goes to a great deal of trouble to;; create addresses which use indexing. In some cases, this;; is a lose because there isn't any store instructions which;; allow indexed addresses (with integer register source).;;;; These define_splits try to turn a 3 insn store into;; a 2 insn store with some creative RTL rewriting.(define_split [(set (mem:SI (plus:SI (mult:SI (match_operand:SI 0 "register_operand" "") (match_operand:SI 1 "shadd_operand" "")) (plus:SI (match_operand:SI 2 "register_operand" "") (match_operand:SI 3 "const_int_operand" "")))) (match_operand:SI 4 "register_operand" "")) (clobber (match_operand:SI 5 "register_operand" ""))] "" [(set (match_dup 5) (plus:SI (mult:SI (match_dup 0) (match_dup 1)) (match_dup 2))) (set (mem:SI (plus:SI (match_dup 5) (match_dup 3))) (match_dup 4))] "")(define_split [(set (mem:HI (plus:SI (mult:SI (match_operand:SI 0 "register_operand" "") (match_operand:SI 1 "shadd_operand" ""))
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -