[Bug c/60918] [mips] unaligned memory copy with LWL/LWR

Alex.Schoenberger at ies dot tu-darmstadt.de gcc-bugzilla@gcc.gnu.org
Tue Apr 22 10:21:00 GMT 2014


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=60918

--- Comment #2 from Alex.Schoenberger at ies dot tu-darmstadt.de ---
(In reply to Andrew Pinski from comment #1)

> Why processor are you running on that the
> result is incorrect.
The upper code illustrates the error only. 
Algorithm I'm working with has a bigger struct with many integer components.
Here for example, lets it be three integers and the memory content is:

@0: '00 '00 00 01
@4: 00 '00 '00 02
@8: 00 00 00 03

Memory copy to another struct fails in this case. LWL/LWR loads 0x00000000
(ticks marked) value and store it to new struct. This leads to erronous
execution some instructions later because value 0x00000001 is expected there.

> Also quote the mips32 isa of why you think lwl and lwr
> work the way think it works.

Sorry, didn't get it.



More information about the Gcc-bugs mailing list