Hi Eric,
I recently added the function smbus_write_byte() to src/southbridge/amd/amd8111/amd8111_early_smbus.c. if the code within #if 0 in that function is enabled, I get the following internal compiler error:
./romcc -mcpu=k8 -O ./auto.E > auto.inc <built-in>:1.0: warning: edge: <built-in>:1.0: warning: 0x2fe7e40 __inw amd8111_early_smbus.c:120.39: warning: edge: amd8111_early_smbus.c:120.39: warning: 0x2fe80e0 copy <built-in>:1.0: warning: edge: <built-in>:1.0: warning: 0x3126060 copy <built-in>:1.0: warning: edge: <built-in>:1.0: warning: 0x2fea8d0 __inw amd8111_early_smbus.c:125.63: warning: edge: amd8111_early_smbus.c:125.63: warning: 0x2feab70 copy <built-in>:1.0: warning: edge: <built-in>:1.0: warning: 0x2feba50 __inw io.h:39.1: warning: edge: io.h:39.1: warning: 0x2febb70 copy amd8111_early_smbus.c:128.48: warning: 0x2febcf0 copy <built-in>:1.0: warning: edge: <built-in>:1.0: warning: 0x2fe6450 __inw auto.c:102.45: warning: def: auto.c:102.45: warning: 0x2fe5020 copy amd8111_early_smbus.c:131.33: warning: 0x2fec520 copy auto.c:102.45: 0x2fe5020 copy Internal compiler error: live range with already used color %ax
Is the code running out of registers? What's happening here?
Stefan
Stefan Reinauer stepan@suse.de writes:
Hi Eric,
I recently added the function smbus_write_byte() to src/southbridge/amd/amd8111/amd8111_early_smbus.c. if the code within #if 0 in that function is enabled, I get the following internal compiler error:
./romcc -mcpu=k8 -O ./auto.E > auto.inc <built-in>:1.0: warning: edge: <built-in>:1.0: warning: 0x2fe7e40 __inw amd8111_early_smbus.c:120.39: warning: edge: amd8111_early_smbus.c:120.39: warning: 0x2fe80e0 copy <built-in>:1.0: warning: edge: <built-in>:1.0: warning: 0x3126060 copy <built-in>:1.0: warning: edge: <built-in>:1.0: warning: 0x2fea8d0 __inw amd8111_early_smbus.c:125.63: warning: edge: amd8111_early_smbus.c:125.63: warning: 0x2feab70 copy <built-in>:1.0: warning: edge: <built-in>:1.0: warning: 0x2feba50 __inw io.h:39.1: warning: edge: io.h:39.1: warning: 0x2febb70 copy amd8111_early_smbus.c:128.48: warning: 0x2febcf0 copy <built-in>:1.0: warning: edge: <built-in>:1.0: warning: 0x2fe6450 __inw auto.c:102.45: warning: def: auto.c:102.45: warning: 0x2fe5020 copy amd8111_early_smbus.c:131.33: warning: 0x2fec520 copy auto.c:102.45: 0x2fe5020 copy Internal compiler error: live range with already used color %ax
Is the code running out of registers? What's happening here?
Yes the compiler ran out of registers.
Although in this case it looks like this was cause by a compiler bug.
The compiler tried to assign %ax to two variables simultaneously.
Eric
* Eric W. Biederman ebiederman@lnxi.com [031007 23:00]:
Stefan Reinauer stepan@suse.de writes:
./romcc -mcpu=k8 -O ./auto.E > auto.inc <built-in>:1.0: warning: edge: <built-in>:1.0: warning: 0x2fe7e40 __inw amd8111_early_smbus.c:120.39: warning: edge: amd8111_early_smbus.c:120.39: warning: 0x2fe80e0 copy <built-in>:1.0: warning: edge: <built-in>:1.0: warning: 0x3126060 copy <built-in>:1.0: warning: edge: <built-in>:1.0: warning: 0x2fea8d0 __inw amd8111_early_smbus.c:125.63: warning: edge: amd8111_early_smbus.c:125.63: warning: 0x2feab70 copy <built-in>:1.0: warning: edge: <built-in>:1.0: warning: 0x2feba50 __inw io.h:39.1: warning: edge: io.h:39.1: warning: 0x2febb70 copy amd8111_early_smbus.c:128.48: warning: 0x2febcf0 copy <built-in>:1.0: warning: edge: <built-in>:1.0: warning: 0x2fe6450 __inw auto.c:102.45: warning: def: auto.c:102.45: warning: 0x2fe5020 copy amd8111_early_smbus.c:131.33: warning: 0x2fec520 copy auto.c:102.45: 0x2fe5020 copy Internal compiler error: live range with already used color %ax
Is the code running out of registers? What's happening here?
Yes the compiler ran out of registers.
Although in this case it looks like this was cause by a compiler bug.
The compiler tried to assign %ax to two variables simultaneously.
Hm. ok. Does this code suite you as a testsuite, or can I do anything to provide such?
Stefan
Stefan Reinauer stepan@suse.de writes:
Hm. ok. Does this code suite you as a testsuite, or can I do anything to provide such?
If you can find the minimal sequence of code that causes this error I would appreciate it.
That is how must of my test cases have been built of for romcc. I find a bug and then strip it down as far as I can go. A number of cases actually involve some pretty subtle interactions between the various pieces so finding a minimal case might be tricky.
I suggest you start with the preprocessed output and go from there.
I have a major bugfix release sitting in the wings that I will get out shortly. I have tested everything except if LinuxBIOS itself will compile with it :)
Do you need smbus_write_byte to set the position of the i2c mux?
Eric
* Eric W. Biederman ebiederman@lnxi.com [031009 03:50]:
Do you need smbus_write_byte to set the position of the i2c mux?
yes
Stefan