📄 fx80.md
字号:
{ if (DATA_REG_P (operands[0])) operands[1] = GEN_INT (logval); else { operands[0] = adj_offsettable_operand (operands[0], 3 - (logval / 8)); operands[1] = GEN_INT (logval % 8); } return \"bset %1,%0\"; } return \"or%.l %2,%0\";}")(define_insn "iorhi3" [(set (match_operand:HI 0 "general_operand" "=m,d") (ior:HI (match_operand:HI 1 "general_operand" "%0,0") (match_operand:HI 2 "general_operand" "dn,dmn")))] "" "or%.w %2,%0")(define_insn "iorqi3" [(set (match_operand:QI 0 "general_operand" "=m,d") (ior:QI (match_operand:QI 1 "general_operand" "%0,0") (match_operand:QI 2 "general_operand" "dn,dmn")))] "" "or%.b %2,%0");; xor instructions(define_insn "xorsi3" [(set (match_operand:SI 0 "general_operand" "=do,m") (xor:SI (match_operand:SI 1 "general_operand" "%0,0") (match_operand:SI 2 "general_operand" "di,dKs")))] "" "*{ if (GET_CODE (operands[2]) == CONST_INT && INTVAL (operands[2]) >> 16 == 0 && (offsettable_memref_p (operands[0]) || DATA_REG_P (operands[0]))) { if (! DATA_REG_P (operands[0])) operands[0] = adj_offsettable_operand (operands[0], 2); /* Do not delete a following tstl %0 insn; that would be incorrect. */ CC_STATUS_INIT; return \"eor%.w %2,%0\"; } return \"eor%.l %2,%0\";}")(define_insn "xorhi3" [(set (match_operand:HI 0 "general_operand" "=dm") (xor:HI (match_operand:HI 1 "general_operand" "%0") (match_operand:HI 2 "general_operand" "dn")))] "" "eor%.w %2,%0")(define_insn "xorqi3" [(set (match_operand:QI 0 "general_operand" "=dm") (xor:QI (match_operand:QI 1 "general_operand" "%0") (match_operand:QI 2 "general_operand" "dn")))] "" "eor%.b %2,%0");; negation instructions(define_insn "negsi2" [(set (match_operand:SI 0 "general_operand" "=dm") (neg:SI (match_operand:SI 1 "general_operand" "0")))] "" "neg%.l %0")(define_insn "neghi2" [(set (match_operand:HI 0 "general_operand" "=dm") (neg:HI (match_operand:HI 1 "general_operand" "0")))] "" "neg%.w %0")(define_insn "negqi2" [(set (match_operand:QI 0 "general_operand" "=dm") (neg:QI (match_operand:QI 1 "general_operand" "0")))] "" "neg%.b %0")(define_insn "negsf2" [(set (match_operand:SF 0 "register_operand" "=f") (neg:SF (match_operand:SF 1 "nonimmediate_operand" "fm")))] "TARGET_CE" "fneg%.s %1,%0")(define_insn "negdf2" [(set (match_operand:DF 0 "register_operand" "=f") (neg:DF (match_operand:DF 1 "nonimmediate_operand" "fm")))] "TARGET_CE" "fneg%.d %1,%0");; Absolute value instructions(define_insn "abssf2" [(set (match_operand:SF 0 "register_operand" "=f") (abs:SF (match_operand:SF 1 "nonimmediate_operand" "fm")))] "TARGET_CE" "fabs%.s %1,%0")(define_insn "absdf2" [(set (match_operand:DF 0 "register_operand" "=f") (abs:DF (match_operand:DF 1 "nonimmediate_operand" "fm")))] "TARGET_CE" "fabs%.d %1,%0");; Square root instructions(define_insn "sqrtsf2" [(set (match_operand:SF 0 "register_operand" "=f") (sqrt:SF (match_operand:SF 1 "nonimmediate_operand" "fm")))] "TARGET_CE" "fsqrt%.s %1,%0")(define_insn "sqrtdf2" [(set (match_operand:DF 0 "register_operand" "=f") (sqrt:DF (match_operand:DF 1 "nonimmediate_operand" "fm")))] "TARGET_CE" "fsqrt%.d %1,%0");; one complement instructions(define_insn "one_cmplsi2" [(set (match_operand:SI 0 "general_operand" "=dm") (not:SI (match_operand:SI 1 "general_operand" "0")))] "" "not%.l %0")(define_insn "one_cmplhi2" [(set (match_operand:HI 0 "general_operand" "=dm") (not:HI (match_operand:HI 1 "general_operand" "0")))] "" "not%.w %0")(define_insn "one_cmplqi2" [(set (match_operand:QI 0 "general_operand" "=dm") (not:QI (match_operand:QI 1 "general_operand" "0")))] "" "not%.b %0");; arithmetic shift instructions;; We don't need the shift memory by 1 bit instruction(define_insn "ashlsi3" [(set (match_operand:SI 0 "general_operand" "=d") (ashift:SI (match_operand:SI 1 "general_operand" "0") (match_operand:SI 2 "general_operand" "dI")))] "" "asl%.l %2,%0")(define_insn "ashlhi3" [(set (match_operand:HI 0 "general_operand" "=d") (ashift:HI (match_operand:HI 1 "general_operand" "0") (match_operand:HI 2 "general_operand" "dI")))] "" "asl%.w %2,%0")(define_insn "ashlqi3" [(set (match_operand:QI 0 "general_operand" "=d") (ashift:QI (match_operand:QI 1 "general_operand" "0") (match_operand:QI 2 "general_operand" "dI")))] "" "asl%.b %2,%0")(define_insn "ashrsi3" [(set (match_operand:SI 0 "general_operand" "=d") (ashiftrt:SI (match_operand:SI 1 "general_operand" "0") (match_operand:SI 2 "general_operand" "dI")))] "" "asr%.l %2,%0")(define_insn "ashrhi3" [(set (match_operand:HI 0 "general_operand" "=d") (ashiftrt:HI (match_operand:HI 1 "general_operand" "0") (match_operand:HI 2 "general_operand" "dI")))] "" "asr%.w %2,%0")(define_insn "ashrqi3" [(set (match_operand:QI 0 "general_operand" "=d") (ashiftrt:QI (match_operand:QI 1 "general_operand" "0") (match_operand:QI 2 "general_operand" "dI")))] "" "asr%.b %2,%0");; logical shift instructions(define_insn "lshrsi3" [(set (match_operand:SI 0 "general_operand" "=d") (lshiftrt:SI (match_operand:SI 1 "general_operand" "0") (match_operand:SI 2 "general_operand" "dI")))] "" "lsr%.l %2,%0")(define_insn "lshrhi3" [(set (match_operand:HI 0 "general_operand" "=d") (lshiftrt:HI (match_operand:HI 1 "general_operand" "0") (match_operand:HI 2 "general_operand" "dI")))] "" "lsr%.w %2,%0")(define_insn "lshrqi3" [(set (match_operand:QI 0 "general_operand" "=d") (lshiftrt:QI (match_operand:QI 1 "general_operand" "0") (match_operand:QI 2 "general_operand" "dI")))] "" "lsr%.b %2,%0");; rotate instructions(define_insn "rotlsi3" [(set (match_operand:SI 0 "general_operand" "=d") (rotate:SI (match_operand:SI 1 "general_operand" "0") (match_operand:SI 2 "general_operand" "dI")))] "" "rol%.l %2,%0")(define_insn "rotlhi3" [(set (match_operand:HI 0 "general_operand" "=d") (rotate:HI (match_operand:HI 1 "general_operand" "0") (match_operand:HI 2 "general_operand" "dI")))] "" "rol%.w %2,%0")(define_insn "rotlqi3" [(set (match_operand:QI 0 "general_operand" "=d") (rotate:QI (match_operand:QI 1 "general_operand" "0") (match_operand:QI 2 "general_operand" "dI")))] "" "rol%.b %2,%0")(define_insn "rotrsi3" [(set (match_operand:SI 0 "general_operand" "=d") (rotatert:SI (match_operand:SI 1 "general_operand" "0") (match_operand:SI 2 "general_operand" "dI")))] "" "ror%.l %2,%0")(define_insn "rotrhi3" [(set (match_operand:HI 0 "general_operand" "=d") (rotatert:HI (match_operand:HI 1 "general_operand" "0") (match_operand:HI 2 "general_operand" "dI")))] "" "ror%.w %2,%0")(define_insn "rotrqi3" [(set (match_operand:QI 0 "general_operand" "=d") (rotatert:QI (match_operand:QI 1 "general_operand" "0") (match_operand:QI 2 "general_operand" "dI")))] "" "ror%.b %2,%0");; Special cases of bit-field insns which we should;; recognize in preference to the general case.;; These handle aligned 8-bit and 16-bit fields,;; which can usually be done with move instructions.(define_insn "" [(set (zero_extract:SI (match_operand:SI 0 "register_operand" "+do") (match_operand:SI 1 "const_int_operand" "i") (match_operand:SI 2 "const_int_operand" "i")) (match_operand:SI 3 "general_operand" "d"))] "TARGET_68020 && TARGET_BITFIELD && (INTVAL (operands[1]) == 8 || INTVAL (operands[1]) == 16) && INTVAL (operands[2]) % INTVAL (operands[1]) == 0 && (GET_CODE (operands[0]) == REG || ! mode_dependent_address_p (XEXP (operands[0], 0)))" "*{ if (REG_P (operands[0])) { if (INTVAL (operands[1]) + INTVAL (operands[2]) != 32) return \"bfins %3,[%c2,%c1]%0\"; } else operands[0] = adj_offsettable_operand (operands[0], INTVAL (operands[2]) / 8); if (GET_CODE (operands[3]) == MEM) operands[3] = adj_offsettable_operand (operands[3], (32 - INTVAL (operands[1])) / 8); if (INTVAL (operands[1]) == 8) return \"mov%.b %3,%0\"; return \"mov%.w %3,%0\";}")(define_insn "" [(set (match_operand:SI 0 "general_operand" "=&d") (zero_extract:SI (match_operand:SI 1 "register_operand" "do") (match_operand:SI 2 "const_int_operand" "i") (match_operand:SI 3 "const_int_operand" "i")))] "TARGET_68020 && TARGET_BITFIELD && (INTVAL (operands[2]) == 8 || INTVAL (operands[2]) == 16) && INTVAL (operands[3]) % INTVAL (operands[2]) == 0 && (GET_CODE (operands[1]) == REG || ! mode_dependent_address_p (XEXP (operands[1], 0)))" "*{ if (REG_P (operands[1])) { if (INTVAL (operands[2]) + INTVAL (operands[3]) != 32) return \"bfextu [%c3,%c2]%1,%0\"; } else operands[1] = adj_offsettable_operand (operands[1], INTVAL (operands[3]) / 8); output_asm_insn (\"clrl %0\", operands); if (GET_CODE (operands[0]) == MEM) operands[0] = adj_offsettable_operand (operands[0], (32 - INTVAL (operands[1])) / 8); if (INTVAL (operands[2]) == 8) return \"mov%.b %1,%0\"; return \"mov%.w %1,%0\";}")(define_insn "" [(set (match_operand:SI 0 "general_operand" "=d") (sign_extract:SI (match_operand:SI 1 "register_operand" "do") (match_operand:SI 2 "const_int_operand" "i") (match_operand:SI 3 "const_int_operand" "i")))] "TARGET_68020 && TARGET_BITFIELD && (INTVAL (operands[2]) == 8 || INTVAL (operands[2]) == 16) && INTVAL (operands[3]) % INTVAL (operands[2]) == 0 && (GET_CODE (operands[1]) == REG || ! mode_dependent_address_p (XEXP (operands[1], 0)))" "*{ if (REG_P (operands[1])) { if (INTVAL (operands[2]) + INTVAL (operands[3]) != 32) return \"bfexts [%c3,%c2]%1,%0\"; } else operands[1] = adj_offsettable_operand (operands[1], INTVAL (operands[3]) / 8); if (INTVAL (operands[2]) == 8) return \"mov%.b %1,%0\;extb%.l %0\"; return \"mov%.w %1,%0\;ext%.l %0\";}");; Bit field instructions, general cases.;; "o,d" constraint causes a nonoffsettable memref to match the "o";; so that its address is reloaded.(define_expand "extv" [(set (match_operand:SI 0 "general_operand" "") (sign_extract:SI (match_operand:SI 1 "general_operand" "") (match_operand:SI 2 "general_operand" "") (match_operand:SI 3 "general_operand" "")))] "TARGET_68020 && TARGET_BITFIELD" "")(define_insn "" [(set (match_operand:SI 0 "general_operand" "=d") (sign_extract:SI (match_operand:QI 1 "memory_operand" "o") (match_operand:SI 2 "general_operand" "di") (match_operand:SI 3 "general_operand" "di")))] "TARGET_68020 && TARGET_BITFIELD" "bfexts [%c3,%c2]%1,%0")(define_expand "extzv" [(set (match_operand:SI 0 "general_operand" "") (zero_extract:SI (match_operand:SI 1 "general_operand" "") (match_operand:SI 2 "general_operand" "") (match_operand:SI 3 "general_operand" "")))] "TARGET_68020 && TARGET_BITFIELD" "")(define_insn "" [(set (match_operand:SI 0 "general_operand" "=d") (zero_extract:SI (match_operand:QI 1 "memory_operand" "o") (match_operand:SI 2 "general_operand" "di") (match_operand:SI 3 "general_operand" "di")))] "TARGET_68020 && TARGET_BITFIELD" "bfextu [%c3,%c2]%1,%0")(define_insn "" [(set (zero_extract:SI (match_operand:QI 0 "memory_operand" "+o") (match_operand:SI 1 "general_operand" "di") (match_operand:SI 2 "general_operand" "di")) (xor:SI (zero_extract:SI (match_dup 0) (match_dup 1) (match_dup 2)) (match_operand:SI 3 "const_int_operand" "i,i")))] "TARGET_68020 && TARGET_BITFIELD && (INTVAL (operands[3]) == -1 || (GET_CODE (operands[1]) == CONST_INT && (~ INTVAL (operands[3]) & ((1 << INTVAL (operands[1]))- 1)) == 0))" "*{ CC_STATUS_INIT; return \"bfchg [%c2,%c1]%0\";}")(define_insn "" [(set (zero_extract:SI (match_operand:QI 0 "memory_operand" "+o") (match_operand:SI 1 "general_operand" "di") (match_operand:SI 2 "general_operand" "di")) (const_int 0))] "TARGET_68020 && TARGET_BITFIELD" "*{ CC_STATUS_INIT; return \"bfclr [%c2,%c1]%0\";}")(define_insn "" [(set (zero_extract:SI (match_operand:QI 0 "memory_operand" "+o") (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_expand "insv" [(set (zero_extract:SI (match_operand:SI 0 "general_operand" "") (match_operand:SI 1 "general_operand" "") (match_operand:SI 2 "general_operand" "")) (match_operand:SI 3 "general_operand" ""))] "TARGET_68020 && TARGET_BITFIELD" "")(define_insn "" [(set (zero_extract:SI (match_operand:QI 0 "memory_operand" "+o") (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" "bfins %3,[%c2,%c1]%0");; Now recognize bit field insns that operate on registers;; (or at least were intended to do so).(define_insn "" [(set (match_operand:SI 0 "general_operand" "=d") (sign_extract:SI (match_operand:SI 1 "register_operand" "d") (match_operand:SI 2 "general_operand" "di") (match_operand:SI 3 "general_operand" "di")))] "TARGET_68020 && TARGET_BITFIELD" "bfexts [%c3,%c2]%1,%0")(define_insn "" [(set (match_operand:SI 0 "general_operand" "=d") (zero_extract:SI (match_operand:SI 1 "register_operand" "d") (match_operand:SI 2 "general_operand" "di") (match_operand:SI 3 "general_operand" "di")))] "TARGET_68020 && TARGET_BITFIELD" "bfextu [%c3,%c2]%1,%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 0))] "TARGET_68020 && TARGET_BITFIELD" "*
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -