This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug target/65510] target-tic6x: unrecognizable insn with -O(1,2,3,s).
- From: "gang.chen.5i5j at gmail dot com" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: Wed, 25 Mar 2015 15:45:10 +0000
- Subject: [Bug target/65510] target-tic6x: unrecognizable insn with -O(1,2,3,s).
- Auto-submitted: auto-generated
- References: <bug-65510-4 at http dot gcc dot gnu dot org/bugzilla/>
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=65510
--- Comment #3 from Chen Gang <gang.chen.5i5j at gmail dot com> ---
(In reply to Chen Gang from comment #2)
> For test.i:
>
> int oxu_driver_init(void)
> {
> *(volatile unsigned int *)(-1) = *(unsigned int *)(-1);
> }
>
> If test.i use a valid number (>= 0x10) or normal variable instead of "-1",
> it will be OK (the insns are almost the same between using valid numbers and
> using variable).
>
> If test.i use 0 (NULL) instead of "-1", it will be OK, too, but it will
> generate an abort() insn for it (unlike valid numbers' and variable's insn).
>
> If test.i se invalid number (e.g. -2, -1, 0x1, 0x2 ... 0xf), it will
> generate a different insn which can not be recognized by MD file.
>
>
> So for me, we need process the left invalid numbers just as processing 0
> (NULL) -- generate an abort() insn for them.
Oh, sorry, the contents above is incorrect, it is about memory alignment issue.
If the alignment is less than 32, it will cause issue. e.g. 0, 4, 8, 16, 20,
pointer parameter ... are all OK, but the other will cause issue.