#include extern void test64(void); /* test function */ /* Test data. Our test code will copy foo to bar, with 64 bit operations */ uint64_t foo = 0x1234567890abcdefULL; uint64_t bar = 0; /* * 32 bit pointers to test data. Set up as a command block since binutils * has a hissy fit otherwise. In real life, this would be a * command, arg1, arg2, arg3, ... type thing. */ uint64_t *cmdp[] = { &foo, &bar }; extern void to32(void); /* helper, trampoline code */ extern void to64(void); /* helper, trampoline code */ uint32_t to32p = (uint32_t)&to32; /* helper, pointer to jump address */ uint32_t to64p = (uint32_t)&to64; /* helper, pointer to jump address */ main() { printf("before, foo:0x%016jx, bar:0x%016jx\n", foo, bar); test64(); printf("after, foo:0x%016jx, bar:0x%016jx\n", foo, bar); }