Pointer 1<<34 doesn't make sense on 32-bit platforms.
The for loop in main, indeed the whole of main is just a test harness.
I need to simulate addresses that span the 32-bit boundary in 64-bit and slot size in both 32/64-bit.
I also don't see how you can get the same output on 32-bit and 64-bit platforms when ALIGN_BITS depends on the pointer size (sizeof(void*) >> 1i64). The data or ALIGN_BITS would need to be changed.
You are right that the output won't be the same in both modes.
The nice thing about the MS compiler intrinsic types is that my posted code compiles clean under /Wall in both modes. And runs, doing the 'right thing' in both modes. Albiet that the for loop never terminates in 32-bit mode due to wraparound.
The salient bit missing from your code is the conditional test for 32/64 bit compilation?
Also, what you've called NOP_BITS (which is unused) would be 3 or 4 (32/64 repectively) not 2.
Does your code produce the same output for 64-bit?
In reply to Re^2: 64-bit *nix/gcc expertise required
by BrowserUk
in thread 64-bit *nix/gcc expertise required (THIS IS NOT OFF TOPIC!)
by BrowserUk
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |