As Ive mentioned in a couple recent posts Im doing some work on an embedded PPC system, and I've been seeing a lot of interesting, and seemingly redundant code, eg:
ROM:00130930 lbz %r0, 2(%r3)
ROM:00130934 lbz %r9, 3(%r3)
ROM:00130938 lbz %r0, 2(%r3)
ROM:0013093C slwi %r9, %r9, 8
ROM:00130940 or %r11, %r9, %r0
Simple code that makes r11 = (r3+3)(r3+2). R3 is a memory buffer in this case. The first and 3rd line appear to do exactly the same thing, and I'm curious if anyone can give some insight into why it would do that, outside of odd compiler behavior.
Thanks,







