📄 fx80.md
字号:
{ CC_STATUS_INIT; return \"bfclr [%c2,%c1]%0\";}")(define_insn "" [(set (zero_extract:SI (match_operand:SI 0 "register_operand" "+d") (match_operand:SI 1 "general_operand" "di") (match_operand:SI 2 "general_operand" "di")) (const_int -1))] "TARGET_68020 && TARGET_BITFIELD" "*{ CC_STATUS_INIT; return \"bfset [%c2,%c1]%0\";}")(define_insn "" [(set (zero_extract:SI (match_operand:SI 0 "register_operand" "+d") (match_operand:SI 1 "general_operand" "di") (match_operand:SI 2 "general_operand" "di")) (match_operand:SI 3 "general_operand" "d"))] "TARGET_68020 && TARGET_BITFIELD" "*{ return \"bfins %3,[%c2,%c1]%0\";}");; Special patterns for optimizing bit-field instructions.(define_insn "" [(set (cc0) (zero_extract:SI (match_operand:QI 0 "memory_operand" "o") (match_operand:SI 1 "const_int_operand" "i") (match_operand:SI 2 "general_operand" "di")))] "TARGET_68020 && TARGET_BITFIELD" "*{ if (operands[1] == const1_rtx && GET_CODE (operands[2]) == CONST_INT) { int width = GET_CODE (operands[0]) == REG ? 31 : 7; return output_btst (operands, GEN_INT (width - INTVAL (operands[2])), operands[0], insn, 1000); /* Pass 1000 as SIGNPOS argument so that btst will not think we are testing the sign bit for an `and' and assume that nonzero implies a negative result. */ } if (INTVAL (operands[1]) != 32) cc_status.flags = CC_NOT_NEGATIVE; return \"bftst [%c2,%c1]%0\";}");;; now handle the register cases(define_insn "" [(set (cc0) (zero_extract:SI (match_operand:SI 0 "register_operand" "d") (match_operand:SI 1 "const_int_operand" "i") (match_operand:SI 2 "general_operand" "di")))] "TARGET_68020 && TARGET_BITFIELD" "*{ if (operands[1] == const1_rtx && GET_CODE (operands[2]) == CONST_INT) { int width = GET_CODE (operands[0]) == REG ? 31 : 7; return output_btst (operands, GEN_INT (width - INTVAL (operands[2])), operands[0], insn, 1000); /* Pass 1000 as SIGNPOS argument so that btst will not think we are testing the sign bit for an `and' and assume that nonzero implies a negative result. */ } if (INTVAL (operands[1]) != 32) cc_status.flags = CC_NOT_NEGATIVE; return \"bftst [%c2,%c1]%0\";}")(define_insn "seq" [(set (match_operand:QI 0 "general_operand" "=d") (eq:QI (cc0) (const_int 0)))] "" "* cc_status = cc_prev_status; OUTPUT_JUMP (\"seq %0\", \"fseq %0\", \"seq %0\");")(define_insn "sne" [(set (match_operand:QI 0 "general_operand" "=d") (ne:QI (cc0) (const_int 0)))] "" "* cc_status = cc_prev_status; OUTPUT_JUMP (\"sne %0\", \"fsneq %0\", \"sne %0\");")(define_insn "sgt" [(set (match_operand:QI 0 "general_operand" "=d") (gt:QI (cc0) (const_int 0)))] "" "* cc_status = cc_prev_status; OUTPUT_JUMP (\"sgt %0\", \"fsgt %0\", \"and%.b %#0xc,%!\;sgt %0\");")(define_insn "sgtu" [(set (match_operand:QI 0 "general_operand" "=d") (gtu:QI (cc0) (const_int 0)))] "" "* cc_status = cc_prev_status; return \"shi %0\"; ")(define_insn "slt" [(set (match_operand:QI 0 "general_operand" "=d") (lt:QI (cc0) (const_int 0)))] "" "* cc_status = cc_prev_status; OUTPUT_JUMP (\"slt %0\", \"fslt %0\", \"smi %0\"); ")(define_insn "sltu" [(set (match_operand:QI 0 "general_operand" "=d") (ltu:QI (cc0) (const_int 0)))] "" "* cc_status = cc_prev_status; return \"scs %0\"; ")(define_insn "sge" [(set (match_operand:QI 0 "general_operand" "=d") (ge:QI (cc0) (const_int 0)))] "" "* cc_status = cc_prev_status; OUTPUT_JUMP (\"sge %0\", \"fsge %0\", \"spl %0\"); ")(define_insn "sgeu" [(set (match_operand:QI 0 "general_operand" "=d") (geu:QI (cc0) (const_int 0)))] "" "* cc_status = cc_prev_status; return \"scc %0\"; ")(define_insn "sle" [(set (match_operand:QI 0 "general_operand" "=d") (le:QI (cc0) (const_int 0)))] "" "* cc_status = cc_prev_status; OUTPUT_JUMP (\"sle %0\", \"fsle %0\", \"and%.b %#0xc,%!\;sle %0\");")(define_insn "sleu" [(set (match_operand:QI 0 "general_operand" "=d") (leu:QI (cc0) (const_int 0)))] "" "* cc_status = cc_prev_status; return \"sls %0\"; ");; Basic conditional jump instructions.(define_insn "beq" [(set (pc) (if_then_else (eq (cc0) (const_int 0)) (label_ref (match_operand 0 "" "")) (pc)))] "" "*{ OUTPUT_JUMP (\"jeq %l0\", \"fbeq %l0\", \"jeq %l0\");}")(define_insn "bne" [(set (pc) (if_then_else (ne (cc0) (const_int 0)) (label_ref (match_operand 0 "" "")) (pc)))] "" "*{ OUTPUT_JUMP (\"jne %l0\", \"fbneq %l0\", \"jne %l0\");}")(define_insn "bgt" [(set (pc) (if_then_else (gt (cc0) (const_int 0)) (label_ref (match_operand 0 "" "")) (pc)))] "" "* OUTPUT_JUMP (\"jgt %l0\", \"fbgt %l0\", \"and%.b %#0xc,%!\;jgt %l0\");")(define_insn "bgtu" [(set (pc) (if_then_else (gtu (cc0) (const_int 0)) (label_ref (match_operand 0 "" "")) (pc)))] "" "* return \"jhi %l0\";")(define_insn "blt" [(set (pc) (if_then_else (lt (cc0) (const_int 0)) (label_ref (match_operand 0 "" "")) (pc)))] "" "* OUTPUT_JUMP (\"jlt %l0\", \"fblt %l0\", \"jmi %l0\");")(define_insn "bltu" [(set (pc) (if_then_else (ltu (cc0) (const_int 0)) (label_ref (match_operand 0 "" "")) (pc)))] "" "* return \"jcs %l0\";")(define_insn "bge" [(set (pc) (if_then_else (ge (cc0) (const_int 0)) (label_ref (match_operand 0 "" "")) (pc)))] "" "* OUTPUT_JUMP (\"jge %l0\", \"fbge %l0\", \"jpl %l0\");")(define_insn "bgeu" [(set (pc) (if_then_else (geu (cc0) (const_int 0)) (label_ref (match_operand 0 "" "")) (pc)))] "" "* return \"jcc %l0\";")(define_insn "ble" [(set (pc) (if_then_else (le (cc0) (const_int 0)) (label_ref (match_operand 0 "" "")) (pc)))] "" "* OUTPUT_JUMP (\"jle %l0\", \"fble %l0\", \"and%.b %#0xc,%!\;jle %l0\");")(define_insn "bleu" [(set (pc) (if_then_else (leu (cc0) (const_int 0)) (label_ref (match_operand 0 "" "")) (pc)))] "" "* return \"jls %l0\";");; Negated conditional jump instructions.(define_insn "" [(set (pc) (if_then_else (eq (cc0) (const_int 0)) (pc) (label_ref (match_operand 0 "" ""))))] "" "*{ OUTPUT_JUMP (\"jne %l0\", \"fbneq %l0\", \"jne %l0\");}")(define_insn "" [(set (pc) (if_then_else (ne (cc0) (const_int 0)) (pc) (label_ref (match_operand 0 "" ""))))] "" "*{ OUTPUT_JUMP (\"jeq %l0\", \"fbeq %l0\", \"jeq %l0\");}")(define_insn "" [(set (pc) (if_then_else (gt (cc0) (const_int 0)) (pc) (label_ref (match_operand 0 "" ""))))] "" "* OUTPUT_JUMP (\"jle %l0\", \"fbngt %l0\", \"and%.b %#0xc,%!\;jle %l0\");")(define_insn "" [(set (pc) (if_then_else (gtu (cc0) (const_int 0)) (pc) (label_ref (match_operand 0 "" ""))))] "" "* return \"jls %l0\";")(define_insn "" [(set (pc) (if_then_else (lt (cc0) (const_int 0)) (pc) (label_ref (match_operand 0 "" ""))))] "" "* OUTPUT_JUMP (\"jge %l0\", \"fbnlt %l0\", \"jpl %l0\");")(define_insn "" [(set (pc) (if_then_else (ltu (cc0) (const_int 0)) (pc) (label_ref (match_operand 0 "" ""))))] "" "* return \"jcc %l0\";")(define_insn "" [(set (pc) (if_then_else (ge (cc0) (const_int 0)) (pc) (label_ref (match_operand 0 "" ""))))] "" "* OUTPUT_JUMP (\"jlt %l0\", \"fbnge %l0\", \"jmi %l0\");")(define_insn "" [(set (pc) (if_then_else (geu (cc0) (const_int 0)) (pc) (label_ref (match_operand 0 "" ""))))] "" "* return \"jcs %l0\";")(define_insn "" [(set (pc) (if_then_else (le (cc0) (const_int 0)) (pc) (label_ref (match_operand 0 "" ""))))] "" "* OUTPUT_JUMP (\"jgt %l0\", \"fbnle %l0\", \"and%.b %#0xc,%!\;jgt %l0\");")(define_insn "" [(set (pc) (if_then_else (leu (cc0) (const_int 0)) (pc) (label_ref (match_operand 0 "" ""))))] "" "* return \"jhi %l0\";");; Subroutines of "casesi".(define_expand "casesi_1" [(set (match_operand:SI 3 "general_operand" "") (plus:SI (match_operand:SI 0 "general_operand" "") ;; Note operand 1 has been negated! (match_operand:SI 1 "immediate_operand" ""))) (set (cc0) (compare (match_operand:SI 2 "nonimmediate_operand" "") (match_dup 3))) (set (pc) (if_then_else (ltu (cc0) (const_int 0)) (label_ref (match_operand 4 "" "")) (pc)))] "" "")(define_expand "casesi_2" [(set (match_operand:HI 0 "" "") (mem:HI (match_operand:SI 1 "" ""))) ;; The USE here is so that at least one jump-insn will refer to the label, ;; to keep it alive in jump_optimize. (parallel [(set (pc) (plus:SI (pc) (sign_extend:SI (match_dup 0)))) (use (label_ref (match_operand 2 "" "")))])] "" "");; Operand 0 is index (in bytes); operand 1 is minimum, operand 2 the maximum;;; operand 3 is CODE_LABEL for the table;;; operand 4 is the CODE_LABEL to go to if index out of range.(define_expand "casesi" ;; We don't use these for generating the RTL, but we must describe ;; the operands here. [(match_operand:HI 0 "general_operand" "") (match_operand:SI 1 "immediate_operand" "") (match_operand:SI 2 "general_operand" "") (match_operand 3 "" "") (match_operand 4 "" "")] "" "{ rtx table_elt_addr; rtx index_diff; operands[1] = negate_rtx (SImode, operands[1]); index_diff = gen_reg_rtx (SImode); /* Emit the first few insns. */ emit_insn (gen_casesi_1 (operands[0], operands[1], operands[2], index_diff, operands[4])); /* Construct a memory address. This may emit some insns. */ table_elt_addr = memory_address_noforce (HImode, gen_rtx (PLUS, Pmode, gen_rtx (MULT, Pmode, index_diff, GEN_INT (2)), gen_rtx (LABEL_REF, VOIDmode, operands[3]))); /* Emit the last few insns. */ emit_insn (gen_casesi_2 (gen_reg_rtx (HImode), table_elt_addr, operands[3])); DONE;}");; Recognize one of the insns resulting from casesi_2.(define_insn "" [(set (pc) (plus:SI (pc) (sign_extend:SI (match_operand:HI 0 "general_operand" "r")))) (use (label_ref (match_operand 1 "" "")))] "" "* return \"jmp pc@(2:B)[%0:W:B]\";");; Unconditional and other jump instructions(define_insn "jump" [(set (pc) (label_ref (match_operand 0 "" ""))
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -