Using: ldc rev 1099
Targeting: x86-64
In Production: xomb:kernel/dev/console:line_65
Note that the print outputs 0xb8000.
First, the code:
void foo() { ubyte* ptr = cast(ubyte*)0xffff8000000b8000UL; }
Produces:
movq $0xb8000, (%RBX) (gas)
mov [RBX], 0xb8000 (intel)
Most likely a backend issue, when targeting 64 bit code, a 64 bit (note that here it is a sign extended 48 bit immediate) assignment to a pointer will be truncated to be a 32 bit operation.
Workaround:
void foo() { ulong ptrVal = 0xffff8000000b8000UL; ubyte* ptr = cast(ubyte*)ptrVal; }