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]

Re: Access size problem on ARM architecture


>No warnings or errors are displayed.
>The generated assembly file contains:
>
>        ldr    r3, [r2, #24]!  @ loadhi
>
>which is wrong since r3 is loaded with a 32 bit value instead of 16 bit.
>This leads to wrong behaviour of the while statement.

You should find that this instruction is followed by:

	mov	r3, r3, lsl #16
	cmp	r0, e3, lsr #16

or some similar construct that drops the unwanted bits from the register.
If you are seeing genuinely wrong behaviour, please post a complete testcase 
that exhibits the problem.

p.



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