* Re: [PATCH] microblaze: microblaze.md: Use VOID instead of SI to fix "((void (*)(void)) 0)()" issue
@ 2014-09-25 23:40 Chen Gang
0 siblings, 0 replies; 8+ messages in thread
From: Chen Gang @ 2014-09-25 23:40 UTC (permalink / raw)
To: Michael Eager; +Cc: Mike Stump, Jeff Law, gcc-patches List
Yeah, the comments are big, but the body is the smallest.
Send from Lenovo A788t.
Michael Eager <eager@eagerm.com> wrote:
>On 09/25/14 10:38, Michael Eager wrote:
>> On 09/25/14 07:03, Chen Gang wrote:
>>> Need use VOID instead of SI, or when real VOIDmode comes, it does not
>>> match SImode, so cause issue. This patch can fix this issue and pass
>>> testsuite.
>>
>> Did you forget to attach the patch?
>
>Never mind. My eyes were playing tricks on me.
>
>--
>Michael Eager eager@eagercon.com
>1960 Park Blvd., Palo Alto, CA 94306 650-325-8077
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [PATCH] microblaze: microblaze.md: Use VOID instead of SI to fix "((void (*)(void)) 0)()" issue
@ 2014-09-27 19:09 Chen Gang
2014-09-28 4:25 ` Chen Gang
0 siblings, 1 reply; 8+ messages in thread
From: Chen Gang @ 2014-09-27 19:09 UTC (permalink / raw)
To: Michael Eager; +Cc: Mike Stump, Jeff Law, gcc-patches List
I guess it is not in our test case, or after this patch, the new
should get a little better result than the old (at present, they are
same).
I shall try to add related case into testsuite within this month.
Thanks
Send from Lenovo A788t.
Michael Eager <eager@eagerm.com> wrote:
>On 09/25/14 07:03, Chen Gang wrote:
>> Need use VOID instead of SI, or when real VOIDmode comes, it does not
>> match SImode, so cause issue. This patch can fix this issue and pass
>> testsuite.
>>
>> The related test code ('void' will cause CALL instead of SET):
>>
>> typedef void (*T)(void);
>> f1 ()
>> {
>> ((T) 0)();
>> }
>>
>> The related error:
>>
>> [root@localhost gcc]# ./cc1 /tmp/calls.c -o /tmp/1.s
>> f1
>> Analyzing compilation unit
>> Performing interprocedural optimizations
>> <*free_lang_data> <visibility> <early_local_cleanups> <free-inline-summary> <whole-program> <inline>Assembling functions:
>> f1
>> /tmp/calls.c: In function 'f1':
>> /tmp/calls.c:5:1: error: unrecognizable insn:
>> }
>> ^
>> (call_insn 5 2 8 2 (parallel [
>> (call (mem:SI (const_int 0 [0]) [0 MEM[(void (*<T29c>) (void))0B] S4 A32])
>> (const_int 24 [0x18]))
>> (clobber (reg:SI 15 r15))
>> ]) /tmp/calls.c:4 -1
>> (nil)
>> (nil))
>> /tmp/calls.c:5:1: internal compiler error: in extract_insn, at recog.c:2204
>> 0xb0e71b _fatal_insn(char const*, rtx_def const*, char const*, int, char const*)
>> ../../gcc/gcc/rtl-error.c:109
>> 0xb0e75c _fatal_insn_not_found(rtx_def const*, char const*, int, char const*)
>> ../../gcc/gcc/rtl-error.c:117
>> 0xac552b extract_insn(rtx_def*)
>> ../../gcc/gcc/recog.c:2204
>> 0x8b919e instantiate_virtual_regs_in_insn
>> ../../gcc/gcc/function.c:1614
>> 0x8ba347 instantiate_virtual_regs
>> ../../gcc/gcc/function.c:1934
>> 0x8ba452 execute
>> ../../gcc/gcc/function.c:1983
>> Please submit a full bug report,
>> with preprocessed source if appropriate.
>> Please include the complete backtrace with any bug report.
>> See <http://gcc.gnu.org/bugs.html> for instructions.
>
>Is this test case (or a similar one) in the gcc test suite?
>
>If not, can you please add it to the test suite.
>
>>
>>
>> 2014-09-25 Chen Gang <gang.chen.5i5j@gmail.com>
>>
>> * config/microblaze/microblaze.md (call_internal1): Use VOID
>> instead of SI to fix "((void (*)(void)) 0)()" issue
>>
>> ---
>> 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 b971737..3b4faf4 100644
>> --- a/gcc/config/microblaze/microblaze.md
>> +++ b/gcc/config/microblaze/microblaze.md
>> @@ -2062,7 +2062,7 @@
>> (set_attr "length" "4")])
>>
>> (define_insn "call_internal1"
>> - [(call (mem (match_operand:SI 0 "call_insn_simple_operand" "ri"))
>> + [(call (mem (match_operand:VOID 0 "call_insn_simple_operand" "ri"))
>> (match_operand:SI 1 "" "i"))
>> (clobber (reg:SI R_SR))]
>> ""
>
>I've verified that your patch does not cause any test suite regressions.
>
>
>--
>Michael Eager eager@eagercon.com
>1960 Park Blvd., Palo Alto, CA 94306 650-325-8077
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [PATCH] microblaze: microblaze.md: Use VOID instead of SI to fix "((void (*)(void)) 0)()" issue
2014-09-27 19:09 Chen Gang
@ 2014-09-28 4:25 ` Chen Gang
0 siblings, 0 replies; 8+ messages in thread
From: Chen Gang @ 2014-09-28 4:25 UTC (permalink / raw)
To: Michael Eager; +Cc: Mike Stump, Jeff Law, gcc-patches List
And excuse me, I am not quite familiar with adding testsuite, so during
I am trying, welcome any related ideas, suggestions or completions.
Thanks.
On 9/28/14 3:08, Chen Gang wrote:
> I guess it is not in our test case, or after this patch, the new
> should get a little better result than the old (at present, they are
> same).
>
> I shall try to add related case into testsuite within this month.
>
> Thanks
>
> Send from Lenovo A788t.
>
>
>
>
>
> Michael Eager <eager@eagerm.com> wrote:
>
>
>
> On 09/25/14 07:03, Chen Gang wrote:
>> Need use VOID instead of SI, or when real VOIDmode comes, it does not
>> match SImode, so cause issue. This patch can fix this issue and pass
>> testsuite.
>>
>> The related test code ('void' will cause CALL instead of SET):
>>
>> typedef void (*T)(void);
>> f1 ()
>> {
>> ((T) 0)();
>> }
>>
>> The related error:
>>
>> [root@localhost gcc]# ./cc1 /tmp/calls.c -o /tmp/1.s
>> f1
>> Analyzing compilation unit
>> Performing interprocedural optimizations
>> <*free_lang_data> <visibility> <early_local_cleanups> <free-inline-summary> <whole-program> <inline>Assembling functions:
>> f1
>> /tmp/calls.c: In function 'f1':
>> /tmp/calls.c:5:1: error: unrecognizable insn:
>> }
>> ^
>> (call_insn 5 2 8 2 (parallel [
>> (call (mem:SI (const_int 0 [0]) [0 MEM[(void (*<T29c>) (void))0B] S4 A32])
>> (const_int 24 [0x18]))
>> (clobber (reg:SI 15 r15))
>> ]) /tmp/calls.c:4 -1
>> (nil)
>> (nil))
>> /tmp/calls.c:5:1: internal compiler error: in extract_insn, at recog.c:2204
>> 0xb0e71b _fatal_insn(char const*, rtx_def const*, char const*, int, char const*)
>> ../../gcc/gcc/rtl-error.c:109
>> 0xb0e75c _fatal_insn_not_found(rtx_def const*, char const*, int, char const*)
>> ../../gcc/gcc/rtl-error.c:117
>> 0xac552b extract_insn(rtx_def*)
>> ../../gcc/gcc/recog.c:2204
>> 0x8b919e instantiate_virtual_regs_in_insn
>> ../../gcc/gcc/function.c:1614
>> 0x8ba347 instantiate_virtual_regs
>> ../../gcc/gcc/function.c:1934
>> 0x8ba452 execute
>> ../../gcc/gcc/function.c:1983
>> Please submit a full bug report,
>> with preprocessed source if appropriate.
>> Please include the complete backtrace with any bug report.
>> See <http://gcc.gnu.org/bugs.html> for instructions.
>
> Is this test case (or a similar one) in the gcc test suite?
>
> If not, can you please add it to the test suite.
>
>>
>>
>> 2014-09-25 Chen Gang <gang.chen.5i5j@gmail.com>
>>
>> * config/microblaze/microblaze.md (call_internal1): Use VOID
>> instead of SI to fix "((void (*)(void)) 0)()" issue
>>
>> ---
>> 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 b971737..3b4faf4 100644
>> --- a/gcc/config/microblaze/microblaze.md
>> +++ b/gcc/config/microblaze/microblaze.md
>> @@ -2062,7 +2062,7 @@
>> (set_attr "length" "4")])
>>
>> (define_insn "call_internal1"
>> - [(call (mem (match_operand:SI 0 "call_insn_simple_operand" "ri"))
>> + [(call (mem (match_operand:VOID 0 "call_insn_simple_operand" "ri"))
>> (match_operand:SI 1 "" "i"))
>> (clobber (reg:SI R_SR))]
>> ""
>
> I've verified that your patch does not cause any test suite regressions.
>
>
--
Chen Gang
Open, share, and attitude like air, water, and life which God blessed
^ permalink raw reply [flat|nested] 8+ messages in thread
* [PATCH] microblaze: microblaze.md: Use VOID instead of SI to fix "((void (*)(void)) 0)()" issue
@ 2014-09-25 14:03 Chen Gang
2014-09-25 17:38 ` Michael Eager
` (2 more replies)
0 siblings, 3 replies; 8+ messages in thread
From: Chen Gang @ 2014-09-25 14:03 UTC (permalink / raw)
To: Michael Eager, Mike Stump; +Cc: Jeff Law, davem, gcc-patches List
Need use VOID instead of SI, or when real VOIDmode comes, it does not
match SImode, so cause issue. This patch can fix this issue and pass
testsuite.
The related test code ('void' will cause CALL instead of SET):
typedef void (*T)(void);
f1 ()
{
((T) 0)();
}
The related error:
[root@localhost gcc]# ./cc1 /tmp/calls.c -o /tmp/1.s
f1
Analyzing compilation unit
Performing interprocedural optimizations
<*free_lang_data> <visibility> <early_local_cleanups> <free-inline-summary> <whole-program> <inline>Assembling functions:
f1
/tmp/calls.c: In function 'f1':
/tmp/calls.c:5:1: error: unrecognizable insn:
}
^
(call_insn 5 2 8 2 (parallel [
(call (mem:SI (const_int 0 [0]) [0 MEM[(void (*<T29c>) (void))0B] S4 A32])
(const_int 24 [0x18]))
(clobber (reg:SI 15 r15))
]) /tmp/calls.c:4 -1
(nil)
(nil))
/tmp/calls.c:5:1: internal compiler error: in extract_insn, at recog.c:2204
0xb0e71b _fatal_insn(char const*, rtx_def const*, char const*, int, char const*)
../../gcc/gcc/rtl-error.c:109
0xb0e75c _fatal_insn_not_found(rtx_def const*, char const*, int, char const*)
../../gcc/gcc/rtl-error.c:117
0xac552b extract_insn(rtx_def*)
../../gcc/gcc/recog.c:2204
0x8b919e instantiate_virtual_regs_in_insn
../../gcc/gcc/function.c:1614
0x8ba347 instantiate_virtual_regs
../../gcc/gcc/function.c:1934
0x8ba452 execute
../../gcc/gcc/function.c:1983
Please submit a full bug report,
with preprocessed source if appropriate.
Please include the complete backtrace with any bug report.
See <http://gcc.gnu.org/bugs.html> for instructions.
2014-09-25 Chen Gang <gang.chen.5i5j@gmail.com>
* config/microblaze/microblaze.md (call_internal1): Use VOID
instead of SI to fix "((void (*)(void)) 0)()" issue
---
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 b971737..3b4faf4 100644
--- a/gcc/config/microblaze/microblaze.md
+++ b/gcc/config/microblaze/microblaze.md
@@ -2062,7 +2062,7 @@
(set_attr "length" "4")])
(define_insn "call_internal1"
- [(call (mem (match_operand:SI 0 "call_insn_simple_operand" "ri"))
+ [(call (mem (match_operand:VOID 0 "call_insn_simple_operand" "ri"))
(match_operand:SI 1 "" "i"))
(clobber (reg:SI R_SR))]
""
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [PATCH] microblaze: microblaze.md: Use VOID instead of SI to fix "((void (*)(void)) 0)()" issue
2014-09-25 14:03 Chen Gang
@ 2014-09-25 17:38 ` Michael Eager
2014-09-25 17:39 ` Michael Eager
2014-09-27 13:42 ` Michael Eager
2014-09-29 16:42 ` Michael Eager
2 siblings, 1 reply; 8+ messages in thread
From: Michael Eager @ 2014-09-25 17:38 UTC (permalink / raw)
To: Chen Gang, Mike Stump; +Cc: Jeff Law, davem, gcc-patches List
On 09/25/14 07:03, Chen Gang wrote:
> Need use VOID instead of SI, or when real VOIDmode comes, it does not
> match SImode, so cause issue. This patch can fix this issue and pass
> testsuite.
Did you forget to attach the patch?
--
Michael Eager eager@eagercon.com
1960 Park Blvd., Palo Alto, CA 94306 650-325-8077
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [PATCH] microblaze: microblaze.md: Use VOID instead of SI to fix "((void (*)(void)) 0)()" issue
2014-09-25 17:38 ` Michael Eager
@ 2014-09-25 17:39 ` Michael Eager
0 siblings, 0 replies; 8+ messages in thread
From: Michael Eager @ 2014-09-25 17:39 UTC (permalink / raw)
To: Chen Gang, Mike Stump; +Cc: Jeff Law, davem, gcc-patches List
On 09/25/14 10:38, Michael Eager wrote:
> On 09/25/14 07:03, Chen Gang wrote:
>> Need use VOID instead of SI, or when real VOIDmode comes, it does not
>> match SImode, so cause issue. This patch can fix this issue and pass
>> testsuite.
>
> Did you forget to attach the patch?
Never mind. My eyes were playing tricks on me.
--
Michael Eager eager@eagercon.com
1960 Park Blvd., Palo Alto, CA 94306 650-325-8077
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [PATCH] microblaze: microblaze.md: Use VOID instead of SI to fix "((void (*)(void)) 0)()" issue
2014-09-25 14:03 Chen Gang
2014-09-25 17:38 ` Michael Eager
@ 2014-09-27 13:42 ` Michael Eager
2014-09-29 16:42 ` Michael Eager
2 siblings, 0 replies; 8+ messages in thread
From: Michael Eager @ 2014-09-27 13:42 UTC (permalink / raw)
To: Chen Gang, Mike Stump; +Cc: Jeff Law, davem, gcc-patches List
On 09/25/14 07:03, Chen Gang wrote:
> Need use VOID instead of SI, or when real VOIDmode comes, it does not
> match SImode, so cause issue. This patch can fix this issue and pass
> testsuite.
>
> The related test code ('void' will cause CALL instead of SET):
>
> typedef void (*T)(void);
> f1 ()
> {
> ((T) 0)();
> }
>
> The related error:
>
> [root@localhost gcc]# ./cc1 /tmp/calls.c -o /tmp/1.s
> f1
> Analyzing compilation unit
> Performing interprocedural optimizations
> <*free_lang_data> <visibility> <early_local_cleanups> <free-inline-summary> <whole-program> <inline>Assembling functions:
> f1
> /tmp/calls.c: In function 'f1':
> /tmp/calls.c:5:1: error: unrecognizable insn:
> }
> ^
> (call_insn 5 2 8 2 (parallel [
> (call (mem:SI (const_int 0 [0]) [0 MEM[(void (*<T29c>) (void))0B] S4 A32])
> (const_int 24 [0x18]))
> (clobber (reg:SI 15 r15))
> ]) /tmp/calls.c:4 -1
> (nil)
> (nil))
> /tmp/calls.c:5:1: internal compiler error: in extract_insn, at recog.c:2204
> 0xb0e71b _fatal_insn(char const*, rtx_def const*, char const*, int, char const*)
> ../../gcc/gcc/rtl-error.c:109
> 0xb0e75c _fatal_insn_not_found(rtx_def const*, char const*, int, char const*)
> ../../gcc/gcc/rtl-error.c:117
> 0xac552b extract_insn(rtx_def*)
> ../../gcc/gcc/recog.c:2204
> 0x8b919e instantiate_virtual_regs_in_insn
> ../../gcc/gcc/function.c:1614
> 0x8ba347 instantiate_virtual_regs
> ../../gcc/gcc/function.c:1934
> 0x8ba452 execute
> ../../gcc/gcc/function.c:1983
> Please submit a full bug report,
> with preprocessed source if appropriate.
> Please include the complete backtrace with any bug report.
> See <http://gcc.gnu.org/bugs.html> for instructions.
Is this test case (or a similar one) in the gcc test suite?
If not, can you please add it to the test suite.
>
>
> 2014-09-25 Chen Gang <gang.chen.5i5j@gmail.com>
>
> * config/microblaze/microblaze.md (call_internal1): Use VOID
> instead of SI to fix "((void (*)(void)) 0)()" issue
>
> ---
> 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 b971737..3b4faf4 100644
> --- a/gcc/config/microblaze/microblaze.md
> +++ b/gcc/config/microblaze/microblaze.md
> @@ -2062,7 +2062,7 @@
> (set_attr "length" "4")])
>
> (define_insn "call_internal1"
> - [(call (mem (match_operand:SI 0 "call_insn_simple_operand" "ri"))
> + [(call (mem (match_operand:VOID 0 "call_insn_simple_operand" "ri"))
> (match_operand:SI 1 "" "i"))
> (clobber (reg:SI R_SR))]
> ""
I've verified that your patch does not cause any test suite regressions.
--
Michael Eager eager@eagercon.com
1960 Park Blvd., Palo Alto, CA 94306 650-325-8077
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [PATCH] microblaze: microblaze.md: Use VOID instead of SI to fix "((void (*)(void)) 0)()" issue
2014-09-25 14:03 Chen Gang
2014-09-25 17:38 ` Michael Eager
2014-09-27 13:42 ` Michael Eager
@ 2014-09-29 16:42 ` Michael Eager
2 siblings, 0 replies; 8+ messages in thread
From: Michael Eager @ 2014-09-29 16:42 UTC (permalink / raw)
To: Chen Gang, Mike Stump; +Cc: Jeff Law, davem, gcc-patches List
On 09/25/14 07:03, Chen Gang wrote:
> 2014-09-25 Chen Gang<gang.chen.5i5j@gmail.com>
>
gcc:
> * config/microblaze/microblaze.md (call_internal1): Use VOID
> instead of SI to fix "((void (*)(void)) 0)()" issue
gcc/testsuite/:
2014-09-28 Chen Gang <gang.chen.5i5j@gmail.com>
* gcc.c-torture/compile/calls-void.c: New test.
Committed revision 215684.
Thanks for adding the test case.
--
Michael Eager eager@eagercon.com
1960 Park Blvd., Palo Alto, CA 94306 650-325-8077
^ permalink raw reply [flat|nested] 8+ messages in thread
end of thread, other threads:[~2014-09-29 16:42 UTC | newest]
Thread overview: 8+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2014-09-25 23:40 [PATCH] microblaze: microblaze.md: Use VOID instead of SI to fix "((void (*)(void)) 0)()" issue Chen Gang
-- strict thread matches above, loose matches on Subject: below --
2014-09-27 19:09 Chen Gang
2014-09-28 4:25 ` Chen Gang
2014-09-25 14:03 Chen Gang
2014-09-25 17:38 ` Michael Eager
2014-09-25 17:39 ` Michael Eager
2014-09-27 13:42 ` Michael Eager
2014-09-29 16:42 ` Michael Eager
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).