📄 alpha.md
字号:
(match_operand:DI 2 "reg_or_8bit_operand" "rI")))] "" "mulq %r1,%2,%0" [(set_attr "type" "imul")])(define_insn "umuldi3_highpart" [(set (match_operand:DI 0 "register_operand" "=r") (truncate:DI (lshiftrt:TI (mult:TI (zero_extend:TI (match_operand:DI 1 "reg_or_0_operand" "%rJ")) (zero_extend:TI (match_operand:DI 2 "reg_or_8bit_operand" "rI"))) (const_int 64))))] "" "umulh %r1,%2,%0" [(set_attr "type" "imul") (set_attr "opsize" "udi")])(define_insn "" [(set (match_operand:DI 0 "register_operand" "=r") (truncate:DI (lshiftrt:TI (mult:TI (zero_extend:TI (match_operand:DI 1 "register_operand" "r")) (match_operand:TI 2 "cint8_operand" "I")) (const_int 64))))] "" "umulh %1,%2,%0" [(set_attr "type" "imul") (set_attr "opsize" "udi")]);; The divide and remainder operations always take their inputs from;; r24 and r25, put their output in r27, and clobber r23 and r28.;; ??? Force sign-extension here because some versions of OSF/1 don't;; do the right thing if the inputs are not properly sign-extended.;; But Linux, for instance, does not have this problem. Is it worth;; the complication here to eliminate the sign extension?;; Interix/NT has the same sign-extension problem.(define_expand "divsi3" [(set (reg:DI 24) (sign_extend:DI (match_operand:SI 1 "nonimmediate_operand" ""))) (set (reg:DI 25) (sign_extend:DI (match_operand:SI 2 "nonimmediate_operand" ""))) (parallel [(set (reg:DI 27) (sign_extend:DI (div:SI (reg:DI 24) (reg:DI 25)))) (clobber (reg:DI 23)) (clobber (reg:DI 28))]) (set (match_operand:SI 0 "general_operand" "") (subreg:SI (reg:DI 27) 0))] "!TARGET_OPEN_VMS" "")(define_expand "udivsi3" [(set (reg:DI 24) (sign_extend:DI (match_operand:SI 1 "nonimmediate_operand" ""))) (set (reg:DI 25) (sign_extend:DI (match_operand:SI 2 "nonimmediate_operand" ""))) (parallel [(set (reg:DI 27) (sign_extend:DI (udiv:SI (reg:DI 24) (reg:DI 25)))) (clobber (reg:DI 23)) (clobber (reg:DI 28))]) (set (match_operand:SI 0 "general_operand" "") (subreg:SI (reg:DI 27) 0))] "!TARGET_OPEN_VMS" "")(define_expand "modsi3" [(set (reg:DI 24) (sign_extend:DI (match_operand:SI 1 "nonimmediate_operand" ""))) (set (reg:DI 25) (sign_extend:DI (match_operand:SI 2 "nonimmediate_operand" ""))) (parallel [(set (reg:DI 27) (sign_extend:DI (mod:SI (reg:DI 24) (reg:DI 25)))) (clobber (reg:DI 23)) (clobber (reg:DI 28))]) (set (match_operand:SI 0 "general_operand" "") (subreg:SI (reg:DI 27) 0))] "!TARGET_OPEN_VMS" "")(define_expand "umodsi3" [(set (reg:DI 24) (sign_extend:DI (match_operand:SI 1 "nonimmediate_operand" ""))) (set (reg:DI 25) (sign_extend:DI (match_operand:SI 2 "nonimmediate_operand" ""))) (parallel [(set (reg:DI 27) (sign_extend:DI (umod:SI (reg:DI 24) (reg:DI 25)))) (clobber (reg:DI 23)) (clobber (reg:DI 28))]) (set (match_operand:SI 0 "general_operand" "") (subreg:SI (reg:DI 27) 0))] "!TARGET_OPEN_VMS" "")(define_expand "divdi3" [(set (reg:DI 24) (match_operand:DI 1 "input_operand" "")) (set (reg:DI 25) (match_operand:DI 2 "input_operand" "")) (parallel [(set (reg:DI 27) (div:DI (reg:DI 24) (reg:DI 25))) (clobber (reg:DI 23)) (clobber (reg:DI 28))]) (set (match_operand:DI 0 "general_operand" "") (reg:DI 27))] "!TARGET_OPEN_VMS" "")(define_expand "udivdi3" [(set (reg:DI 24) (match_operand:DI 1 "input_operand" "")) (set (reg:DI 25) (match_operand:DI 2 "input_operand" "")) (parallel [(set (reg:DI 27) (udiv:DI (reg:DI 24) (reg:DI 25))) (clobber (reg:DI 23)) (clobber (reg:DI 28))]) (set (match_operand:DI 0 "general_operand" "") (reg:DI 27))] "!TARGET_OPEN_VMS" "")(define_expand "moddi3" [(set (reg:DI 24) (match_operand:DI 1 "input_operand" "")) (set (reg:DI 25) (match_operand:DI 2 "input_operand" "")) (parallel [(set (reg:DI 27) (mod:DI (reg:DI 24) (reg:DI 25))) (clobber (reg:DI 23)) (clobber (reg:DI 28))]) (set (match_operand:DI 0 "general_operand" "") (reg:DI 27))] "!TARGET_OPEN_VMS" "")(define_expand "umoddi3" [(set (reg:DI 24) (match_operand:DI 1 "input_operand" "")) (set (reg:DI 25) (match_operand:DI 2 "input_operand" "")) (parallel [(set (reg:DI 27) (umod:DI (reg:DI 24) (reg:DI 25))) (clobber (reg:DI 23)) (clobber (reg:DI 28))]) (set (match_operand:DI 0 "general_operand" "") (reg:DI 27))] "!TARGET_OPEN_VMS" "");; Lengths of 8 for ldq $t12,__divq($gp); jsr $t9,($t12),__divq as;; expanded by the assembler.(define_insn "" [(set (reg:DI 27) (sign_extend:DI (match_operator:SI 1 "divmod_operator" [(reg:DI 24) (reg:DI 25)]))) (clobber (reg:DI 23)) (clobber (reg:DI 28))] "!TARGET_OPEN_VMS" "%E1 $24,$25,$27" [(set_attr "type" "jsr") (set_attr "length" "8")])(define_insn "" [(set (reg:DI 27) (match_operator:DI 1 "divmod_operator" [(reg:DI 24) (reg:DI 25)])) (clobber (reg:DI 23)) (clobber (reg:DI 28))] "!TARGET_OPEN_VMS" "%E1 $24,$25,$27" [(set_attr "type" "jsr") (set_attr "length" "8")]);; Next are the basic logical operations. These only exist in DImode.(define_insn "anddi3" [(set (match_operand:DI 0 "register_operand" "=r,r,r") (and:DI (match_operand:DI 1 "reg_or_0_operand" "%rJ,rJ,rJ") (match_operand:DI 2 "and_operand" "rI,N,MH")))] "" "@ and %r1,%2,%0 bic %r1,%N2,%0 zapnot %r1,%m2,%0" [(set_attr "type" "ilog,ilog,shift")]);; There are times when we can split an AND into two AND insns. This occurs;; when we can first clear any bytes and then clear anything else. For;; example "I & 0xffff07" is "(I & 0xffffff) & 0xffffffffffffff07".;; Only do this when running on 64-bit host since the computations are;; too messy otherwise.(define_split [(set (match_operand:DI 0 "register_operand" "") (and:DI (match_operand:DI 1 "register_operand" "") (match_operand:DI 2 "const_int_operand" "")))] "HOST_BITS_PER_WIDE_INT == 64 && ! and_operand (operands[2], DImode)" [(set (match_dup 0) (and:DI (match_dup 1) (match_dup 3))) (set (match_dup 0) (and:DI (match_dup 0) (match_dup 4)))] "{ unsigned HOST_WIDE_INT mask1 = INTVAL (operands[2]); unsigned HOST_WIDE_INT mask2 = mask1; int i; /* For each byte that isn't all zeros, make it all ones. */ for (i = 0; i < 64; i += 8) if ((mask1 & ((HOST_WIDE_INT) 0xff << i)) != 0) mask1 |= (HOST_WIDE_INT) 0xff << i; /* Now turn on any bits we've just turned off. */ mask2 |= ~ mask1; operands[3] = GEN_INT (mask1); operands[4] = GEN_INT (mask2);}")(define_insn "zero_extendqihi2" [(set (match_operand:HI 0 "register_operand" "=r") (zero_extend:HI (match_operand:QI 1 "register_operand" "r")))] "" "and %1,0xff,%0" [(set_attr "type" "ilog")])(define_insn "" [(set (match_operand:SI 0 "register_operand" "=r,r") (zero_extend:SI (match_operand:QI 1 "nonimmediate_operand" "r,m")))] "TARGET_BWX" "@ and %1,0xff,%0 ldbu %0,%1" [(set_attr "type" "ilog,ild")])(define_insn "" [(set (match_operand:SI 0 "register_operand" "=r") (zero_extend:SI (match_operand:QI 1 "register_operand" "r")))] "! TARGET_BWX" "and %1,0xff,%0" [(set_attr "type" "ilog")])(define_expand "zero_extendqisi2" [(set (match_operand:SI 0 "register_operand" "") (zero_extend:SI (match_operand:QI 1 "register_operand" "")))] "" "")(define_insn "" [(set (match_operand:DI 0 "register_operand" "=r,r") (zero_extend:DI (match_operand:QI 1 "nonimmediate_operand" "r,m")))] "TARGET_BWX" "@ and %1,0xff,%0 ldbu %0,%1" [(set_attr "type" "ilog,ild")])(define_insn "" [(set (match_operand:DI 0 "register_operand" "=r") (zero_extend:DI (match_operand:QI 1 "register_operand" "r")))] "! TARGET_BWX" "and %1,0xff,%0" [(set_attr "type" "ilog")]) (define_expand "zero_extendqidi2" [(set (match_operand:DI 0 "register_operand" "") (zero_extend:DI (match_operand:QI 1 "register_operand" "")))] "" "") (define_insn "" [(set (match_operand:SI 0 "register_operand" "=r,r") (zero_extend:SI (match_operand:HI 1 "nonimmediate_operand" "r,m")))] "TARGET_BWX" "@ zapnot %1,3,%0 ldwu %0,%1" [(set_attr "type" "shift,ild")])(define_insn "" [(set (match_operand:SI 0 "register_operand" "=r") (zero_extend:SI (match_operand:HI 1 "register_operand" "r")))] "! TARGET_BWX" "zapnot %1,3,%0" [(set_attr "type" "shift")])(define_expand "zero_extendhisi2" [(set (match_operand:SI 0 "register_operand" "") (zero_extend:SI (match_operand:HI 1 "register_operand" "")))] "" "")(define_insn "" [(set (match_operand:DI 0 "register_operand" "=r,r") (zero_extend:DI (match_operand:HI 1 "nonimmediate_operand" "r,m")))] "TARGET_BWX" "@ zapnot %1,3,%0 ldwu %0,%1" [(set_attr "type" "shift,ild")])(define_insn "" [(set (match_operand:DI 0 "register_operand" "=r") (zero_extend:DI (match_operand:HI 1 "register_operand" "r")))] "" "zapnot %1,3,%0" [(set_attr "type" "shift")])(define_expand "zero_extendhidi2" [(set (match_operand:DI 0 "register_operand" "") (zero_extend:DI (match_operand:HI 1 "register_operand" "")))] "" "")(define_insn "zero_extendsidi2" [(set (match_operand:DI 0 "register_operand" "=r") (zero_extend:DI (match_operand:SI 1 "register_operand" "r")))] "" "zapnot %1,15,%0" [(set_attr "type" "shift")])(define_insn "" [(set (match_operand:DI 0 "register_operand" "=r") (and:DI (not:DI (match_operand:DI 1 "reg_or_8bit_operand" "rI")) (match_operand:DI 2 "reg_or_0_operand" "rJ")))] "" "bic %r2,%1,%0" [(set_attr "type" "ilog")])(define_insn "iordi3" [(set (match_operand:DI 0 "register_operand" "=r,r") (ior:DI (match_operand:DI 1 "reg_or_0_operand" "%rJ,rJ") (match_operand:DI 2 "or_operand" "rI,N")))] "" "@ bis %r1,%2,%0 ornot %r1,%N2,%0" [(set_attr "type" "ilog")])(define_insn "one_cmpldi2" [(set (match_operand:DI 0 "register_operand" "=r") (not:DI (match_operand:DI 1 "reg_or_8bit_operand" "rI")))] "" "ornot $31,%1,%0" [(set_attr "type" "ilog")])(define_insn "" [(set (match_operand:DI 0 "register_operand" "=r") (ior:DI (not:DI (match_operand:DI 1 "reg_or_8bit_operand" "rI")) (match_operand:DI 2 "reg_or_0_operand" "rJ")))] "" "ornot %r2,%1,%0" [(set_attr "type" "ilog")])(define_insn "xordi3" [(set (match_operand:DI 0 "register_operand" "=r,r") (xor:DI (match_operand:DI 1 "reg_or_0_operand" "%rJ,rJ") (match_operand:DI 2 "or_operand" "rI,N")))] "" "@ xor %r1,%2,%0 eqv %r1,%N2,%0" [(set_attr "type" "ilog")])(define_insn "" [(set (match_operand:DI 0 "register_operand" "=r") (not:DI (xor:DI (match_operand:DI 1 "register_operand" "%rJ") (match_operand:DI 2 "register_operand" "rI"))))] "" "eqv %r1,%2,%0" [(set_attr "type" "ilog")]);; Handle the FFS insn iff we support CIX. ;;;; These didn't make it into EV6 pass 2 as planned. Instead they;; cropped cttz/ctlz/ctpop from the old CIX and renamed it FIX for;; "Square Root and Floating Point Convert Extension".;;;; I'm assured that these insns will make it into EV67 (first pass;; due Summer 1999), presumably with a new AMASK bit, and presumably;; will still be named CIX.(define_expand "ffsdi2" [(set (match_dup 2) (unspec [(match_operand:DI 1 "register_operand" "")] 1)) (set (match_dup 3) (plus:DI (match_dup 2) (const_int 1))) (set (match_operand:DI 0 "register_operand" "") (if_then_else:DI (eq (match_dup 1) (const_int 0)) (const_int 0) (match_dup 3)))] "TARGET_CIX" "{ operands[2] = gen_reg_rtx (DImode); operands[3] = gen_reg_rtx (DImode);}")(define_insn "" [(set (match_operand:DI 0 "register_operand" "=r") (unspec [(match_operand:DI 1 "register_operand" "r")] 1))] "TARGET_CIX" "cttz %1,%0" ; EV6 calls all mvi and cttz/ctlz/popc class imisc, so just ; reuse the existing type name. [(set_attr "type" "mvi")]);; Next come the shifts and the various extract and insert operations.(define_insn "ashldi3" [(set (match_operand:DI 0 "register_operand" "=r,r") (ashift:DI (match_operand:DI 1 "reg_or_0_operand" "rJ,rJ") (match_operand:DI 2 "reg_or_6bit_operand" "P,rS")))] "" "*{ switch (which_alternative) { case 0: if (operands[2] == const1_rtx) return \"addq %r1,%r1,%0\"; else return \"s%P2addq %r1,0,%0\"; case 1: return \"sll %r1,%2,%0\"; default: abort(); }}" [(set_attr "type" "iadd,shift")])
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -