Getting started
Craig C. Forney
cforney at opus.com
Tue Sep 16 03:54:00 CEST 2003
>
> 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.
>
Although I certainly don't understand all the implications, I changed
lines 211 and 212 to:
typedef unsigned int ulong_t;
typedef int long_t;
and made romcc on an Opteron based system running the 8.2 beta. Romcc
got further, but failed with the following:
console.c: 136.35: Incompatible types in initializer
As an experiment I went ahead and commented out the code in console.c
that it was complaining about. The next failure was a malloc error with
a HUGE malloc value ... So I gave up and built a PC with a standard
Intel 32-bit processor, reloaded everything, and romcc appears to work
just fine. It built a ROM image, at least.
I thought I might get lucky building on the Opteron system with the
changes, but not today.
Thanks for your help.
Regards,
Craig
==========================================================
Craig C. Forney email : cforney at opus.com
Opus Innovations LLC www : http://www.opus.com
==========================================================
More information about the coreboot
mailing list