Re: [wip/cagney_regbuf-20020515-branch] Introduce regcache_move()

Andrew Cagney
2002-05-18T18:27:24Z

> rearnsha@arm.com said:
>
>> Write_register_bytes will then overwrite the raw value in the cache
>> without any regard to the masking operations that should be occuring
>> when updating R15; the CPSR bits in the PC are just clobbered and we
>> are left with a broken value in the R15 register.
>
>
> Actually, this isn't a strict description of what happens (though the
> result is pretty much the same). What really happens is that
> write_register_byte will then call write_register_gen for each register
> that returns a REGISTER_BYTE() address in the same range. The result is
> that write_register_bytes calls
>
> write_register_gen(PC, newval)
> write_register_gen(CPSR, newval)
>
> which is still equally bogus.

Yep, and the second write won't do anything. Code will detect that the
location is already up-to-date and supress the write through.

Feel free to express total disbelief! :-)

REGISTER_BYTE is also on the hit-list.

Andrew