📄 rs6000.md
字号:
"" [(set (match_dup 0) (xor:SI (match_dup 1) (match_dup 3))) (set (match_dup 0) (xor:SI (match_dup 0) (match_dup 4)))]"{ operands[3] = gen_rtx (CONST_INT, VOIDmode, INTVAL (operands[2]) & 0xffff0000); operands[4] = gen_rtx (CONST_INT, VOIDmode, INTVAL (operands[2]) & 0xffff);}")(define_insn "" [(set (match_operand:SI 0 "gpc_reg_operand" "=r") (not:SI (xor:SI (match_operand:SI 1 "gpc_reg_operand" "%r") (match_operand:SI 2 "gpc_reg_operand" "r"))))] "" "eqv %0,%1,%2")(define_insn "" [(set (match_operand:CC 0 "cc_reg_operand" "=x") (compare:CC (not:SI (xor:SI (match_operand:SI 1 "gpc_reg_operand" "%r") (match_operand:SI 2 "gpc_reg_operand" "r"))) (const_int 0))) (clobber (match_scratch:SI 3 "=r"))] "" "eqv. %3,%1,%2" [(set_attr "type" "compare")])(define_insn "" [(set (match_operand:CC 3 "cc_reg_operand" "=x") (compare:CC (not:SI (xor:SI (match_operand:SI 1 "gpc_reg_operand" "%r") (match_operand:SI 2 "gpc_reg_operand" "r"))) (const_int 0))) (set (match_operand:SI 0 "gpc_reg_operand" "=r") (not:SI (xor:SI (match_dup 1) (match_dup 2))))] "" "eqv. %0,%1,%2" [(set_attr "type" "compare")])(define_insn "" [(set (match_operand:SI 0 "gpc_reg_operand" "=r") (and:SI (not:SI (match_operand:SI 1 "gpc_reg_operand" "r")) (match_operand:SI 2 "gpc_reg_operand" "r")))] "" "andc %0,%2,%1")(define_insn "" [(set (match_operand:CC 0 "cc_reg_operand" "=x") (compare:CC (and:SI (not:SI (match_operand:SI 1 "gpc_reg_operand" "r")) (match_operand:SI 2 "gpc_reg_operand" "r")) (const_int 0))) (clobber (match_scratch:SI 3 "=r"))] "" "andc. %3,%2,%1" [(set_attr "type" "compare")])(define_insn "" [(set (match_operand:CC 3 "cc_reg_operand" "=x") (compare:CC (and:SI (not:SI (match_operand:SI 1 "gpc_reg_operand" "r")) (match_operand:SI 2 "gpc_reg_operand" "r")) (const_int 0))) (set (match_operand:SI 0 "gpc_reg_operand" "=r") (and:SI (not:SI (match_dup 1)) (match_dup 2)))] "" "andc. %0,%2,%1" [(set_attr "type" "compare")])(define_insn "" [(set (match_operand:SI 0 "gpc_reg_operand" "=r") (ior:SI (not:SI (match_operand:SI 1 "gpc_reg_operand" "r")) (match_operand:SI 2 "gpc_reg_operand" "r")))] "" "orc %0,%2,%1")(define_insn "" [(set (match_operand:CC 0 "cc_reg_operand" "=x") (compare:CC (ior:SI (not:SI (match_operand:SI 1 "gpc_reg_operand" "r")) (match_operand:SI 2 "gpc_reg_operand" "r")) (const_int 0))) (clobber (match_scratch:SI 3 "=r"))] "" "orc. %3,%2,%1" [(set_attr "type" "compare")])(define_insn "" [(set (match_operand:CC 3 "cc_reg_operand" "=x") (compare:CC (ior:SI (not:SI (match_operand:SI 1 "gpc_reg_operand" "r")) (match_operand:SI 2 "gpc_reg_operand" "r")) (const_int 0))) (set (match_operand:SI 0 "gpc_reg_operand" "=r") (ior:SI (not:SI (match_dup 1)) (match_dup 2)))] "" "orc. %0,%2,%1" [(set_attr "type" "compare")])(define_insn "" [(set (match_operand:SI 0 "gpc_reg_operand" "=r") (ior:SI (not:SI (match_operand:SI 1 "gpc_reg_operand" "%r")) (not:SI (match_operand:SI 2 "gpc_reg_operand" "r"))))] "" "nand %0,%1,%2")(define_insn "" [(set (match_operand:CC 0 "cc_reg_operand" "=x") (compare:CC (ior:SI (not:SI (match_operand:SI 1 "gpc_reg_operand" "%r")) (not:SI (match_operand:SI 2 "gpc_reg_operand" "r"))) (const_int 0))) (clobber (match_scratch:SI 3 "=r"))] "" "nand. %3,%1,%2" [(set_attr "type" "compare")])(define_insn "" [(set (match_operand:CC 3 "cc_reg_operand" "=x") (compare:CC (ior:SI (not:SI (match_operand:SI 1 "gpc_reg_operand" "%r")) (not:SI (match_operand:SI 2 "gpc_reg_operand" "r"))) (const_int 0))) (set (match_operand:SI 0 "gpc_reg_operand" "=r") (ior:SI (not:SI (match_dup 1)) (not:SI (match_dup 2))))] "" "nand. %0,%1,%2" [(set_attr "type" "compare")])(define_insn "" [(set (match_operand:SI 0 "gpc_reg_operand" "=r") (and:SI (not:SI (match_operand:SI 1 "gpc_reg_operand" "%r")) (not:SI (match_operand:SI 2 "gpc_reg_operand" "r"))))] "" "nor %0,%1,%2")(define_insn "" [(set (match_operand:CC 0 "cc_reg_operand" "=x") (compare:CC (and:SI (not:SI (match_operand:SI 1 "gpc_reg_operand" "%r")) (not:SI (match_operand:SI 2 "gpc_reg_operand" "r"))) (const_int 0))) (clobber (match_scratch:SI 3 "=r"))] "" "nor. %3,%1,%2" [(set_attr "type" "compare")])(define_insn "" [(set (match_operand:CC 3 "cc_reg_operand" "=x") (compare:CC (and:SI (not:SI (match_operand:SI 1 "gpc_reg_operand" "%r")) (not:SI (match_operand:SI 2 "gpc_reg_operand" "r"))) (const_int 0))) (set (match_operand:SI 0 "gpc_reg_operand" "=r") (and:SI (not:SI (match_dup 1)) (not:SI (match_dup 2))))] "" "nor. %0,%1,%2" [(set_attr "type" "compare")]);; maskir insn. We need four forms because things might be in arbitrary;; orders. Don't define forms that only set CR fields because these;; would modify an input register.(define_insn "" [(set (match_operand:SI 0 "gpc_reg_operand" "=r") (ior:SI (and:SI (not:SI (match_operand:SI 2 "gpc_reg_operand" "r")) (match_operand:SI 1 "gpc_reg_operand" "0")) (and:SI (match_dup 2) (match_operand:SI 3 "gpc_reg_operand" "r"))))] "TARGET_POWER" "maskir %0,%3,%2")(define_insn "" [(set (match_operand:SI 0 "gpc_reg_operand" "=r") (ior:SI (and:SI (not:SI (match_operand:SI 2 "gpc_reg_operand" "r")) (match_operand:SI 1 "gpc_reg_operand" "0")) (and:SI (match_operand:SI 3 "gpc_reg_operand" "r") (match_dup 2))))] "TARGET_POWER" "maskir %0,%3,%2")(define_insn "" [(set (match_operand:SI 0 "gpc_reg_operand" "=r") (ior:SI (and:SI (match_operand:SI 2 "gpc_reg_operand" "r") (match_operand:SI 3 "gpc_reg_operand" "r")) (and:SI (not:SI (match_dup 2)) (match_operand:SI 1 "gpc_reg_operand" "0"))))] "TARGET_POWER" "maskir %0,%3,%2")(define_insn "" [(set (match_operand:SI 0 "gpc_reg_operand" "=r") (ior:SI (and:SI (match_operand:SI 3 "gpc_reg_operand" "r") (match_operand:SI 2 "gpc_reg_operand" "r")) (and:SI (not:SI (match_dup 2)) (match_operand:SI 1 "gpc_reg_operand" "0"))))] "TARGET_POWER" "maskir %0,%3,%2")(define_insn "" [(set (match_operand:CC 4 "cc_reg_operand" "=x") (compare:CC (ior:SI (and:SI (not:SI (match_operand:SI 2 "gpc_reg_operand" "r")) (match_operand:SI 1 "gpc_reg_operand" "0")) (and:SI (match_dup 2) (match_operand:SI 3 "gpc_reg_operand" "r"))) (const_int 0))) (set (match_operand:SI 0 "gpc_reg_operand" "=r") (ior:SI (and:SI (not:SI (match_dup 2)) (match_dup 1)) (and:SI (match_dup 2) (match_dup 3))))] "TARGET_POWER" "maskir. %0,%3,%2" [(set_attr "type" "compare")])(define_insn "" [(set (match_operand:CC 4 "cc_reg_operand" "=x") (compare:CC (ior:SI (and:SI (not:SI (match_operand:SI 2 "gpc_reg_operand" "r")) (match_operand:SI 1 "gpc_reg_operand" "0")) (and:SI (match_operand:SI 3 "gpc_reg_operand" "r") (match_dup 2))) (const_int 0))) (set (match_operand:SI 0 "gpc_reg_operand" "=r") (ior:SI (and:SI (not:SI (match_dup 2)) (match_dup 1)) (and:SI (match_dup 3) (match_dup 2))))] "TARGET_POWER" "maskir. %0,%3,%2" [(set_attr "type" "compare")])(define_insn "" [(set (match_operand:CC 4 "cc_reg_operand" "=x") (compare:CC (ior:SI (and:SI (match_operand:SI 2 "gpc_reg_operand" "r") (match_operand:SI 3 "gpc_reg_operand" "r")) (and:SI (not:SI (match_dup 2)) (match_operand:SI 1 "gpc_reg_operand" "0"))) (const_int 0))) (set (match_operand:SI 0 "gpc_reg_operand" "=r") (ior:SI (and:SI (match_dup 2) (match_dup 3)) (and:SI (not:SI (match_dup 2)) (match_dup 1))))] "TARGET_POWER" "maskir. %0,%3,%2" [(set_attr "type" "compare")])(define_insn "" [(set (match_operand:CC 4 "cc_reg_operand" "=x") (compare:CC (ior:SI (and:SI (match_operand:SI 3 "gpc_reg_operand" "r") (match_operand:SI 2 "gpc_reg_operand" "r")) (and:SI (not:SI (match_dup 2)) (match_operand:SI 1 "gpc_reg_operand" "0"))) (const_int 0))) (set (match_operand:SI 0 "gpc_reg_operand" "=r") (ior:SI (and:SI (match_dup 3) (match_dup 2)) (and:SI (not:SI (match_dup 2)) (match_dup 1))))] "TARGET_POWER" "maskir. %0,%3,%2" [(set_attr "type" "compare")]);; Rotate and shift insns, in all their variants. These support shifts,;; field inserts and extracts, and various combinations thereof.(define_expand "insv" [(set (zero_extract:SI (match_operand:SI 0 "gpc_reg_operand" "+r") (match_operand:SI 1 "const_int_operand" "i") (match_operand:SI 2 "const_int_operand" "i")) (match_operand:SI 3 "gpc_reg_operand" "r"))] "" "{ /* Do not handle 16/8 bit structures that fit in HI/QI modes directly, since the (SUBREG:SI (REG:HI xxx)) that is otherwise generated can confuse the compiler if the address of the structure is taken later. */ if (GET_CODE (operands[0]) == SUBREG && (GET_MODE_SIZE (GET_MODE (SUBREG_REG (operands[0]))) < UNITS_PER_WORD)) FAIL;}")(define_insn "" [(set (zero_extract:SI (match_operand:SI 0 "gpc_reg_operand" "+r") (match_operand:SI 1 "const_int_operand" "i") (match_operand:SI 2 "const_int_operand" "i")) (match_operand:SI 3 "gpc_reg_operand" "r"))] "" "*{ int start = INTVAL (operands[2]) & 31; int size = INTVAL (operands[1]) & 31; operands[4] = gen_rtx (CONST_INT, VOIDmode, 32 - start - size); operands[1] = gen_rtx (CONST_INT, VOIDmode, start + size - 1); return \"{rlimi|rlwimi} %0,%3,%4,%h2,%h1\";}")(define_insn "" [(set (zero_extract:SI (match_operand:SI 0 "gpc_reg_operand" "+r") (match_operand:SI 1 "const_int_operand" "i") (match_operand:SI 2 "const_int_operand" "i")) (ashift:SI (match_operand:SI 3 "gpc_reg_operand" "r") (match_operand:SI 4 "const_int_operand" "i")))] "" "*{ int shift = INTVAL (operands[4]) & 31; int start = INTVAL (operands[2]) & 31; int size = INTVAL (operands[1]) & 31; operands[4] = gen_rtx (CONST_INT, VOIDmode, (shift - start - size) & 31); operands[1] = gen_rtx (CONST_INT, VOIDmode, start + size - 1); return \"{rlimi|rlwimi} %0,%3,%4,%h2,%h1\";}")(define_insn "" [(set (zero_extract:SI (match_operand:SI 0 "gpc_reg_operand" "+r") (match_operand:SI 1 "const_int_operand" "i") (match_operand:SI 2 "const_int_operand" "i")) (ashiftrt:SI (match_operand:SI 3 "gpc_reg_operand" "r") (match_operand:SI 4 "const_int_operand" "i")))] "" "*{ int shift = INTVAL (operands[4]) & 31; int start = INTVAL (operands[2]) & 31; int size = INTVAL (operands[1]) & 31; operands[4] = gen_rtx (CONST_INT, VOIDmode, (32 - shift - start - size) & 31); operands[1] = gen_rtx (CONST_INT, VOIDmode, start + size - 1); return \"{rlimi|rlwimi} %0,%3,%4,%h2,%h1\";}")(define_insn "" [(set (zero_extract:SI (match_operand:SI 0 "gpc_reg_operand" "+r") (match_operand:SI 1 "const_int_operand" "i") (match_operand:SI 2 "const_int_operand" "i")) (lshiftrt:SI (match_operand:SI 3 "gpc_reg_operand" "r") (match_operand:SI 4 "const_int_operand" "i")))] "" "*{ int shift = INTVAL (operands[4]) & 31; int start = INTVAL (operands[2]) & 31; int size = INTVAL (operands[1]) & 31; operands[4] = gen_rtx (CONST_INT, VOIDmode, (32 - shift - start - size) & 31); operands[1] = gen_rtx (CONST_INT, VOIDmode, start + size - 1); return \"{rlimi|rlwimi} %0,%3,%4,%h2,%h1\";}")(define_insn "" [(set (zero_extract:SI (match_operand:SI 0 "gpc_reg_operand" "+r") (match_operand:SI 1 "const_int_operand" "i") (match_operand:SI 2 "const_int_operand" "i")) (zero_extract:SI (match_operand:SI 3 "gpc_reg_operand" "r") (match_operand:SI 4 "const_int_operand" "i") (match_operand:SI 5 "const_int_operand" "i")))] "INTVAL (operands[4]) >= INTVAL (operands[1])" "*{ int extract_start = INTVAL (operands[5]) & 31; int extract_size = INTVAL (operands[4]) & 31; int insert_start = INTVAL (operands[2]) & 31; int insert_size = INTVAL (operands[1]) & 31;/* Align extract field with insert field */ operands[5] = gen_rtx (CONST_INT, VOIDmode, (extract_start + extract_size - insert_start - insert_size) & 31); operands[1] = gen_rtx (CONST_INT, VOIDmode, insert_start + insert_size - 1); return \"{rlimi|rlwimi} %0,%3,%5,%h2,%h1\";}")(define_expand "extzv" [(set (match_operand:SI 0 "gpc_reg_operand" "=r") (zero_extract:SI (match_operand:SI 1 "gpc_reg_operand" "r") (match_operand:SI 2 "const_int_operand" "i") (match_operand:SI 3 "const_int_operand" "i")))] "" "{ /* Do not handle 16/8 bit structures that fit in HI/QI modes directly, since the (SUBREG:SI (REG:HI xxx)) that is otherwise generated can confuse the compiler if the address of the structure is taken later. */ if (GET_CODE (operands[0]) == SUBREG && (GET_MODE_SIZE (GET_MODE (SUBREG_REG (operands[0]))) < UNITS_PER_WORD)) FAIL;}")(define_insn "" [(set (match_operand:SI 0 "gpc_reg_operand" "=r") (zero_extract:SI (match_operand:SI 1 "gpc_reg_operand" "r") (match_operand:SI 2 "const_int_operand" "i") (match_operand:SI 3 "const_int_operand" "i")))] "" "*{ int start = INTVAL (operands[3]) & 31; int size = INTVAL (operands[2]) & 31; if (start + size >= 32) operands[3] = const0_rtx; else operands[3] = gen_rtx (CONST_INT, VOIDmode, start + size); return \"{rlinm|rlwinm} %0,%1,%3,%s2,31\";}")(define_insn "" [(set (match_operand:CC 0 "cc_reg_operand" "=x") (compare:CC (zero_extract:SI (match_operand:SI 1 "gpc_reg_operand" "r") (match_operand:SI 2 "const_int_operand" "i") (match_operand:SI 3 "const_int_operand" "i")) (const_int 0))) (clobber (match_scratch:SI 4 "=r"))] "" "*{ int start = INTVAL (operands[3]) & 31; int size = INTVAL (operands[2]) & 31; /* If the bitfield being tested fits in the upper or lower half of a word, it is possible to use andiu. or andil. to test it. This is useful because the condition register set-use delay is smaller for andi[ul]. than for rlinm. This doesn't work when the starting bit position is 0 because the LT and GT bits may be set wrong. */ if ((start > 0 && start + size <= 16) || start >= 16) { operands[3] = gen_r
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -