Message ID | 87d25qrks7.fsf@redhat.com |
---|---|
State | New |
Headers | show |
Ok.
On Wed, 2015-02-04 11:14:16 +0000, Nick Clifton <nickc@redhat.com> wrote: > Please can I apply the patch below to fix some RL78 gcc testsuite > failures ? [...] > The second fix is to the RL78 specific dead-code elimination pass > which was failing to note the REGs inside a MEM are used when that MEM > is the destination of a SET insn. > > Tested with no regressions and lots of fixes using an rl78-elf > toolchain. > > OK to apply ? Seems you accidentally committed quite some more code you're currently working on in that very commit, which is now breaking (see eg. http://toolchain.lug-owl.de/buildbot/show_build_details.php?id=417627): [...] g++ -c -g -O2 -DIN_GCC -DCROSS_DIRECTORY_STRUCTURE -fno-exceptions -fno-rtti -fasynchronous-unwind-tables -W -Wall -Wwrite-strings -Wcast-qual -Wmissing-format-attribute -Woverloaded-virtual -pedantic -Wno-long-long -Wno-variadic-macros -Wno-overlength-strings -fno-common -DHAVE_CONFIG_H -I. -I. -I/home/jbglaw/repos/gcc/gcc -I/home/jbglaw/repos/gcc/gcc/. -I/home/jbglaw/repos/gcc/gcc/../include -I/home/jbglaw/repos/gcc/gcc/../libcpp/include -I/home/jbglaw/repos/gcc/gcc/../libdecnumber -I/home/jbglaw/repos/gcc/gcc/../libdecnumber/dpd -I../libdecnumber -I/home/jbglaw/repos/gcc/gcc/../libbacktrace -o rl78.o -MT rl78.o -MMD -MP -MF ./.deps/rl78.TPo /home/jbglaw/repos/gcc/gcc/config/rl78/rl78.c /home/jbglaw/repos/gcc/gcc/config/rl78/rl78.c: In function ‘tree_node* rl78_handle_func_attribute(tree_node**, tree_node*, tree_node*, int, bool*)’: /home/jbglaw/repos/gcc/gcc/config/rl78/rl78.c:728: warning: unknown conversion type character ‘E’ in format /home/jbglaw/repos/gcc/gcc/config/rl78/rl78.c:728: warning: too many arguments for format /home/jbglaw/repos/gcc/gcc/config/rl78/rl78.c: In function ‘tree_node* rl78_handle_saddr_attribute(tree_node**, tree_node*, tree_node*, int, bool*)’: /home/jbglaw/repos/gcc/gcc/config/rl78/rl78.c:775: warning: unknown conversion type character ‘E’ in format /home/jbglaw/repos/gcc/gcc/config/rl78/rl78.c:775: warning: too many arguments for format /home/jbglaw/repos/gcc/gcc/config/rl78/rl78.c: In function ‘void rl78_alloc_physical_registers()’: /home/jbglaw/repos/gcc/gcc/config/rl78/rl78.c:3465: error: ‘VALLOC_DIVHI’ was not declared in this scope /home/jbglaw/repos/gcc/gcc/config/rl78/rl78.c:3470: error: ‘VALLOC_DIVSI’ was not declared in this scope /home/jbglaw/repos/gcc/gcc/config/rl78/rl78.c:3512: error: ‘VALLOC_DIVSI’ was not declared in this scope /home/jbglaw/repos/gcc/gcc/config/rl78/rl78.c:3519: error: ‘VALLOC_DIVHI’ was not declared in this scope /home/jbglaw/repos/gcc/gcc/config/rl78/rl78.c: In function ‘void set_origin(rtx_def*, rtx_insn*, int*, int*)’: /home/jbglaw/repos/gcc/gcc/config/rl78/rl78.c:3838: error: ‘VALLOC_DIVHI’ was not declared in this scope /home/jbglaw/repos/gcc/gcc/config/rl78/rl78.c:3857: error: ‘VALLOC_DIVSI’ was not declared in this scope make[1]: *** [rl78.o] Error 1 With a more recent compiler, that condenses to: [...] g++ -c -g -O2 -DIN_GCC -DCROSS_DIRECTORY_STRUCTURE -fno-exceptions -fno-rtti -fasynchronous-unwind-tables -W -Wall -Wno-narrowing -Wwrite-strings -Wcast-qual -Wmissing-format-attribute -Woverloaded-virtual -pedantic -Wno-long-long -Wno-variadic-macros -Wno-overlength-strings -fno-common -DHAVE_CONFIG_H -I. -I. -I../../gcc/gcc -I../../gcc/gcc/. -I../../gcc/gcc/../include -I../../gcc/gcc/../libcpp/include -I../../gcc/gcc/../libdecnumber -I../../gcc/gcc/../libdecnumber/dpd -I../libdecnumber -I../../gcc/gcc/../libbacktrace -o rl78.o -MT rl78.o -MMD -MP -MF ./.deps/rl78.TPo ../../gcc/gcc/config/rl78/rl78.c ../../gcc/gcc/config/rl78/rl78.c: In function ‘void rl78_alloc_physical_registers()’: ../../gcc/gcc/config/rl78/rl78.c:3465:33: error: ‘VALLOC_DIVHI’ was not declared in this scope else if (valloc_method == VALLOC_DIVHI) ^ ../../gcc/gcc/config/rl78/rl78.c:3470:33: error: ‘VALLOC_DIVSI’ was not declared in this scope else if (valloc_method == VALLOC_DIVSI) ^ ../../gcc/gcc/config/rl78/rl78.c:3512:7: error: ‘VALLOC_DIVSI’ was not declared in this scope case VALLOC_DIVSI: ^ ../../gcc/gcc/config/rl78/rl78.c:3519:7: error: ‘VALLOC_DIVHI’ was not declared in this scope case VALLOC_DIVHI: ^ ../../gcc/gcc/config/rl78/rl78.c: In function ‘void set_origin(rtx, rtx_insn*, int*, int*)’: ../../gcc/gcc/config/rl78/rl78.c:3838:38: error: ‘VALLOC_DIVHI’ was not declared in this scope else if (get_attr_valloc (insn) == VALLOC_DIVHI) ^ ../../gcc/gcc/config/rl78/rl78.c:3857:38: error: ‘VALLOC_DIVSI’ was not declared in this scope else if (get_attr_valloc (insn) == VALLOC_DIVSI) ^ make[1]: *** [rl78.o] Error 1 MfG, JBG
Hi Jan-Benedict, > Seems you accidentally committed quite some more code you're currently > working on in that very commit, which is now breaking Doh! Yes, sorry about that. I have now reverted the DIV attribute part of the patch. (I am hoping that this work will be ready for contributing soon, but it is not quite there yet). Cheers Nick
Index: libgcc/config/rl78/fpmath-sf.S =================================================================== --- libgcc/config/rl78/fpmath-sf.S (revision 220389) +++ libgcc/config/rl78/fpmath-sf.S (working copy) @@ -517,8 +517,14 @@ movw ax, A_FRAC_L addw ax, #1 movw A_FRAC_L, ax - sknc + bnc $1f incw A_FRAC_H + + ;; If the rounding set the bit beyond the end of the fraction, increment the exponent. + mov a, A_FRAC_HH + bf a.1, $1f + incw A_EXP + 1: movw ax, A_FRAC_H shrw ax, 1 Index: gcc/config/rl78/rl78.c =================================================================== --- gcc/config/rl78/rl78.c (revision 220393) +++ gcc/config/rl78/rl78.c (working copy) @@ -3577,6 +3608,9 @@ { int r, i; + if (GET_CODE (d) == MEM) + rl78_note_reg_uses (dead, XEXP (d, 0), insn); + if (GET_CODE (d) != REG) return;