|
1902 | 1902 | [(set_attr "is_sfunc" "yes") |
1903 | 1903 | (set_attr "predicable" "yes")]) |
1904 | 1904 |
|
1905 | | -(define_insn "mulsidi_600" |
1906 | | - [(set (reg:DI MUL64_OUT_REG) |
1907 | | - (mult:DI (sign_extend:DI |
1908 | | - (match_operand:SI 0 "register_operand" "Rcq#q,c,c,%c")) |
1909 | | - (sign_extend:DI |
1910 | | -; assembler issue for "I", see mulsi_600 |
1911 | | -; (match_operand:SI 1 "register_operand" "Rcq#q,cL,I,Cal"))))] |
1912 | | - (match_operand:SI 1 "register_operand" "Rcq#q,cL,L,C32"))))] |
| 1905 | + |
| 1906 | +(define_insn_and_split "mulsidi_600" |
| 1907 | + [(set (match_operand:DI 0 "nonimmediate_operand" "=mc,mc,mc,mc") |
| 1908 | + (mult:DI (sign_extend:DI (match_operand:SI 1 "register_operand" "Rcq#q, c, c,%c")) |
| 1909 | + (sign_extend:DI (match_operand:SI 2 "nonmemory_operand" "Rcq#q,cL, L,C32")))) |
| 1910 | + (clobber (reg:DI MUL64_OUT_REG))] |
| 1911 | + "TARGET_MUL64_SET && !TARGET_V2" |
| 1912 | + "#" |
| 1913 | + "TARGET_MUL64_SET && !TARGET_V2" |
| 1914 | + [(const_int 0)] |
| 1915 | + "emit_insn (gen_mul64 (operands[1], operands[2])); |
| 1916 | + emit_move_insn (operands[0], gen_rtx_REG (DImode, MUL64_OUT_REG)); |
| 1917 | + DONE; |
| 1918 | + " |
| 1919 | + [(set_attr "type" "multi") |
| 1920 | + (set_attr "length" "8")]) |
| 1921 | + |
| 1922 | +(define_insn "mul64" |
| 1923 | + [(unspec [(match_operand:SI 0 "register_operand" "Rcq#q, c,c,%c") |
| 1924 | + (match_operand:SI 1 "nonmemory_operand" "Rcq#q,cL,L,C32")] |
| 1925 | + UNSPEC_MUL64) |
| 1926 | + (clobber (reg:DI MUL64_OUT_REG))] |
1913 | 1927 | "TARGET_MUL64_SET" |
1914 | 1928 | "mul64%? \t0, %0, %1%&" |
1915 | 1929 | [(set_attr "length" "*,4,4,8") |
|
1918 | 1932 | (set_attr "predicable" "yes,yes,no,yes") |
1919 | 1933 | (set_attr "cond" "canuse,canuse,canuse_limm,canuse")]) |
1920 | 1934 |
|
1921 | | -(define_insn "umulsidi_600" |
1922 | | - [(set (reg:DI MUL64_OUT_REG) |
1923 | | - (mult:DI (zero_extend:DI |
1924 | | - (match_operand:SI 0 "register_operand" "c,c,%c")) |
1925 | | - (sign_extend:DI |
1926 | | -; assembler issue for "I", see mulsi_600 |
1927 | | -; (match_operand:SI 1 "register_operand" "cL,I,Cal"))))] |
1928 | | - (match_operand:SI 1 "register_operand" "cL,L,C32"))))] |
| 1935 | + |
| 1936 | +(define_insn_and_split "umulsidi_600" |
| 1937 | + [(set (match_operand:DI 0 "nonimmediate_operand" "=mc,mc,mc") |
| 1938 | + (mult:DI (zero_extend:DI (match_operand:SI 1 "register_operand" "c, c,%c")) |
| 1939 | + (sign_extend:DI (match_operand:SI 2 "nonmemory_operand" "cL, L,C32")))) |
| 1940 | + (clobber (reg:DI MUL64_OUT_REG))] |
| 1941 | + "TARGET_MUL64_SET && !TARGET_V2" |
| 1942 | + "#" |
| 1943 | + "TARGET_MUL64_SET && !TARGET_V2" |
| 1944 | + [(const_int 0)] |
| 1945 | + "emit_insn (gen_mulu64 (operands[1], operands[2])); |
| 1946 | + emit_move_insn (operands[0], gen_rtx_REG (DImode, MUL64_OUT_REG)); |
| 1947 | + DONE; |
| 1948 | + " |
| 1949 | + [(set_attr "type" "umulti") |
| 1950 | + (set_attr "length" "8")]) |
| 1951 | + |
| 1952 | +(define_insn "mulu64" |
| 1953 | + [(unspec [(match_operand:SI 0 "register_operand" "c,c,%c") |
| 1954 | + (match_operand:SI 1 "nonmemory_operand" "cL,L,C32")] |
| 1955 | + UNSPEC_MULU64) |
| 1956 | + (clobber (reg:DI MUL64_OUT_REG))] |
1929 | 1957 | "TARGET_MUL64_SET" |
1930 | 1958 | "mulu64%? \t0, %0, %1%&" |
1931 | 1959 | [(set_attr "length" "4,4,8") |
|
1998 | 2026 | } |
1999 | 2027 | else if (TARGET_MUL64_SET) |
2000 | 2028 | { |
2001 | | - operands[2] = force_reg (SImode, operands[2]); |
2002 | | - emit_insn (gen_mulsidi_600 (operands[1], operands[2])); |
2003 | | - emit_move_insn (operands[0], gen_rtx_REG (DImode, MUL64_OUT_REG)); |
| 2029 | + emit_insn (gen_mulsidi_600 (operands[0], operands[1], operands[2])); |
2004 | 2030 | DONE; |
2005 | 2031 | } |
2006 | 2032 | else if (TARGET_MULMAC_32BY16_SET) |
|
2239 | 2265 | } |
2240 | 2266 | else if (TARGET_MUL64_SET) |
2241 | 2267 | { |
2242 | | - operands[2] = force_reg (SImode, operands[2]); |
2243 | | - emit_insn (gen_umulsidi_600 (operands[1], operands[2])); |
2244 | | - emit_move_insn (operands[0], gen_rtx_REG (DImode, MUL64_OUT_REG)); |
| 2268 | + emit_insn (gen_umulsidi_600 (operands[0], operands[1], operands[2])); |
2245 | 2269 | DONE; |
2246 | 2270 | } |
2247 | 2271 | else if (TARGET_MULMAC_32BY16_SET) |
|
4336 | 4360 | [(set_attr "length" "4,8,4") |
4337 | 4361 | (set_attr "type" "two_cycle_core,two_cycle_core,two_cycle_core")]) |
4338 | 4362 |
|
4339 | | -;; FIXME: an intrinsic for multiply is daft. Can we remove this? |
4340 | | -(define_insn "mul64" |
4341 | | - [(unspec [(match_operand:SI 0 "general_operand" "q,r,r,%r") |
4342 | | - (match_operand:SI 1 "general_operand" "q,rL,I,Cal")] |
4343 | | - UNSPEC_MUL64)] |
4344 | | - "TARGET_MUL64_SET" |
4345 | | - "@ |
4346 | | - mul64%? \t0, %0, %1%& |
4347 | | - mul64%? \t0, %0, %1 |
4348 | | - mul64 \t0, %0, %1 |
4349 | | - mul64%? \t0, %0, %S1" |
4350 | | - [(set_attr "length" "2,4,4,8") |
4351 | | - (set_attr "iscompact" "true,false,false,false") |
4352 | | - (set_attr "type" "binary,binary,binary,binary") |
4353 | | - (set_attr "cond" "canuse,canuse, nocond, canuse")]) |
4354 | | - |
4355 | | -(define_insn "mulu64" |
4356 | | - [(unspec [(match_operand:SI 0 "general_operand" "%r,r,r,r") |
4357 | | - (match_operand:SI 1 "general_operand" "rL,I,r,Cal")] |
4358 | | - UNSPEC_MULU64)] |
4359 | | - "TARGET_MUL64_SET" |
4360 | | - "@ |
4361 | | - mulu64%? \t0, %0, %1 |
4362 | | - mulu64 \t0, %0, %1 |
4363 | | - mulu64 \t0, %0, %1 |
4364 | | - mulu64%? \t0, %0, %S1" |
4365 | | - [(set_attr "length" "4,4,4,8") |
4366 | | - (set_attr "type" "binary,binary,binary,binary") |
4367 | | - (set_attr "cond" "canuse,nocond,nocond,canuse")]) |
4368 | | - |
4369 | 4363 | (define_insn "divaw" |
4370 | 4364 | [(set (match_operand:SI 0 "dest_reg_operand" "=&w,&w,&w") |
4371 | 4365 | (unspec:SI [(div:SI (match_operand:SI 1 "general_operand" "r,Cal,r") |
|
0 commit comments