On 8 January 2013 23:15, Walter Bright <[email protected]> wrote:
> On 1/8/2013 5:49 AM, Iain Buclaw wrote: > >> Would a target.h header be fine for this? Or do you have somewhere else >> in mind. >> > > I think a target.h/target.c would be a good addition. In general, I'd like > to see all #ifdef's removed from the main dmd source code. Host and target > specific behaviors should be abstracted out, like what root/port.h attempts > to do. > > OK, well I've started it off with Target::typesize, ::typealign, ::fieldalign. Maybe also ::fieldoffset, though gdc currently uses the D frontend code to get that that with no known issues (only way to find out is when we start expanding D2 to more targets). And left it with the comment: This file contains a data structure that describes a back-end target. At present it is incomplete, but in future it should grow to contain most or all target machine and target O/S specific information. Regards -- Iain Buclaw *(p < e ? p++ : p) = (c & 0x0f) + '0';
