📄 alpha.md
字号:
[(set (match_operand:DI 0 "register_operand" "=r") (sign_extend:DI (minus:SI (match_operand:SI 1 "reg_or_0_operand" "rJ") (match_operand:SI 2 "reg_or_8bit_operand" "rI"))))] "" "subl %r1,%2,%0")(define_insn "*subsi_se2" [(set (match_operand:DI 0 "register_operand" "=r") (sign_extend:DI (subreg:SI (minus:DI (match_operand:DI 1 "reg_or_0_operand" "rJ") (match_operand:DI 2 "reg_or_8bit_operand" "rI")) 0)))] "" "subl %r1,%2,%0")(define_insn "subvsi3" [(set (match_operand:SI 0 "register_operand" "=r") (minus:SI (match_operand:SI 1 "reg_or_0_operand" "rJ") (match_operand:SI 2 "reg_or_8bit_operand" "rI"))) (trap_if (ne (minus:DI (sign_extend:DI (match_dup 1)) (sign_extend:DI (match_dup 2))) (sign_extend:DI (minus:SI (match_dup 1) (match_dup 2)))) (const_int 0))] "" "sublv %r1,%2,%0")(define_insn "subdi3" [(set (match_operand:DI 0 "register_operand" "=r") (minus:DI (match_operand:DI 1 "reg_or_0_operand" "rJ") (match_operand:DI 2 "reg_or_8bit_operand" "rI")))] "" "subq %r1,%2,%0")(define_insn "*ssubl" [(set (match_operand:SI 0 "register_operand" "=r") (minus:SI (mult:SI (match_operand:SI 1 "reg_not_elim_operand" "r") (match_operand:SI 2 "const48_operand" "I")) (match_operand:SI 3 "reg_or_8bit_operand" "rI")))] "" "s%2subl %1,%3,%0")(define_insn "*ssubl_se" [(set (match_operand:DI 0 "register_operand" "=r") (sign_extend:DI (minus:SI (mult:SI (match_operand:SI 1 "reg_not_elim_operand" "r") (match_operand:SI 2 "const48_operand" "I")) (match_operand:SI 3 "reg_or_8bit_operand" "rI"))))] "" "s%2subl %1,%3,%0")(define_insn "*ssubq" [(set (match_operand:DI 0 "register_operand" "=r") (minus:DI (mult:DI (match_operand:DI 1 "reg_not_elim_operand" "r") (match_operand:DI 2 "const48_operand" "I")) (match_operand:DI 3 "reg_or_8bit_operand" "rI")))] "" "s%2subq %1,%3,%0")(define_insn "subvdi3" [(set (match_operand:DI 0 "register_operand" "=r") (minus:DI (match_operand:DI 1 "reg_or_0_operand" "rJ") (match_operand:DI 2 "reg_or_8bit_operand" "rI"))) (trap_if (ne (minus:TI (sign_extend:TI (match_dup 1)) (sign_extend:TI (match_dup 2))) (sign_extend:TI (minus:DI (match_dup 1) (match_dup 2)))) (const_int 0))] "" "subqv %r1,%2,%0");; The Unicos/Mk assembler doesn't support mull.(define_insn "mulsi3" [(set (match_operand:SI 0 "register_operand" "=r") (mult:SI (match_operand:SI 1 "reg_or_0_operand" "%rJ") (match_operand:SI 2 "reg_or_8bit_operand" "rI")))] "!TARGET_ABI_UNICOSMK" "mull %r1,%2,%0" [(set_attr "type" "imul") (set_attr "opsize" "si")])(define_insn "*mulsi_se" [(set (match_operand:DI 0 "register_operand" "=r") (sign_extend:DI (mult:SI (match_operand:SI 1 "reg_or_0_operand" "%rJ") (match_operand:SI 2 "reg_or_8bit_operand" "rI"))))] "!TARGET_ABI_UNICOSMK" "mull %r1,%2,%0" [(set_attr "type" "imul") (set_attr "opsize" "si")])(define_insn "mulvsi3" [(set (match_operand:SI 0 "register_operand" "=r") (mult:SI (match_operand:SI 1 "reg_or_0_operand" "%rJ") (match_operand:SI 2 "reg_or_8bit_operand" "rI"))) (trap_if (ne (mult:DI (sign_extend:DI (match_dup 1)) (sign_extend:DI (match_dup 2))) (sign_extend:DI (mult:SI (match_dup 1) (match_dup 2)))) (const_int 0))] "!TARGET_ABI_UNICOSMK" "mullv %r1,%2,%0" [(set_attr "type" "imul") (set_attr "opsize" "si")])(define_insn "muldi3" [(set (match_operand:DI 0 "register_operand" "=r") (mult:DI (match_operand:DI 1 "reg_or_0_operand" "%rJ") (match_operand:DI 2 "reg_or_8bit_operand" "rI")))] "" "mulq %r1,%2,%0" [(set_attr "type" "imul")])(define_insn "mulvdi3" [(set (match_operand:DI 0 "register_operand" "=r") (mult:DI (match_operand:DI 1 "reg_or_0_operand" "%rJ") (match_operand:DI 2 "reg_or_8bit_operand" "rI"))) (trap_if (ne (mult:TI (sign_extend:TI (match_dup 1)) (sign_extend:TI (match_dup 2))) (sign_extend:TI (mult:DI (match_dup 1) (match_dup 2)))) (const_int 0))] "" "mulqv %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 "*umuldi3_highpart_const" [(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 take their inputs from r24 and;; r25, put their output in r27, and clobber r23 and r28 on all;; systems except Unicos/Mk. On Unicos, the standard library provides;; subroutines which use the standard calling convention and work on;; DImode operands.;; ??? Force sign-extension here because some versions of OSF/1 and;; Interix/NT 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?(define_expand "divsi3" [(set (match_dup 3) (sign_extend:DI (match_operand:SI 1 "nonimmediate_operand" ""))) (set (match_dup 4) (sign_extend:DI (match_operand:SI 2 "nonimmediate_operand" ""))) (parallel [(set (match_dup 5) (sign_extend:DI (div:SI (match_dup 3) (match_dup 4)))) (clobber (reg:DI 23)) (clobber (reg:DI 28))]) (set (match_operand:SI 0 "nonimmediate_operand" "") (subreg:SI (match_dup 5) 0))] "! TARGET_ABI_OPEN_VMS && ! TARGET_ABI_UNICOSMK"{ operands[3] = gen_reg_rtx (DImode); operands[4] = gen_reg_rtx (DImode); operands[5] = gen_reg_rtx (DImode);})(define_expand "udivsi3" [(set (match_dup 3) (sign_extend:DI (match_operand:SI 1 "nonimmediate_operand" ""))) (set (match_dup 4) (sign_extend:DI (match_operand:SI 2 "nonimmediate_operand" ""))) (parallel [(set (match_dup 5) (sign_extend:DI (udiv:SI (match_dup 3) (match_dup 4)))) (clobber (reg:DI 23)) (clobber (reg:DI 28))]) (set (match_operand:SI 0 "nonimmediate_operand" "") (subreg:SI (match_dup 5) 0))] "! TARGET_ABI_OPEN_VMS && ! TARGET_ABI_UNICOSMK"{ operands[3] = gen_reg_rtx (DImode); operands[4] = gen_reg_rtx (DImode); operands[5] = gen_reg_rtx (DImode);})(define_expand "modsi3" [(set (match_dup 3) (sign_extend:DI (match_operand:SI 1 "nonimmediate_operand" ""))) (set (match_dup 4) (sign_extend:DI (match_operand:SI 2 "nonimmediate_operand" ""))) (parallel [(set (match_dup 5) (sign_extend:DI (mod:SI (match_dup 3) (match_dup 4)))) (clobber (reg:DI 23)) (clobber (reg:DI 28))]) (set (match_operand:SI 0 "nonimmediate_operand" "") (subreg:SI (match_dup 5) 0))] "! TARGET_ABI_OPEN_VMS && ! TARGET_ABI_UNICOSMK"{ operands[3] = gen_reg_rtx (DImode); operands[4] = gen_reg_rtx (DImode); operands[5] = gen_reg_rtx (DImode);})(define_expand "umodsi3" [(set (match_dup 3) (sign_extend:DI (match_operand:SI 1 "nonimmediate_operand" ""))) (set (match_dup 4) (sign_extend:DI (match_operand:SI 2 "nonimmediate_operand" ""))) (parallel [(set (match_dup 5) (sign_extend:DI (umod:SI (match_dup 3) (match_dup 4)))) (clobber (reg:DI 23)) (clobber (reg:DI 28))]) (set (match_operand:SI 0 "nonimmediate_operand" "") (subreg:SI (match_dup 5) 0))] "! TARGET_ABI_OPEN_VMS && ! TARGET_ABI_UNICOSMK"{ operands[3] = gen_reg_rtx (DImode); operands[4] = gen_reg_rtx (DImode); operands[5] = gen_reg_rtx (DImode);})(define_expand "divdi3" [(parallel [(set (match_operand:DI 0 "register_operand" "") (div:DI (match_operand:DI 1 "register_operand" "") (match_operand:DI 2 "register_operand" ""))) (clobber (reg:DI 23)) (clobber (reg:DI 28))])] "! TARGET_ABI_OPEN_VMS && ! TARGET_ABI_UNICOSMK" "")(define_expand "udivdi3" [(parallel [(set (match_operand:DI 0 "register_operand" "") (udiv:DI (match_operand:DI 1 "register_operand" "") (match_operand:DI 2 "register_operand" ""))) (clobber (reg:DI 23)) (clobber (reg:DI 28))])] "! TARGET_ABI_OPEN_VMS && ! TARGET_ABI_UNICOSMK" "")(define_expand "moddi3" [(use (match_operand:DI 0 "register_operand" "")) (use (match_operand:DI 1 "register_operand" "")) (use (match_operand:DI 2 "register_operand" ""))] "!TARGET_ABI_OPEN_VMS"{ if (TARGET_ABI_UNICOSMK) emit_insn (gen_moddi3_umk (operands[0], operands[1], operands[2])); else emit_insn (gen_moddi3_dft (operands[0], operands[1], operands[2])); DONE;})(define_expand "moddi3_dft" [(parallel [(set (match_operand:DI 0 "register_operand" "") (mod:DI (match_operand:DI 1 "register_operand" "") (match_operand:DI 2 "register_operand" ""))) (clobber (reg:DI 23)) (clobber (reg:DI 28))])] "! TARGET_ABI_OPEN_VMS && ! TARGET_ABI_UNICOSMK" "");; On Unicos/Mk, we do as the system's C compiler does:;; compute the quotient, multiply and subtract.(define_expand "moddi3_umk" [(use (match_operand:DI 0 "register_operand" "")) (use (match_operand:DI 1 "register_operand" "")) (use (match_operand:DI 2 "register_operand" ""))] "TARGET_ABI_UNICOSMK"{ rtx div, mul = gen_reg_rtx (DImode); div = expand_binop (DImode, sdiv_optab, operands[1], operands[2], NULL_RTX, 0, OPTAB_LIB); div = force_reg (DImode, div); emit_insn (gen_muldi3 (mul, operands[2], div)); emit_insn (gen_subdi3 (operands[0], operands[1], mul)); DONE;})(define_expand "umoddi3" [(use (match_operand:DI 0 "register_operand" "")) (use (match_operand:DI 1 "register_operand" "")) (use (match_operand:DI 2 "register_operand" ""))] "! TARGET_ABI_OPEN_VMS"{ if (TARGET_ABI_UNICOSMK) emit_insn (gen_umoddi3_umk (operands[0], operands[1], operands[2])); else emit_insn (gen_umoddi3_dft (operands[0], operands[1], operands[2])); DONE;})(define_expand "umoddi3_dft" [(parallel [(set (match_operand:DI 0 "register_operand" "") (umod:DI (match_operand:DI 1 "register_operand" "") (match_operand:DI 2 "register_operand" ""))) (clobber (reg:DI 23)) (clobber (reg:DI 28))])] "! TARGET_ABI_OPEN_VMS && ! TARGET_ABI_UNICOSMK" "")(define_expand "umoddi3_umk" [(use (match_operand:DI 0 "register_operand" "")) (use (match_operand:DI 1 "register_operand" "")) (use (match_operand:DI 2 "register_operand" ""))] "TARGET_ABI_UNICOSMK"{ rtx div, mul = gen_reg_rtx (DImode); div = expand_binop (DImode, udiv_optab, operands[1], operands[2], NULL_RTX, 1, OPTAB_LIB); div = force_reg (DImode, div); emit_insn (gen_muldi3 (mul, operands[2], div)); emit_insn (gen_subdi3 (operands[0], operands[1], mul)); DONE;});; Lengths of 8 for ldq $t12,__divq($gp); jsr $t9,($t12),__divq as;; expanded by the assembler.(define_insn_and_split "*divmodsi_internal_er" [(set (match_operand:DI 0 "register_operand" "=c") (sign_extend:DI (match_operator:SI 3 "divmod_operator" [(match_operand:DI 1 "register_operand" "a") (match_operand:DI 2 "register_operand" "b")]))) (clobber (reg:DI 23)) (clobber (reg:DI 28))] "TARGET_EXPLICIT_RELOCS && ! TARGET_ABI_OPEN_VMS" "ldq $27,__%E3($29)\t\t!literal!%#\;jsr $23,($27),__%E3\t\t!lituse_jsr!%#" "&& reload_completed" [(parallel [(set (match_dup 0) (sign_extend:DI (match_dup 3))) (use (match_dup 0)) (use (match_dup 4)) (clobber (reg:DI 23)) (clobber (reg:DI 28))])]{ const char *str; switch (GET_CODE (operands[3])) { case DIV: str = "__divl"; break; case UDIV: str = "__divlu"; break; case MOD: str = "__reml"; break; case UMOD: str = "__remlu"; break; default: abort (); } operands[4] = GEN_INT (alpha_next_sequence_number++); emit_insn (gen_movdi_er_high_g (operands[0], pic_offset_table_rtx, gen_rtx_SYMBOL_REF (DImode, str), operands[4]));} [(set_attr "type" "jsr") (set_attr "length" "8")])(define_insn "*divmodsi_internal_er_1" [(set (match_operand:DI 0 "register_operand" "=c") (sign_extend:DI (match_operator:SI 3 "divmod_operator" [(match_operand:DI 1 "register_operand" "a") (match_operand:DI 2 "register_operand" "b")]))) (use (match_operand:DI 4 "register_operand" "c")) (use (match_operand 5 "const_int_operand" "")) (clobber (reg:DI 23)) (clobber (reg:DI 28))] "TARGET_EXPLICIT_RELOCS && ! TARGET_ABI_OPEN_VMS" "jsr $23,($27),__%E3%J5" [(set_attr "type" "jsr") (set_attr "length" "4")])(define_insn "*divmodsi_internal" [(set (match_operand:DI 0 "register_operand" "=c") (sign_extend:DI (match_operator:SI 3 "divmod_operator" [(match_operand:DI 1 "register_operand" "a") (match_operand:DI 2 "register_operand" "b")]))) (clobber (reg:DI 23)) (clobber (reg:DI 28))] "! TARGET_ABI_OPEN_VMS && ! TARGET_ABI_UNICOSMK" "%E3 %1,%2,%0" [(set_attr "type" "jsr") (set_attr "length" "8")])(define_insn_and_split "*divmoddi_internal_er" [(set (match_operand:DI 0 "register_operand" "=c") (match_operator:DI 3 "divmod_operator" [(match_operand:DI 1 "register_operand" "a") (match_operand:DI 2 "register_operand" "b")])) (clobber (reg:DI 23)) (clobber (reg:DI 28))] "TARGET_EXPLICIT_RELOCS && ! TARGET_ABI_OPEN_VMS" "ldq $27,__%E3($29)\t\t!literal!%#\;jsr $23,($27),__%E3\t\t!lituse_jsr!%#" "&& reload_completed" [(parallel [(set (match_dup 0) (match_dup 3)) (use (match_dup 0)) (use (match_dup 4)) (clobber (reg:DI 23)) (clobber (reg:DI 28))])]{ const char *str; switch (GET_CODE (operands[3])) { case DIV:
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -