[Bug target/69051] New: Misaligned read from the stack when using odd sized character array

2015-12-25 Thread m.frohiky at gmail dot com
Priority: P3 Component: target Assignee: unassigned at gcc dot gnu.org Reporter: m.frohiky at gmail dot com Target Milestone: --- This simple code: void filler(unsigned char *blk); long f(void) { unsigned char blk[65]; filler(blk

[Bug target/69051] Misaligned read from the stack when using odd sized character array

2015-12-25 Thread m.frohiky at gmail dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=69051 --- Comment #2 from ⎓ --- After the move.l line, address error exception is executed. And that is expected as that line tries to access 32 bit word from an odd address.

[Bug target/69051] Misaligned read from the stack when using odd sized character array

2015-12-25 Thread m.frohiky at gmail dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=69051 --- Comment #4 from ⎓ --- Whoops! I didn't expect that because I was relying on the -m68000 flag. Then I'll have to try with that compiler. Maybe there should be a warning for using an unsupported CPU architecture?

[Bug rtl-optimization/99847] New: Optimization breaks alignment on CPU32

2021-03-31 Thread m.frohiky at gmail dot com via Gcc-bugs
-optimization Assignee: unassigned at gcc dot gnu.org Reporter: m.frohiky at gmail dot com Target Milestone: --- For CPU32 architecture optimizes two byte accesses into a single word access, without any regard that the original array may be unaligned. So this code: void ntoh

[Bug target/99847] Optimization breaks alignment on CPU32

2021-03-31 Thread m.frohiky at gmail dot com via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=99847 --- Comment #2 from ⎓ --- The same thing is with other way around. I.e.: void ntoh(uint16_t idata, uint8_t *odata) { odata[0] = idata >> 8; odata[1] = idata & 0xff; } results with: move.l 8(%sp),%a0 move.w 6(%sp),(%a0)

[Bug target/99847] Optimization breaks alignment on CPU32

2021-03-31 Thread m.frohiky at gmail dot com via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=99847 --- Comment #4 from ⎓ --- Hmm... I was hoping to get away with the readily available compiler, and I thought that it's actually used for CPU32. Ok, I'll try then with a specific one tomorrow. But still, ABI can't request that all bytes in a uint

[Bug target/99847] Optimization breaks alignment on CPU32

2021-04-01 Thread m.frohiky at gmail dot com via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=99847 ⎓ changed: What|Removed |Added Status|WAITING |RESOLVED Resolution|---