Re: [PATCH] C undefined behavior fix

Paul Mackerras
2002-01-05T06:47:19Z

Lars Brinkhoff writes:

> This is true in the classic PDP-10 architecture, but would it
> really be worthwhile to run Linux in an 18-bit address space?.
>
> In the extended architecture, an int * is a 30-bit address, and the
> byte offset and size is encoded in the top 6 bits. This would be a
> more suitable target for Linux.

Wow, I didn't know that there was an extended PDP-10 architecture.
It's 25 years since I did anything on a PDP-10. :)

> When a pointer-to-integer conversion is made (or vice versa), GCC
> could generate code to convert between a PDP-10 hardware pointer and a
> linear byte address.

Would you use 9-bit bytes or 8-bit bytes? If you use 8-bit bytes then
there will be some bits in a word that aren't part of any byte. If
you use 9-bit bytes, I'm sure that somewhere in the kernel there will
be some code that will break because it is assuming 8-bit bytes.

> The KI10 has limited support for paging, but I don't remember the
> details. KL10 most definitely supports full paged virtual memory.

Somehow I'm getting the feeling that your next message is going to say
"actually, we have been running linux on the KL10 for the past 3
years". :)

Regards,
Paul.