📄 pa.md
字号:
(plus:SI (match_operand:SI 2 "register_operand" "") (match_operand:SI 3 "const_int_operand" "")))) (match_operand:HI 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:HI (plus:SI (match_dup 5) (match_dup 3))) (match_dup 4))] "")(define_split [(set (mem:QI (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:QI 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:QI (plus:SI (match_dup 5) (match_dup 3))) (match_dup 4))] "")(define_expand "movhi" [(set (match_operand:HI 0 "general_operand" "") (match_operand:HI 1 "general_operand" ""))] "" "{ if (emit_move_sequence (operands, HImode, 0)) DONE;}")(define_insn "" [(set (match_operand:HI 0 "reg_or_nonsymb_mem_operand" "=r,r,r,r,r,Q,*q,!f") (match_operand:HI 1 "move_operand" "r,J,N,K,RQ,rM,rM,!fM"))] "register_operand (operands[0], HImode) || reg_or_0_operand (operands[1], HImode)" "@ copy %1,%0 ldi %1,%0 ldil L'%1,%0 zdepi %Z1,%0 ldh%M1 %1,%0 sth%M0 %r1,%0 mtsar %r1 fcpy,sgl %f1,%0" [(set_attr "type" "move,move,move,shift,load,store,move,fpalu") (set_attr "pa_combine_type" "addmove") (set_attr "length" "4,4,4,4,4,4,4,4")])(define_insn "" [(set (match_operand:HI 0 "register_operand" "=r") (mem:HI (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 \"ldhx %1(%2),%0\"; else return \"ldhx %2(%1),%0\";}" [(set_attr "type" "load") (set_attr "length" "4")])(define_insn "" [(set (match_operand:HI 0 "register_operand" "=r") (mem:HI (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 \"ldhx %2(%1),%0\"; else return \"ldhx %1(%2),%0\";}" [(set_attr "type" "load") (set_attr "length" "4")]); Now zero extended variants.(define_insn "" [(set (match_operand:SI 0 "register_operand" "=r") (zero_extend:SI (mem:HI (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 \"ldhx %1(%2),%0\"; else return \"ldhx %2(%1),%0\";}" [(set_attr "type" "load") (set_attr "length" "4")])(define_insn "" [(set (match_operand:SI 0 "register_operand" "=r") (zero_extend:SI (mem:HI (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 \"ldhx %2(%1),%0\"; else return \"ldhx %1(%2),%0\";}" [(set_attr "type" "load") (set_attr "length" "4")])(define_insn "" [(set (match_operand:HI 0 "register_operand" "=r") (mem:HI (plus:SI (match_operand:SI 1 "register_operand" "+r") (match_operand:SI 2 "int5_operand" "L")))) (set (match_dup 1) (plus:SI (match_dup 1) (match_dup 2)))] "" "ldhs,mb %2(%1),%0" [(set_attr "type" "load") (set_attr "length" "4")]); And a zero extended variant.(define_insn "" [(set (match_operand:SI 0 "register_operand" "=r") (zero_extend:SI (mem:HI (plus:SI (match_operand:SI 1 "register_operand" "+r") (match_operand:SI 2 "int5_operand" "L"))))) (set (match_dup 1) (plus:SI (match_dup 1) (match_dup 2)))] "" "ldhs,mb %2(%1),%0" [(set_attr "type" "load") (set_attr "length" "4")])(define_insn "" [(set (mem:HI (plus:SI (match_operand:SI 0 "register_operand" "+r") (match_operand:SI 1 "int5_operand" "L"))) (match_operand:HI 2 "reg_or_0_operand" "rM")) (set (match_dup 0) (plus:SI (match_dup 0) (match_dup 1)))] "" "sths,mb %r2,%1(%0)" [(set_attr "type" "store") (set_attr "length" "4")])(define_insn "" [(set (match_operand:HI 0 "register_operand" "=r") (high:HI (match_operand 1 "const_int_operand" "")))] "" "ldil L'%G1,%0" [(set_attr "type" "move") (set_attr "length" "4")])(define_insn "" [(set (match_operand:HI 0 "register_operand" "=r") (lo_sum:HI (match_operand:HI 1 "register_operand" "r") (match_operand 2 "const_int_operand" "")))] "" "ldo R'%G2(%1),%0" [(set_attr "type" "move") (set_attr "length" "4")])(define_expand "movqi" [(set (match_operand:QI 0 "general_operand" "") (match_operand:QI 1 "general_operand" ""))] "" "{ if (emit_move_sequence (operands, QImode, 0)) DONE;}")(define_insn "" [(set (match_operand:QI 0 "reg_or_nonsymb_mem_operand" "=r,r,r,r,r,Q,*q,!f") (match_operand:QI 1 "move_operand" "r,J,N,K,RQ,rM,rM,!fM"))] "register_operand (operands[0], QImode) || reg_or_0_operand (operands[1], QImode)" "@ copy %1,%0 ldi %1,%0 ldil L'%1,%0 zdepi %Z1,%0 ldb%M1 %1,%0 stb%M0 %r1,%0 mtsar %r1 fcpy,sgl %f1,%0" [(set_attr "type" "move,move,move,shift,load,store,move,fpalu") (set_attr "pa_combine_type" "addmove") (set_attr "length" "4,4,4,4,4,4,4,4")])(define_insn "" [(set (match_operand:QI 0 "register_operand" "=r") (mem:QI (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 \"ldbx %1(%2),%0\"; else return \"ldbx %2(%1),%0\";}" [(set_attr "type" "load") (set_attr "length" "4")])(define_insn "" [(set (match_operand:QI 0 "register_operand" "=r") (mem:QI (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 \"ldbx %2(%1),%0\"; else return \"ldbx %1(%2),%0\";}" [(set_attr "type" "load") (set_attr "length" "4")]); Indexed byte load with zero extension to SImode or HImode.(define_insn "" [(set (match_operand:SI 0 "register_operand" "=r") (zero_extend:SI (mem:QI (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 \"ldbx %1(%2),%0\"; else return \"ldbx %2(%1),%0\";}" [(set_attr "type" "load") (set_attr "length" "4")])(define_insn "" [(set (match_operand:SI 0 "register_operand" "=r") (zero_extend:SI (mem:QI (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 \"ldbx %2(%1),%0\"; else return \"ldbx %1(%2),%0\";}" [(set_attr "type" "load") (set_attr "length" "4")])(define_insn "" [(set (match_operand:HI 0 "register_operand" "=r") (zero_extend:HI (mem:QI (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 \"ldbx %1(%2),%0\"; else return \"ldbx %2(%1),%0\";}" [(set_attr "type" "load") (set_attr "length" "4")])(define_insn "" [(set (match_operand:HI 0 "register_operand" "=r") (zero_extend:HI (mem:QI (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 \"ldbx %2(%1),%0\"; else return \"ldbx %1(%2),%0\";}" [(set_attr "type" "load") (set_attr "length" "4")])(define_insn "" [(set (match_operand:QI 0 "register_operand" "=r") (mem:QI (plus:SI (match_operand:SI 1 "register_operand" "+r") (match_operand:SI 2 "int5_operand" "L")))) (set (match_dup 1) (plus:SI (match_dup 1) (match_dup 2)))] "" "ldbs,mb %2(%1),%0" [(set_attr "type" "load") (set_attr "length" "4")]); Now the same thing with zero extensions.(define_insn "" [(set (match_operand:SI 0 "register_operand" "=r") (zero_extend:SI (mem:QI (plus:SI (match_operand:SI 1 "register_operand" "+r") (match_operand:SI 2 "int5_operand" "L"))))) (set (match_dup 1) (plus:SI (match_dup 1) (match_dup 2)))] "" "ldbs,mb %2(%1),%0" [(set_attr "type" "load") (set_attr "length" "4")])(define_insn "" [(set (match_operand:HI 0 "register_operand" "=r") (zero_extend:HI (mem:QI (plus:SI (match_operand:SI 1 "register_operand" "+r") (match_operand:SI 2 "int5_operand" "L"))))) (set (match_dup 1) (plus:SI (match_dup 1) (match_dup 2)))] "" "ldbs,mb %2(%1),%0" [(set_attr "type" "load") (set_attr "length" "4")])(define_insn "" [(set (mem:QI (plus:SI (match_operand:SI 0 "register_operand" "+r") (match_operand:SI 1 "int5_operand" "L"))) (match_operand:QI 2 "reg_or_0_operand" "rM")) (set (match_dup 0) (plus:SI (match_dup 0) (match_dup 1)))] "" "stbs,mb %r2,%1(%0)" [(set_attr "type" "store") (set_attr "length" "4")]);; The definition of this insn does not really explain what it does,;; but it should suffice;; that anything generated as this insn will be recognized as one;; and that it will not successfully combine with anything.(define_expand "movstrsi" [(parallel [(set (match_operand:BLK 0 "" "") (match_operand:BLK 1 "" "")) (clobber (match_dup 7)) (clobber (match_dup 8)) (clobber (match_dup 4)) (clobber (match_dup 5)) (clobber (match_dup 6)) (use (match_operand:SI 2 "arith_operand" "")) (use (match_operand:SI 3 "const_int_operand" ""))])] "" "{ int size, align; /* HP provides very fast block move library routine for the PA; this routine includes: 4x4 byte at a time block moves, 1x4 byte at a time with alignment checked at runtime with attempts to align the source and destination as needed 1x1 byte loop With that in mind, here's the heuristics to try and guess when the inlined block move will be better than the library block move: If the size isn't constant, then always use the library routines. If the size is large in respect to the known alignment, then use the library routines. If the size is small in repsect to the known alignment, then open code the copy (since that will lead to better scheduling). Else use the block move pattern. */ /* Undetermined size, use the library routine. */ if (GET_CODE (operands[2]) != CONST_INT) FAIL; size = INTVAL (operands[2]); align = INTVAL (operands[3]); align = align > 4 ? 4 : align; /* If size/alignm
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -