Getting started
Eric W. Biederman
ebiederman at lnxi.com
Mon Sep 15 15:38:00 CEST 2003
Stefan Reinauer <stepan at suse.de> writes:
> * 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.
Ok. That looks like an easy mistake to make and it sounds reasonable
that it exists.
> 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.
That is where I want to go eventually. For now which ever is most convenient.
I have been doing my best to abstract things so I can add additional ports
without too much trouble but I have not been worry about it very much.
Eric
More information about the coreboot
mailing list