Message ID | 20120224.000800.504232632.kkojima@rr.iij4u.or.jp |
---|---|
State | New |
Headers | show |
Hi! On Fri, 24 Feb 2012 00:08:00 +0900, Kaz Kojima <kkojima@rr.iij4u.or.jp> wrote: > Thomas Schwinge <thomas@codesourcery.com> wrote: > > /scratch/tschwing/FM_sh64-elf/src/gcc-mainline/libgcc/libgcc2.c: In function '__powisf2': > > /scratch/tschwing/FM_sh64-elf/src/gcc-mainline/libgcc/libgcc2.c:1779:1: error: unrecognizable insn: > > (insn 10 9 11 3 (set (reg:SI 162 [ D.2769 ]) > > (abs:SI (reg/v:SI 168 [ m ]))) /scratch/tschwing/FM_sh64-elf/src/gcc-mainline/libgcc/libgcc2.c:1770 -1 > > (nil)) > > /scratch/tschwing/FM_sh64-elf/src/gcc-mainline/libgcc/libgcc2.c:1779:1: internal compiler error: in extract_insn, at recog.c:2123 > > BTW, I have a patch below which restores sh64-elf build on trunk. > The hunks for sh_dwarf_register_span and abssi2 are almost obvious. > Those for sh_register_move_cost and CASE_USE_BIT_TESTS would be > suspicious, though. > > Regards, > kaz > -- > diff -up ORIG/trunk/gcc/config/sh/sh.c trunk/gcc/config/sh/sh.c > --- ORIG/trunk/gcc/config/sh/sh.c 2011-12-30 09:22:01.000000000 +0900 > +++ trunk/gcc/config/sh/sh.c 2012-02-23 21:23:44.000000000 +0900 Confirming that this patch makes GCC trunk buildable again. Comparing to the 4.6 testsuite results, with trunk there are about 700 new execution failures in g++, gcc, libstdc++, about 100 ``compilation failed to produce executable'' in g++, there is ``FAIL: gcc.target/sh/pr21255-2-ml.c scan-assembler mov @\\(4,r.\\),r.; mov @r.,r.'', ``FAIL: gcc.target/sh/pr49468-si.c scan-assembler-times neg 2'', several tests took a suspiciously long time to compile (with 0 % CPU usage) so that I killed the GCC processes, and about 12 GCC ICEs. Grüße, Thomas
Hello, On Fri, 2012-02-24 at 22:23 +0100, Thomas Schwinge wrote: > Confirming that this patch makes GCC trunk buildable again. > > Comparing to the 4.6 testsuite results, with trunk there are about 700 > new execution failures in g++, gcc, libstdc++, about 100 ``compilation > failed to produce executable'' in g++, there is ``FAIL: > gcc.target/sh/pr21255-2-ml.c scan-assembler mov @\\(4,r.\\),r.; mov > @r.,r.'' The test case should be actually skipped, shouldn't it? At least it tries to do.. /* { dg-skip-if "" { "sh*-*-*" } { "-mb" && "-m5*"} { "" } } */ I guess this could fail to skip depending on the compiler's default configuration. E.g. if it is configured to emit big endian by default, -mb will not necessarily be passed and the test would be executed, although it is not supposed to be. > ``FAIL: gcc.target/sh/pr49468-si.c scan-assembler-times neg > 2'', This test case should be disabled for SH64 if the abs:SI insns are disabled in sh.md, otherwise it will most likely fail. Adding the following line to pr49468-si.c /* { dg-skip-if "" { "sh*-*-*" } { "-m5*"} { "" } } */ should skip it on SH64 (if an -m5* arg is actually passed). Cheers, Oleg
diff -up ORIG/trunk/gcc/config/sh/sh.c trunk/gcc/config/sh/sh.c --- ORIG/trunk/gcc/config/sh/sh.c 2011-12-30 09:22:01.000000000 +0900 +++ trunk/gcc/config/sh/sh.c 2012-02-23 21:23:44.000000000 +0900 @@ -8133,10 +8133,8 @@ sh_dwarf_register_span (rtx reg) return gen_rtx_PARALLEL (VOIDmode, gen_rtvec (2, - gen_rtx_REG (SFmode, - DBX_REGISTER_NUMBER (regno+1)), - gen_rtx_REG (SFmode, - DBX_REGISTER_NUMBER (regno)))); + gen_rtx_REG (SFmode, regno + 1), + gen_rtx_REG (SFmode, regno))); } static enum machine_mode @@ -11499,7 +11497,7 @@ sh_register_move_cost (enum machine_mode && REGCLASS_HAS_GENERAL_REG (srcclass)) || (REGCLASS_HAS_GENERAL_REG (dstclass) && REGCLASS_HAS_FP_REG (srcclass))) - return ((TARGET_SHMEDIA ? 4 : TARGET_FMOVD ? 8 : 12) + return (((TARGET_SHMEDIA ? 4 : TARGET_FMOVD ? 8 : 12) + 64) * ((GET_MODE_SIZE (mode) + 7) / 8U)); if ((dstclass == FPUL_REGS diff -up ORIG/trunk/gcc/config/sh/sh.h trunk/gcc/config/sh/sh.h --- ORIG/trunk/gcc/config/sh/sh.h 2011-12-30 09:22:01.000000000 +0900 +++ trunk/gcc/config/sh/sh.h 2012-02-23 20:54:23.000000000 +0900 @@ -2435,6 +2435,10 @@ extern int current_function_interrupt; #define MD_CAN_REDIRECT_BRANCH(INSN, SEQ) \ sh_can_redirect_branch ((INSN), (SEQ)) +#define CASE_USE_BIT_TESTS (!TARGET_SHMEDIA \ + && (optab_handler (ashl_optab, word_mode) \ + != CODE_FOR_nothing)) + #define DWARF_FRAME_RETURN_COLUMN \ (TARGET_SH5 ? DWARF_FRAME_REGNUM (PR_MEDIA_REG) : DWARF_FRAME_REGNUM (PR_REG)) diff -up ORIG/trunk/gcc/config/sh/sh.md trunk/gcc/config/sh/sh.md --- ORIG/trunk/gcc/config/sh/sh.md 2012-02-23 15:20:01.000000000 +0900 +++ trunk/gcc/config/sh/sh.md 2012-02-23 15:20:29.000000000 +0900 @@ -4464,7 +4464,7 @@ label: [(set (match_operand:SI 0 "arith_reg_dest" "") (abs:SI (match_operand:SI 1 "arith_reg_operand" ""))) (clobber (reg:SI T_REG))] - "" + "TARGET_SH1" "") (define_insn_and_split "*abssi2"