Message ID | 53B9246A.5090408@gmail.com |
---|---|
State | New |
Headers | show |
On 07/06/14 03:26, Chen Gang wrote: > > * microblaze/mocroblaze.md (call_value_intern): Use 'SI' instead of > 'VOID' for operand 1, just like 'call_internal1' has done. > > The related warning: > > ../../gcc/gcc/config/microblaze/microblaze.md:2172: warning: operand 1 missing mode? > > > Signed-off-by: Chen Gang <gang.chen.5i5j@gmail.com> > --- > gcc/config/microblaze/microblaze.md | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/gcc/config/microblaze/microblaze.md b/gcc/config/microblaze/microblaze.md > index 2bd5d72..9580221 100644 > --- a/gcc/config/microblaze/microblaze.md > +++ b/gcc/config/microblaze/microblaze.md > @@ -2171,7 +2171,7 @@ > > (define_insn "call_value_intern" > [(set (match_operand:VOID 0 "register_operand" "=d") > - (call (mem (match_operand:VOID 1 "call_insn_operand" "ri")) > + (call (mem (match_operand:SI 1 "call_insn_operand" "ri")) > (match_operand:SI 2 "" "i"))) > (clobber (match_operand:SI 3 "register_operand" "=d"))] > "" This patch causes a test suite regression: Executing on host: mb-gcc -fno-diagnostics-show-caret -fdiagnostics-color=never -O0 -w -c -mno-xl-soft-mul -mxl-barrel-shift -mcpu=v6.00.a -o calls.o testsuite/gcc.c-torture/compile/calls.c (timeout = 60) pid is 24832 -24832 testsuite/gcc.c-torture/compile/calls.c: In function 'f1': testsuite/gcc.c-torture/compile/calls.c:6:1: error: unrecognizable insn: (call_insn 5 2 8 2 (parallel [ (set (reg:SI 3 r3) (call (mem:SI (const_int 0 [0]) [0 MEM[(void * (*<T29e>) (void))0B] S4 A32]) (const_int 24 [0x18]))) (clobber (reg:SI 15 r15)) ]) testsuite/gcc.c-torture/compile/calls.c:5 -1 (nil) (nil)) testsuite/gcc.c-torture/compile/calls.c:6:1: internal compiler error: in extract_insn, at recog.c:2204 0x983018 _fatal_insn(char const*, rtx_def const*, char const*, int, char const*) /store/Xilinx/repo/fsf/gcc/gcc/rtl-error.c:109 0x983041 _fatal_insn_not_found(rtx_def const*, char const*, int, char const*) /store/Xilinx/repo/fsf/gcc/gcc/rtl-error.c:117 0x9539cd extract_insn(rtx_def*) /store/Xilinx/repo/fsf/gcc/gcc/recog.c:2204 0x7a5b59 instantiate_virtual_regs_in_insn /store/Xilinx/repo/fsf/gcc/gcc/function.c:1561 0x7aaa78 instantiate_virtual_regs /store/Xilinx/repo/fsf/gcc/gcc/function.c:1932
Firstly, thank you very much for spending your time resource on the related 2 patches. On 8/13/14 23:10, Michael Eager wrote: > On 07/06/14 03:26, Chen Gang wrote: >> >> * microblaze/mocroblaze.md (call_value_intern): Use 'SI' instead of >> 'VOID' for operand 1, just like 'call_internal1' has done. >> >> The related warning: >> >> ../../gcc/gcc/config/microblaze/microblaze.md:2172: warning: operand 1 missing mode? >> >> >> Signed-off-by: Chen Gang <gang.chen.5i5j@gmail.com> >> --- >> gcc/config/microblaze/microblaze.md | 2 +- >> 1 file changed, 1 insertion(+), 1 deletion(-) >> >> diff --git a/gcc/config/microblaze/microblaze.md b/gcc/config/microblaze/microblaze.md >> index 2bd5d72..9580221 100644 >> --- a/gcc/config/microblaze/microblaze.md >> +++ b/gcc/config/microblaze/microblaze.md >> @@ -2171,7 +2171,7 @@ >> >> (define_insn "call_value_intern" >> [(set (match_operand:VOID 0 "register_operand" "=d") >> - (call (mem (match_operand:VOID 1 "call_insn_operand" "ri")) >> + (call (mem (match_operand:SI 1 "call_insn_operand" "ri")) >> (match_operand:SI 2 "" "i"))) >> (clobber (match_operand:SI 3 "register_operand" "=d"))] >> "" > > This patch causes a test suite regression: > > Executing on host: mb-gcc -fno-diagnostics-show-caret -fdiagnostics-color=never -O0 -w -c -mno-xl-soft-mul -mxl-barrel-shift -mcpu=v6.00.a -o calls.o testsuite/gcc.c-torture/compile/calls.c (timeout = 60) > pid is 24832 -24832 > testsuite/gcc.c-torture/compile/calls.c: In function 'f1': > testsuite/gcc.c-torture/compile/calls.c:6:1: error: unrecognizable insn: > (call_insn 5 2 8 2 (parallel [ > (set (reg:SI 3 r3) > (call (mem:SI (const_int 0 [0]) [0 MEM[(void * (*<T29e>) (void))0B] S4 A32]) > (const_int 24 [0x18]))) > (clobber (reg:SI 15 r15)) > ]) testsuite/gcc.c-torture/compile/calls.c:5 -1 > (nil) > (nil)) > testsuite/gcc.c-torture/compile/calls.c:6:1: internal compiler error: in extract_insn, at recog.c:2204 > 0x983018 _fatal_insn(char const*, rtx_def const*, char const*, int, char const*) > /store/Xilinx/repo/fsf/gcc/gcc/rtl-error.c:109 > 0x983041 _fatal_insn_not_found(rtx_def const*, char const*, int, char const*) > /store/Xilinx/repo/fsf/gcc/gcc/rtl-error.c:117 > 0x9539cd extract_insn(rtx_def*) > /store/Xilinx/repo/fsf/gcc/gcc/recog.c:2204 > 0x7a5b59 instantiate_virtual_regs_in_insn > /store/Xilinx/repo/fsf/gcc/gcc/function.c:1561 > 0x7aaa78 instantiate_virtual_regs > /store/Xilinx/repo/fsf/gcc/gcc/function.c:1932 > OK, thanks, and I shall analyze it, but excuse me, I have to do other things this week, so hope I can finish it within next week (2014-08-24). If this time point is too long to bare, please let me know. Thanks.
On 08/13/14 18:35, Chen Gang wrote: > > Firstly, thank you very much for spending your time resource on the > related 2 patches. You're welcome. > > On 8/13/14 23:10, Michael Eager wrote: >> On 07/06/14 03:26, Chen Gang wrote: >>> >>> * microblaze/mocroblaze.md (call_value_intern): Use 'SI' instead of >>> 'VOID' for operand 1, just like 'call_internal1' has done. >>> >>> The related warning: >>> >>> ../../gcc/gcc/config/microblaze/microblaze.md:2172: warning: operand 1 missing mode? >>> >>> >>> Signed-off-by: Chen Gang <gang.chen.5i5j@gmail.com> >>> --- >>> gcc/config/microblaze/microblaze.md | 2 +- >>> 1 file changed, 1 insertion(+), 1 deletion(-) >>> >>> diff --git a/gcc/config/microblaze/microblaze.md b/gcc/config/microblaze/microblaze.md >>> index 2bd5d72..9580221 100644 >>> --- a/gcc/config/microblaze/microblaze.md >>> +++ b/gcc/config/microblaze/microblaze.md >>> @@ -2171,7 +2171,7 @@ >>> >>> (define_insn "call_value_intern" >>> [(set (match_operand:VOID 0 "register_operand" "=d") >>> - (call (mem (match_operand:VOID 1 "call_insn_operand" "ri")) >>> + (call (mem (match_operand:SI 1 "call_insn_operand" "ri")) >>> (match_operand:SI 2 "" "i"))) >>> (clobber (match_operand:SI 3 "register_operand" "=d"))] >>> "" >> >> This patch causes a test suite regression: >> >> Executing on host: mb-gcc -fno-diagnostics-show-caret -fdiagnostics-color=never -O0 -w -c -mno-xl-soft-mul -mxl-barrel-shift -mcpu=v6.00.a -o calls.o testsuite/gcc.c-torture/compile/calls.c (timeout = 60) >> pid is 24832 -24832 >> testsuite/gcc.c-torture/compile/calls.c: In function 'f1': >> testsuite/gcc.c-torture/compile/calls.c:6:1: error: unrecognizable insn: >> (call_insn 5 2 8 2 (parallel [ >> (set (reg:SI 3 r3) >> (call (mem:SI (const_int 0 [0]) [0 MEM[(void * (*<T29e>) (void))0B] S4 A32]) >> (const_int 24 [0x18]))) >> (clobber (reg:SI 15 r15)) >> ]) testsuite/gcc.c-torture/compile/calls.c:5 -1 >> (nil) >> (nil)) >> testsuite/gcc.c-torture/compile/calls.c:6:1: internal compiler error: in extract_insn, at recog.c:2204 >> 0x983018 _fatal_insn(char const*, rtx_def const*, char const*, int, char const*) >> /store/Xilinx/repo/fsf/gcc/gcc/rtl-error.c:109 >> 0x983041 _fatal_insn_not_found(rtx_def const*, char const*, int, char const*) >> /store/Xilinx/repo/fsf/gcc/gcc/rtl-error.c:117 >> 0x9539cd extract_insn(rtx_def*) >> /store/Xilinx/repo/fsf/gcc/gcc/recog.c:2204 >> 0x7a5b59 instantiate_virtual_regs_in_insn >> /store/Xilinx/repo/fsf/gcc/gcc/function.c:1561 >> 0x7aaa78 instantiate_virtual_regs >> /store/Xilinx/repo/fsf/gcc/gcc/function.c:1932 >> > > OK, thanks, and I shall analyze it, but excuse me, I have to do other > things this week, so hope I can finish it within next week (2014-08-24). > If this time point is too long to bare, please let me know. Take your time and let me know when you have this resolved.
On 8/14/14 10:14, Michael Eager wrote: >> OK, thanks, and I shall analyze it, but excuse me, I have to do other >> things this week, so hope I can finish it within next week (2014-08-24). >> If this time point is too long to bare, please let me know. > > Take your time and let me know when you have this resolved. OK, thanks. I shall try to finish within next week (2014-08-24). Thanks.
> On 8/13/14 23:10, Michael Eager wrote: >> On 07/06/14 03:26, Chen Gang wrote: >>> >>> * microblaze/mocroblaze.md (call_value_intern): Use 'SI' instead of >>> 'VOID' for operand 1, just like 'call_internal1' has done. >>> >>> The related warning: >>> >>> ../../gcc/gcc/config/microblaze/microblaze.md:2172: warning: operand 1 missing mode? >>> >>> >>> Signed-off-by: Chen Gang <gang.chen.5i5j@gmail.com> >>> --- >>> gcc/config/microblaze/microblaze.md | 2 +- >>> 1 file changed, 1 insertion(+), 1 deletion(-) >>> >>> diff --git a/gcc/config/microblaze/microblaze.md b/gcc/config/microblaze/microblaze.md >>> index 2bd5d72..9580221 100644 >>> --- a/gcc/config/microblaze/microblaze.md >>> +++ b/gcc/config/microblaze/microblaze.md >>> @@ -2171,7 +2171,7 @@ >>> >>> (define_insn "call_value_intern" >>> [(set (match_operand:VOID 0 "register_operand" "=d") >>> - (call (mem (match_operand:VOID 1 "call_insn_operand" "ri")) >>> + (call (mem (match_operand:SI 1 "call_insn_operand" "ri")) >>> (match_operand:SI 2 "" "i"))) >>> (clobber (match_operand:SI 3 "register_operand" "=d"))] >>> "" >> >> This patch causes a test suite regression: >> >> Executing on host: mb-gcc -fno-diagnostics-show-caret -fdiagnostics-color=never -O0 -w -c -mno-xl-soft-mul -mxl-barrel-shift -mcpu=v6.00.a -o calls.o testsuite/gcc.c-torture/compile/calls.c (timeout = 60) >> pid is 24832 -24832 >> testsuite/gcc.c-torture/compile/calls.c: In function 'f1': >> testsuite/gcc.c-torture/compile/calls.c:6:1: error: unrecognizable insn: >> (call_insn 5 2 8 2 (parallel [ >> (set (reg:SI 3 r3) >> (call (mem:SI (const_int 0 [0]) [0 MEM[(void * (*<T29e>) (void))0B] S4 A32]) >> (const_int 24 [0x18]))) >> (clobber (reg:SI 15 r15)) >> ]) testsuite/gcc.c-torture/compile/calls.c:5 -1 >> (nil) >> (nil)) >> testsuite/gcc.c-torture/compile/calls.c:6:1: internal compiler error: in extract_insn, at recog.c:2204 >> 0x983018 _fatal_insn(char const*, rtx_def const*, char const*, int, char const*) >> /store/Xilinx/repo/fsf/gcc/gcc/rtl-error.c:109 >> 0x983041 _fatal_insn_not_found(rtx_def const*, char const*, int, char const*) >> /store/Xilinx/repo/fsf/gcc/gcc/rtl-error.c:117 >> 0x9539cd extract_insn(rtx_def*) >> /store/Xilinx/repo/fsf/gcc/gcc/recog.c:2204 >> 0x7a5b59 instantiate_virtual_regs_in_insn >> /store/Xilinx/repo/fsf/gcc/gcc/function.c:1561 >> 0x7aaa78 instantiate_virtual_regs >> /store/Xilinx/repo/fsf/gcc/gcc/function.c:1932 >> It is really this patch to cause this issue. After add this patch, it will be fail for compiling the below C code: typedef void (*T)(void); f1 () { ((T) 0)(); } And I guess, the original compiling warning is still useful for us: for the almost same code, the original gcc (no this patch) also report the same error: f1 () { ((void (*)(void))0)(); } The related command is "./cc1 call.c -o /tmp/test.s" ('call.c' has the contents above). And I shall continue analysing it (I shall try to finish within this month). And also welcome any ideas, suggestions or completions. Thanks.
On 09/07/2014 11:17 PM, Chen Gang wrote: >> On 8/13/14 23:10, Michael Eager wrote: >>> On 07/06/14 03:26, Chen Gang wrote: >>>> >>>> * microblaze/mocroblaze.md (call_value_intern): Use 'SI' instead of >>>> 'VOID' for operand 1, just like 'call_internal1' has done. >>>> >>>> The related warning: >>>> >>>> ../../gcc/gcc/config/microblaze/microblaze.md:2172: warning: operand 1 missing mode? >>>> >>>> >>>> Signed-off-by: Chen Gang <gang.chen.5i5j@gmail.com> >>>> --- >>>> gcc/config/microblaze/microblaze.md | 2 +- >>>> 1 file changed, 1 insertion(+), 1 deletion(-) >>>> >>>> diff --git a/gcc/config/microblaze/microblaze.md b/gcc/config/microblaze/microblaze.md >>>> index 2bd5d72..9580221 100644 >>>> --- a/gcc/config/microblaze/microblaze.md >>>> +++ b/gcc/config/microblaze/microblaze.md >>>> @@ -2171,7 +2171,7 @@ >>>> >>>> (define_insn "call_value_intern" >>>> [(set (match_operand:VOID 0 "register_operand" "=d") >>>> - (call (mem (match_operand:VOID 1 "call_insn_operand" "ri")) >>>> + (call (mem (match_operand:SI 1 "call_insn_operand" "ri")) >>>> (match_operand:SI 2 "" "i"))) >>>> (clobber (match_operand:SI 3 "register_operand" "=d"))] >>>> "" >>> >>> This patch causes a test suite regression: >>> >>> Executing on host: mb-gcc -fno-diagnostics-show-caret -fdiagnostics-color=never -O0 -w -c -mno-xl-soft-mul -mxl-barrel-shift -mcpu=v6.00.a -o calls.o testsuite/gcc.c-torture/compile/calls.c (timeout = 60) >>> pid is 24832 -24832 >>> testsuite/gcc.c-torture/compile/calls.c: In function 'f1': >>> testsuite/gcc.c-torture/compile/calls.c:6:1: error: unrecognizable insn: >>> (call_insn 5 2 8 2 (parallel [ >>> (set (reg:SI 3 r3) >>> (call (mem:SI (const_int 0 [0]) [0 MEM[(void * (*<T29e>) (void))0B] S4 A32]) >>> (const_int 24 [0x18]))) >>> (clobber (reg:SI 15 r15)) >>> ]) testsuite/gcc.c-torture/compile/calls.c:5 -1 >>> (nil) >>> (nil)) >>> testsuite/gcc.c-torture/compile/calls.c:6:1: internal compiler error: in extract_insn, at recog.c:2204 >>> 0x983018 _fatal_insn(char const*, rtx_def const*, char const*, int, char const*) >>> /store/Xilinx/repo/fsf/gcc/gcc/rtl-error.c:109 >>> 0x983041 _fatal_insn_not_found(rtx_def const*, char const*, int, char const*) >>> /store/Xilinx/repo/fsf/gcc/gcc/rtl-error.c:117 >>> 0x9539cd extract_insn(rtx_def*) >>> /store/Xilinx/repo/fsf/gcc/gcc/recog.c:2204 >>> 0x7a5b59 instantiate_virtual_regs_in_insn >>> /store/Xilinx/repo/fsf/gcc/gcc/function.c:1561 >>> 0x7aaa78 instantiate_virtual_regs >>> /store/Xilinx/repo/fsf/gcc/gcc/function.c:1932 >>> > > It is really this patch to cause this issue. After add this patch, it > will be fail for compiling the below C code: > > typedef void (*T)(void); > f1 () > { > ((T) 0)(); > } > Oh, sorry, neither original nor the new one (with this patch) can recognize the code above. - The original one can recognize "void *(*)(void);" - But can not recognize "void (*)(void);" - Although new one (with this patch) also recognize "void *(*)(void);", it causes inconsistency within "config/microblaze/microblaze.md". And the original one also can recognize all below contents (only except "void (*)(void), or void (*)(int)"): - void **(*)(void); - int *(*)(void); - int (*)(void); - int (*)(int); > And I guess, the original compiling warning is still useful for us: for > the almost same code, the original gcc (no this patch) also report the > same error: > > f1 () > { > ((void (*)(void))0)(); > } > > The related command is "./cc1 call.c -o /tmp/test.s" ('call.c' has the > contents above). > > > And I shall continue analysing it (I shall try to finish within this > month). And also welcome any ideas, suggestions or completions. > > Thanks. >
diff --git a/gcc/config/microblaze/microblaze.md b/gcc/config/microblaze/microblaze.md index 2bd5d72..9580221 100644 --- a/gcc/config/microblaze/microblaze.md +++ b/gcc/config/microblaze/microblaze.md @@ -2171,7 +2171,7 @@ (define_insn "call_value_intern" [(set (match_operand:VOID 0 "register_operand" "=d") - (call (mem (match_operand:VOID 1 "call_insn_operand" "ri")) + (call (mem (match_operand:SI 1 "call_insn_operand" "ri")) (match_operand:SI 2 "" "i"))) (clobber (match_operand:SI 3 "register_operand" "=d"))] ""
* microblaze/mocroblaze.md (call_value_intern): Use 'SI' instead of 'VOID' for operand 1, just like 'call_internal1' has done. The related warning: ../../gcc/gcc/config/microblaze/microblaze.md:2172: warning: operand 1 missing mode? Signed-off-by: Chen Gang <gang.chen.5i5j@gmail.com> --- gcc/config/microblaze/microblaze.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)