News for hackers. Stuff that matters.
Re: by Dylan16807 on Sunday March 05, 2023 @01:40PM (#35032562)
> There is no 48 bit register nor can you make a 48 bit register via a 32 and 16 bit load, you'd still have a 64 bit register you wrote 48 bits into it's just you've assumed you're going to be using only the lower half of the mapping so 0x0000... is a valid sign-extension. If you were trying to access the other half of addressable memory that doesn't work though.

You need to shift some of the bits into place. If you shift the correct way it'll sign extend with 0x0000 or 0xffff as appropriate.

> it's not the same thing as the bits being extended for you

Yes you have to tell the CPU to sign extend. I wasn't trying to say otherwise. But you don't have to load those bits from anywhere. You only have to load 48 bits from memory.

> The only explanation is the full value is being sent. If only 48 bits were sent to the MMU

It's possible the verification happens pre-MMU, but either way as soon as those bits are verified they get discarded. Only 48 bits are used for any functionality.

> and it signed extended automatically

Well again I wasn't saying that. The program needs to ask for the sign extension.

Re: by zamadatix on Sunday March 05, 2023 @05:49PM (#35035043)
In your high level logic you can treat memory addresses 17 bits and transform them into 64 bit memory addresses on actual load but that doesn't mean the architecture uses 17 bit memory addresses it just means you're generating the addresses on the fly.

> It's still possible the verification happens pre-MMU

It's also possible there is a teapot in orbit between Earth and Mars but as far as actual x86 CPUs they don't deal with MARs (memory address registers) which would have that kind of logic, which is probably a good thing given all the different memory modes multiplied by the number of registers you can use. There are AGUs in newer x86 CPUs (well at least Intel, I assume in AMD) which offload common memory offset calculations but they take and return the standard register load size.

That only 48 bits are only used for any functionality is a fair description though, assuming we're still excluding newer 57 bit CPUs. The main thing I was taking issue with was your initial statement "With 48 bits as a hard limit of what fits into a register" not how many bits of the register or memory address are functionally meaningful.

Re: by Dylan16807 on Sunday March 05, 2023 @06:14PM (#35035253)
> The main thing I was taking issue with was your initial statement "With 48 bits as a hard limit of what fits into a register" not how many bits of the register or memory address are functionally meaningful.

Oh, Oh!

That was a hypothetical talking about 48 bit CPUs that grew out of 12 bit CPUs.

That's why I said 384 tera-octets and something we would stick with.

Re: by zamadatix on Sunday March 05, 2023 @09:55PM (#35037008)
Makes sense :) thanks