I'm glad you posted about your efforts since I've also been working on solving related x86_64 build warnings caused by 32-bit int to 64-bit pointer conversions.
warning: cast to pointer from integer of different size There are a lot of these in syscall.c I have in my drafts folder an RFC I was planning to post detailing the issue (1,053 warnings in the x64_64 build) and how to resolve them - some simply require a cast from abi_long/unit32_t to a larger integer storage (same size as host-pointer-size) using the various pre-processor macros and typedefs so the compiler can do implicit conversion from the larger integer type to the pointer. I'll post what I've written so far so it can be considered in conjunction with your work. The title is "RFC: x86_64 Best way to fix 'cast to pointer from integer of different size' problems?" TJ.