[M3devel] Target.i3/Target.m3 reduction?
jay.krell at cornell.edu
Thu Nov 3 07:24:54 CET 2011
There is fairly little target-dependent-ness in our system, aside from the gcc code.
I would like to reduce it.
There are a few forms:
There is dependency on word size.
This I don't see removing any time soon, given
that the front end does layout of records and
computation of field offsets.
There is dependency on jumpbuf size.
We mostly know how to remove this, but have failed so far.
The generated code should use alloca for the locals.
(and even then, longer term, don't use setjmp/longjmp).
We have these big arrays of targets, esp. in m3middle/src/Target.i3:
Many of the dependencies are really per architecture or per kernel,
not per architecture x kernel combination.
So this almost-cross product seems dumb.
There is dependency on endianness.
This is what I'm really focusing on.
I think this only matters for interop with C bitfields.
We have no C bitfields in our system now.
And the frontend and backend I think have to agree...oh, nevermind, I don't see that in parse.c
Just be safe and assume this is always false?
Or it is a nice optimization on the common x86/AMD64 platforms?
Just hardcode this as 4K?
Instead of the slight optimization of setting it to 8K for SPARC?
The safe value here is false.
We set it to true only for x86/AMD64.
I think true is probably safe for all architectures but older Alphas.
This has the same value on platforms except VMS.
We can maybe provide a portably-named wrapper?
Maybe not, since this function is kind of special.
I have to go..
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the M3devel