Fix sign extension issues

Fix sign extension issues when reading and writing pointers to
int32_t fields.  Cast the pointer to a uint32_t to check if it
fits, and cast it through uintptr_t and uint32_t.

Bug: 36281983
Test: m -j test-art-host with LibartImgHostBaseAddress == 0xa0000000
Change-Id: Idec99dcb5a47f2633a4f14c98af8e23c46dc7052
2 files changed