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
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.
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?
-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
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)
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
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=99847
⎓ changed:
What|Removed |Added
Status|WAITING |RESOLVED
Resolution|---