6 Jan 2008 16:22
Changes to location/align/... code
Anders Magnusson <ragge <at> ludd.ltu.se>
2008-01-06 15:22:11 GMT
2008-01-06 15:22:11 GMT
Hi,
just a note for those interested in pcc internals:
I have now cleaned up how the location counters/naming/... in pcc works.
I have tried to fix it for some of the targets also but not sure I got
everything correct. ANyway, short description:
The following target-dependent routines will be called:
- defloc(struct symtab *sp);
Responsible to set up segments, alignment, name etc.
Will be called before initialized aggregates _and_ before each
function is written out. If called with sp == NULL, then
target should assume that everything is changed in a non-predictable
way (like after asm() statements).
- ninval()/infld()/zbits()
Same as now, may be called one or more times
Strings:
- instring(struct symtab *sp);
or
- inwstring(struct symtab *sp);
print out a string/wide string, stored in sname in sp.
defloc() is _not_ called before, but may be called from this
routine.
Uninitialized data:
- defzero(struct symtab *sp) /* New function */
Define the variable in bss or equivalent.
defloc() is _not_ called before, but may be called from this
routine.
-- Ragge
RSS Feed