[ECOS] 64 bit mips arch, and __DEVTAB__

Jonathan Larmour jlarmour@redhat.co.uk
Wed Jul 12 16:50:00 GMT 2000


Gary Thomas wrote:
> 
> On 12-Jul-2000 Chris Morrow wrote:
> > I'm working on porting eCos to a 64 bit mips cpu and have encountered
> > a problem with the DEVTAB_ENTRY macro defined in
> > io/common/current/include/devtab.h. It would appear that gcc is aligning
> > each piece of data added to the .devtab section on 8 byte boundries.
[snip]

OOI I thought it would be interesting to see what gcc does here, with the
constructor lists. In config/mips/elf64.h it has:

#define ASM_OUTPUT_CONSTRUCTOR(FILE,NAME)                             \
  do {                                                                \
    ctors_section ();                                                 \
    fprintf (FILE, "\t%s\t", (Pmode == SImode) ? ".word" : ".dword"); \
    assemble_name (FILE, NAME);                                       \
    fprintf (FILE, "\n");                                             \
  } while (0)

So it explicitly uses assembler. It might be interesting to look at bug.s
(generated by compiling with --save-temps ) and check that it is gcc adding
the alignments itself, and not the assembler. Perhaps Chris can send the
appropriate extract, since it will only take him a second.

Jifl
-- 
Red Hat, 35 Cambridge Place, Cambridge, UK. CB2 1NS  Tel: +44 (1223) 728762
"Plan to be spontaneous tomorrow."  ||  These opinions are all my own fault


More information about the Ecos-discuss mailing list