This is the mail archive of the gcc-bugs@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[Bug target/65510] target-tic6x: unrecognizable insn with -O(1,2,3,s).


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.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]