Getting started

Stefan Reinauer stepan at suse.de
Mon Sep 15 08:10:01 CEST 2003


* Eric W. Biederman <ebiederman at lnxi.com> [030915 13:10]:
> Ron how so?  If romcc compiles it should work.  I don't have any
> excuse for romcc to behave different depending on what compiler
> compiles it.

But there is a difference in the resulting romcc depending on whether
you compile it for AMD64 or IA32. I tracked it down to lines 211 and
212:
    /* Long on the destination platform */
    typedef unsigned long ulong_t;
    typedef long long_t;

The IA32 version of the size_of() function will return 4 when it gets a
pointer or a long, whereas the AMD64 version will return 8. 

The function transform_to_arch_instruction checks the result of
size_of() in the OP_COPY branch of the big case statement and fails with
an internal compiler error if the size is not 1, 2 or 4.

Since IA32 code (including AMD64 special registers) is the only target
platform currently supported, it should be OK to change above typedefs
to 4 byte types. If this seems not appropriate it might make sense to
seperate the platform dependent code into several files and have an
additional target for AMD64 long mode.

  Stefan

-- 
Architecture Team
    SuSE Linux AG



More information about the coreboot mailing list