[MLton] x86_64 port status
Matthew Fluet
fluet@cs.cornell.edu
Mon, 8 May 2006 17:32:54 -0400 (EDT)
>>> What do you think of my suggestion of automatically defining PRIxPTR
>>> in c-types.h?
>>
>> That's reasonable, although I think it is equally reasonable to use
>> platform/<os>.h. The auto-generation is convenient, but I think that it
>> will very soon quiesce, and we should be interested in situations where
>> the auto-generated sizes don't equal the sizes we've seen on other
>> instances of that platform. In other words, do you really think it
>> reasonable to expect sparc-solaris to work unmodified on 32-bit sparcs and
>> 64-bit sparcs?
>
> No. My thought was that the reasoning for conditionally defining
> PRIxPTR correctly is independent of OS, could be shared across all
> platforms, and that the information is available in gen-types.c. How
> would you like the #if to look in platform/solaris.h to handle the two
> possibilities (32-bit or 64-bit)?
I guess defining PRIxPTR in gen-types.c makes sense. But, I see
gen-types.c as a porting tool, not a tool for each compile. If
sparc-solaris denotes a 32-bit platform, then define PRIxPTR in solaris.h
(or sparc.h) to be "x"; if it denotes a 64-bit platform, then define
PRIxPTR to be "llx"; If the sparc-solaris platform could denote either a
32 or a 64 bit platform, then we need a third component to platform, and
the defintion of PRIxPTR belongs there.