From Jeffrey.A.Boyce at carrier.utc.com Wed Aug 17 20:32:42 2011 From: Jeffrey.A.Boyce at carrier.utc.com (Boyce, Jeffrey A CAR) Date: Wed, 17 Aug 2011 16:32:42 -0400 Subject: insn does not satisfy its constraints Message-ID: <6D33C4BCDBCCFC478D604EF39B60F17802CC9FF8@UUSNWEJ1.na.utcmail.com> <> Hello, I'm getting the following compiler error when attempting to compile Kaffe 1.1.8 for Coldfire (54418): methodcalls.c: In function 'engine_callMethod': methodcalls.c:225:1: error: insn does not satisfy its constraints: (insn 599 398 400 47 ../../../config/md.h:99 (set (reg:DF 0 %d0) (reg:DF 16 %fp0)) 52 {movdf_cf_soft} (nil)) methodcalls.c:225:1: internal compiler error: in reload_cse_simplify_operands, at postreload.c:403 Please submit a full bug report, with preprocessed source if appropriate. See for instructions. Methodcalls.c is attached. This happens using both 4.4.1 and 4.5.2 (2011.03-98) versions of the compilers. CFLAGS are as follows: -mcpu=54418 -msoft-float -march=isac -Wall -W -Wextra -fno-strict-aliasing -fno-omit-frame-pointer -O1 -pthread Any ideas what could be causing this error? Thanks, Jeff -------------- next part -------------- A non-text attachment was scrubbed... Name: methodcalls.c Type: application/octet-stream Size: 5427 bytes Desc: methodcalls.c URL: From maxim at codesourcery.com Sun Aug 21 06:45:01 2011 From: maxim at codesourcery.com (Maxim Kuvyrkov) Date: Sun, 21 Aug 2011 18:45:01 +1200 Subject: [coldfire-gnu-discuss] insn does not satisfy its constraints In-Reply-To: <6D33C4BCDBCCFC478D604EF39B60F17802CC9FF8@UUSNWEJ1.na.utcmail.com> References: <6D33C4BCDBCCFC478D604EF39B60F17802CC9FF8@UUSNWEJ1.na.utcmail.com> Message-ID: <10657EFD-77B6-4CFC-9C68-6EF53BDD1BD6@codesourcery.com> Jeffrey, Please attach the preprocessed source file so that we can reproduce the problem on our side. You can get the preprocessed example by adding -save-temps to the command line -- the preprocessed source will be saved in a .i file. It seems something causes the compiler to generate code that uses a floating point register for a soft-fp target. Thank you, -- Maxim Kuvyrkov CodeSourcery / Mentor Graphics On Aug 18, 2011, at 8:32 AM, Boyce, Jeffrey A CAR wrote: > <> Hello, > > I'm getting the following compiler error when attempting to compile Kaffe 1.1.8 for Coldfire (54418): > > methodcalls.c: In function 'engine_callMethod': > methodcalls.c:225:1: error: insn does not satisfy its constraints: > (insn 599 398 400 47 ../../../config/md.h:99 (set (reg:DF 0 %d0) > (reg:DF 16 %fp0)) 52 {movdf_cf_soft} (nil)) > methodcalls.c:225:1: internal compiler error: in reload_cse_simplify_operands, at postreload.c:403 > Please submit a full bug report, > with preprocessed source if appropriate. > See for instructions. > > Methodcalls.c is attached. This happens using both 4.4.1 and 4.5.2 (2011.03-98) versions of the compilers. CFLAGS are as follows: > > -mcpu=54418 -msoft-float -march=isac -Wall -W -Wextra -fno-strict-aliasing -fno-omit-frame-pointer -O1 -pthread > > Any ideas what could be causing this error? > > > Thanks, > > > Jeff > > From Jeffrey.A.Boyce at carrier.utc.com Mon Aug 22 12:21:54 2011 From: Jeffrey.A.Boyce at carrier.utc.com (Boyce, Jeffrey A CAR) Date: Mon, 22 Aug 2011 08:21:54 -0400 Subject: [coldfire-gnu-discuss] insn does not satisfy its constraints In-Reply-To: <10657EFD-77B6-4CFC-9C68-6EF53BDD1BD6@codesourcery.com> References: <6D33C4BCDBCCFC478D604EF39B60F17802CC9FF8@UUSNWEJ1.na.utcmail.com> <10657EFD-77B6-4CFC-9C68-6EF53BDD1BD6@codesourcery.com> Message-ID: <6D33C4BCDBCCFC478D604EF39B60F17802CCA7FE@UUSNWEJ1.na.utcmail.com> Maxim, Please see attached. Thanks, Jeff -----Original Message----- From: Maxim Kuvyrkov [mailto:maxim at codesourcery.com] Sent: Sunday, August 21, 2011 2:45 AM To: Boyce, Jeffrey A CAR Cc: coldfire-gnu-discuss at codesourcery.com Subject: Re: [coldfire-gnu-discuss] insn does not satisfy its constraints Jeffrey, Please attach the preprocessed source file so that we can reproduce the problem on our side. You can get the preprocessed example by adding -save-temps to the command line -- the preprocessed source will be saved in a .i file. It seems something causes the compiler to generate code that uses a floating point register for a soft-fp target. Thank you, -- Maxim Kuvyrkov CodeSourcery / Mentor Graphics On Aug 18, 2011, at 8:32 AM, Boyce, Jeffrey A CAR wrote: > <> Hello, > > I'm getting the following compiler error when attempting to compile Kaffe 1.1.8 for Coldfire (54418): > > methodcalls.c: In function 'engine_callMethod': > methodcalls.c:225:1: error: insn does not satisfy its constraints: > (insn 599 398 400 47 ../../../config/md.h:99 (set (reg:DF 0 %d0) > (reg:DF 16 %fp0)) 52 {movdf_cf_soft} (nil)) > methodcalls.c:225:1: internal compiler error: in reload_cse_simplify_operands, at postreload.c:403 > Please submit a full bug report, > with preprocessed source if appropriate. > See for instructions. > > Methodcalls.c is attached. This happens using both 4.4.1 and 4.5.2 (2011.03-98) versions of the compilers. CFLAGS are as follows: > > -mcpu=54418 -msoft-float -march=isac -Wall -W -Wextra -fno-strict-aliasing -fno-omit-frame-pointer -O1 -pthread > > Any ideas what could be causing this error? > > > Thanks, > > > Jeff > > -------------- next part -------------- A non-text attachment was scrubbed... Name: methodcalls.i Type: application/octet-stream Size: 271877 bytes Desc: methodcalls.i URL: From maxim at codesourcery.com Mon Aug 22 16:28:22 2011 From: maxim at codesourcery.com (Maxim Kuvyrkov) Date: Tue, 23 Aug 2011 04:28:22 +1200 Subject: [coldfire-gnu-discuss] insn does not satisfy its constraints In-Reply-To: <6D33C4BCDBCCFC478D604EF39B60F17802CCA7FE@UUSNWEJ1.na.utcmail.com> References: <6D33C4BCDBCCFC478D604EF39B60F17802CC9FF8@UUSNWEJ1.na.utcmail.com> <10657EFD-77B6-4CFC-9C68-6EF53BDD1BD6@codesourcery.com> <6D33C4BCDBCCFC478D604EF39B60F17802CCA7FE@UUSNWEJ1.na.utcmail.com> Message-ID: <6629AE01-79E3-4CCD-BC00-07AE78ABDE18@codesourcery.com> Jeff, This appears to be a bug in the source code rather than in the compiler. The sysdepCallMethod() function explicitly refers to the FP0 register via 'register double f0d asm ("fp0")' statement, and this causes the compiler to fail when compiling for FPU-less ColdFire target. Regards, -- Maxim Kuvyrkov CodeSourcery / Mentor Graphics On Aug 23, 2011, at 12:21 AM, Boyce, Jeffrey A CAR wrote: > Maxim, > > Please see attached. > > > Thanks, > > Jeff > > > -----Original Message----- > From: Maxim Kuvyrkov [mailto:maxim at codesourcery.com] > Sent: Sunday, August 21, 2011 2:45 AM > To: Boyce, Jeffrey A CAR > Cc: coldfire-gnu-discuss at codesourcery.com > Subject: Re: [coldfire-gnu-discuss] insn does not satisfy its constraints > > Jeffrey, > > Please attach the preprocessed source file so that we can reproduce the problem on our side. You can get the preprocessed example by adding -save-temps to the command line -- the preprocessed source will be saved in a .i file. > > It seems something causes the compiler to generate code that uses a floating point register for a soft-fp target. > > Thank you, > > -- > Maxim Kuvyrkov > CodeSourcery / Mentor Graphics > > On Aug 18, 2011, at 8:32 AM, Boyce, Jeffrey A CAR wrote: > >> <> Hello, >> >> I'm getting the following compiler error when attempting to compile Kaffe 1.1.8 for Coldfire (54418): >> >> methodcalls.c: In function 'engine_callMethod': >> methodcalls.c:225:1: error: insn does not satisfy its constraints: >> (insn 599 398 400 47 ../../../config/md.h:99 (set (reg:DF 0 %d0) >> (reg:DF 16 %fp0)) 52 {movdf_cf_soft} (nil)) >> methodcalls.c:225:1: internal compiler error: in reload_cse_simplify_operands, at postreload.c:403 >> Please submit a full bug report, >> with preprocessed source if appropriate. >> See for instructions. >> >> Methodcalls.c is attached. This happens using both 4.4.1 and 4.5.2 (2011.03-98) versions of the compilers. CFLAGS are as follows: >> >> -mcpu=54418 -msoft-float -march=isac -Wall -W -Wextra -fno-strict-aliasing -fno-omit-frame-pointer -O1 -pthread >> >> Any ideas what could be causing this error? >> >> >> Thanks, >> >> >> Jeff >> >> > > From maxim at codesourcery.com Mon Aug 22 19:05:55 2011 From: maxim at codesourcery.com (Maxim Kuvyrkov) Date: Tue, 23 Aug 2011 07:05:55 +1200 Subject: [coldfire-gnu-discuss] insn does not satisfy its constraints In-Reply-To: <6629AE01-79E3-4CCD-BC00-07AE78ABDE18@codesourcery.com> References: <6D33C4BCDBCCFC478D604EF39B60F17802CC9FF8@UUSNWEJ1.na.utcmail.com> <10657EFD-77B6-4CFC-9C68-6EF53BDD1BD6@codesourcery.com> <6D33C4BCDBCCFC478D604EF39B60F17802CCA7FE@UUSNWEJ1.na.utcmail.com> <6629AE01-79E3-4CCD-BC00-07AE78ABDE18@codesourcery.com> Message-ID: <7A06DC45-ECE7-4298-B050-50AB61F4C9F7@codesourcery.com> Jeff, I realized that I didn't give you the pointers to fix the code. To make code compile (and work) for FPU-less ColdFire, such as MCF544xx families, you need to condition the references to FPU registers in Kaffe's md.h file. You can use builtin compiler macros for that: #if !defined (__mcoldfire__) || defined (__mcffpu__) #else #endif Regards, -- Maxim Kuvyrkov CodeSourcery / Mentor Graphics On Aug 23, 2011, at 4:28 AM, Maxim Kuvyrkov wrote: > Jeff, > > This appears to be a bug in the source code rather than in the compiler. The sysdepCallMethod() function explicitly refers to the FP0 register via 'register double f0d asm ("fp0")' statement, and this causes the compiler to fail when compiling for FPU-less ColdFire target. > > Regards, > > -- > Maxim Kuvyrkov > CodeSourcery / Mentor Graphics > > On Aug 23, 2011, at 12:21 AM, Boyce, Jeffrey A CAR wrote: > >> Maxim, >> >> Please see attached. >> >> >> Thanks, >> >> Jeff >> >> >> -----Original Message----- >> From: Maxim Kuvyrkov [mailto:maxim at codesourcery.com] >> Sent: Sunday, August 21, 2011 2:45 AM >> To: Boyce, Jeffrey A CAR >> Cc: coldfire-gnu-discuss at codesourcery.com >> Subject: Re: [coldfire-gnu-discuss] insn does not satisfy its constraints >> >> Jeffrey, >> >> Please attach the preprocessed source file so that we can reproduce the problem on our side. You can get the preprocessed example by adding -save-temps to the command line -- the preprocessed source will be saved in a .i file. >> >> It seems something causes the compiler to generate code that uses a floating point register for a soft-fp target. >> >> Thank you, >> >> -- >> Maxim Kuvyrkov >> CodeSourcery / Mentor Graphics >> >> On Aug 18, 2011, at 8:32 AM, Boyce, Jeffrey A CAR wrote: >> >>> <> Hello, >>> >>> I'm getting the following compiler error when attempting to compile Kaffe 1.1.8 for Coldfire (54418): >>> >>> methodcalls.c: In function 'engine_callMethod': >>> methodcalls.c:225:1: error: insn does not satisfy its constraints: >>> (insn 599 398 400 47 ../../../config/md.h:99 (set (reg:DF 0 %d0) >>> (reg:DF 16 %fp0)) 52 {movdf_cf_soft} (nil)) >>> methodcalls.c:225:1: internal compiler error: in reload_cse_simplify_operands, at postreload.c:403 >>> Please submit a full bug report, >>> with preprocessed source if appropriate. >>> See for instructions. >>> >>> Methodcalls.c is attached. This happens using both 4.4.1 and 4.5.2 (2011.03-98) versions of the compilers. CFLAGS are as follows: >>> >>> -mcpu=54418 -msoft-float -march=isac -Wall -W -Wextra -fno-strict-aliasing -fno-omit-frame-pointer -O1 -pthread >>> >>> Any ideas what could be causing this error? >>> >>> >>> Thanks, >>> >>> >>> Jeff >>> >>> >> >> > From Jeffrey.A.Boyce at carrier.utc.com Mon Aug 22 20:24:09 2011 From: Jeffrey.A.Boyce at carrier.utc.com (Boyce, Jeffrey A CAR) Date: Mon, 22 Aug 2011 16:24:09 -0400 Subject: [coldfire-gnu-discuss] insn does not satisfy its constraints In-Reply-To: <7A06DC45-ECE7-4298-B050-50AB61F4C9F7@codesourcery.com> References: <6D33C4BCDBCCFC478D604EF39B60F17802CC9FF8@UUSNWEJ1.na.utcmail.com> <10657EFD-77B6-4CFC-9C68-6EF53BDD1BD6@codesourcery.com> <6D33C4BCDBCCFC478D604EF39B60F17802CCA7FE@UUSNWEJ1.na.utcmail.com> <6629AE01-79E3-4CCD-BC00-07AE78ABDE18@codesourcery.com> <7A06DC45-ECE7-4298-B050-50AB61F4C9F7@codesourcery.com> Message-ID: <6D33C4BCDBCCFC478D604EF39B60F17802CCAB54@UUSNWEJ1.na.utcmail.com> Maxim, Thanks, that allowed me to get past that error and much further into the build. I'm now getting several assembler errors when trying to build libkaffe_la-locks. For example: locks.s: Assembler messages: locks.s:71: Error: invalid instruction for this architecture; needs 68020 or higher (68020 [68k, 68ec020], 68030 [68ec030], 68040 [68ec040], 68060 [68ec060]) -- statement `cas.l %d0,%d1,(%a2)' ignored I haven't had time to dig into these, but do you have any thoughts? Thanks again, Jeff -----Original Message----- From: Maxim Kuvyrkov [mailto:maxim at codesourcery.com] Sent: Monday, August 22, 2011 3:06 PM To: Boyce, Jeffrey A CAR Cc: coldfire-gnu-discuss at codesourcery.com Subject: Re: [coldfire-gnu-discuss] insn does not satisfy its constraints Jeff, I realized that I didn't give you the pointers to fix the code. To make code compile (and work) for FPU-less ColdFire, such as MCF544xx families, you need to condition the references to FPU registers in Kaffe's md.h file. You can use builtin compiler macros for that: #if !defined (__mcoldfire__) || defined (__mcffpu__) #else #endif Regards, -- Maxim Kuvyrkov CodeSourcery / Mentor Graphics On Aug 23, 2011, at 4:28 AM, Maxim Kuvyrkov wrote: > Jeff, > > This appears to be a bug in the source code rather than in the compiler. The sysdepCallMethod() function explicitly refers to the FP0 register via 'register double f0d asm ("fp0")' statement, and this causes the compiler to fail when compiling for FPU-less ColdFire target. > > Regards, > > -- > Maxim Kuvyrkov > CodeSourcery / Mentor Graphics > > On Aug 23, 2011, at 12:21 AM, Boyce, Jeffrey A CAR wrote: > >> Maxim, >> >> Please see attached. >> >> >> Thanks, >> >> Jeff >> >> >> -----Original Message----- >> From: Maxim Kuvyrkov [mailto:maxim at codesourcery.com] >> Sent: Sunday, August 21, 2011 2:45 AM >> To: Boyce, Jeffrey A CAR >> Cc: coldfire-gnu-discuss at codesourcery.com >> Subject: Re: [coldfire-gnu-discuss] insn does not satisfy its constraints >> >> Jeffrey, >> >> Please attach the preprocessed source file so that we can reproduce the problem on our side. You can get the preprocessed example by adding -save-temps to the command line -- the preprocessed source will be saved in a .i file. >> >> It seems something causes the compiler to generate code that uses a floating point register for a soft-fp target. >> >> Thank you, >> >> -- >> Maxim Kuvyrkov >> CodeSourcery / Mentor Graphics >> >> On Aug 18, 2011, at 8:32 AM, Boyce, Jeffrey A CAR wrote: >> >>> <> Hello, >>> >>> I'm getting the following compiler error when attempting to compile Kaffe 1.1.8 for Coldfire (54418): >>> >>> methodcalls.c: In function 'engine_callMethod': >>> methodcalls.c:225:1: error: insn does not satisfy its constraints: >>> (insn 599 398 400 47 ../../../config/md.h:99 (set (reg:DF 0 %d0) >>> (reg:DF 16 %fp0)) 52 {movdf_cf_soft} (nil)) >>> methodcalls.c:225:1: internal compiler error: in reload_cse_simplify_operands, at postreload.c:403 >>> Please submit a full bug report, >>> with preprocessed source if appropriate. >>> See for instructions. >>> >>> Methodcalls.c is attached. This happens using both 4.4.1 and 4.5.2 (2011.03-98) versions of the compilers. CFLAGS are as follows: >>> >>> -mcpu=54418 -msoft-float -march=isac -Wall -W -Wextra -fno-strict-aliasing -fno-omit-frame-pointer -O1 -pthread >>> >>> Any ideas what could be causing this error? >>> >>> >>> Thanks, >>> >>> >>> Jeff >>> >>> >> >> > -------------- next part -------------- A non-text attachment was scrubbed... Name: locks.s Type: application/octet-stream Size: 23656 bytes Desc: locks.s URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: locks.c Type: application/octet-stream Size: 14100 bytes Desc: locks.c URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: locks.i Type: application/octet-stream Size: 293431 bytes Desc: locks.i URL: From maxim at codesourcery.com Mon Aug 22 20:33:48 2011 From: maxim at codesourcery.com (Maxim Kuvyrkov) Date: Tue, 23 Aug 2011 08:33:48 +1200 Subject: [coldfire-gnu-discuss] insn does not satisfy its constraints In-Reply-To: <6D33C4BCDBCCFC478D604EF39B60F17802CCAB54@UUSNWEJ1.na.utcmail.com> References: <6D33C4BCDBCCFC478D604EF39B60F17802CC9FF8@UUSNWEJ1.na.utcmail.com> <10657EFD-77B6-4CFC-9C68-6EF53BDD1BD6@codesourcery.com> <6D33C4BCDBCCFC478D604EF39B60F17802CCA7FE@UUSNWEJ1.na.utcmail.com> <6629AE01-79E3-4CCD-BC00-07AE78ABDE18@codesourcery.com> <7A06DC45-ECE7-4298-B050-50AB61F4C9F7@codesourcery.com> <6D33C4BCDBCCFC478D604EF39B60F17802CCAB54@UUSNWEJ1.na.utcmail.com> Message-ID: <025F5312-CDBB-4B91-B16A-008FB8485022@codesourcery.com> On Aug 23, 2011, at 8:24 AM, Boyce, Jeffrey A CAR wrote: > Maxim, > > Thanks, that allowed me to get past that error and much further into the build. > > I'm now getting several assembler errors when trying to build libkaffe_la-locks. For example: > > locks.s: Assembler messages: > locks.s:71: Error: invalid instruction for this architecture; needs 68020 or higher (68020 [68k, 68ec020], 68030 [68ec030], 68040 [68ec040], 68060 [68ec060]) -- statement `cas.l %d0,%d1,(%a2)' ignored > > I haven't had time to dig into these, but do you have any thoughts? This one is trickier. ColdFire ISA does not have compare-and-swap instruction. If you are on Linux and have a reasonably new kernel, you can try using __kernel_atomic_cmpxchg_32 vDSO helper (faster) or atomic_cmpxchg_32 system call (slower). Or implement synchronization in some other way. -- Maxim Kuvyrkov CodeSourcery / Mentor Graphics > > -----Original Message----- > From: Maxim Kuvyrkov [mailto:maxim at codesourcery.com] > Sent: Monday, August 22, 2011 3:06 PM > To: Boyce, Jeffrey A CAR > Cc: coldfire-gnu-discuss at codesourcery.com > Subject: Re: [coldfire-gnu-discuss] insn does not satisfy its constraints > > Jeff, > > I realized that I didn't give you the pointers to fix the code. To make code compile (and work) for FPU-less ColdFire, such as MCF544xx families, you need to condition the references to FPU registers in Kaffe's md.h file. You can use builtin compiler macros for that: > > #if !defined (__mcoldfire__) || defined (__mcffpu__) > > #else > > #endif > > Regards, > > -- > Maxim Kuvyrkov > CodeSourcery / Mentor Graphics > > On Aug 23, 2011, at 4:28 AM, Maxim Kuvyrkov wrote: > >> Jeff, >> >> This appears to be a bug in the source code rather than in the compiler. The sysdepCallMethod() function explicitly refers to the FP0 register via 'register double f0d asm ("fp0")' statement, and this causes the compiler to fail when compiling for FPU-less ColdFire target. >> >> Regards, >> >> -- >> Maxim Kuvyrkov >> CodeSourcery / Mentor Graphics >> >> On Aug 23, 2011, at 12:21 AM, Boyce, Jeffrey A CAR wrote: >> >>> Maxim, >>> >>> Please see attached. >>> >>> >>> Thanks, >>> >>> Jeff >>> >>> >>> -----Original Message----- >>> From: Maxim Kuvyrkov [mailto:maxim at codesourcery.com] >>> Sent: Sunday, August 21, 2011 2:45 AM >>> To: Boyce, Jeffrey A CAR >>> Cc: coldfire-gnu-discuss at codesourcery.com >>> Subject: Re: [coldfire-gnu-discuss] insn does not satisfy its constraints >>> >>> Jeffrey, >>> >>> Please attach the preprocessed source file so that we can reproduce the problem on our side. You can get the preprocessed example by adding -save-temps to the command line -- the preprocessed source will be saved in a .i file. >>> >>> It seems something causes the compiler to generate code that uses a floating point register for a soft-fp target. >>> >>> Thank you, >>> >>> -- >>> Maxim Kuvyrkov >>> CodeSourcery / Mentor Graphics >>> >>> On Aug 18, 2011, at 8:32 AM, Boyce, Jeffrey A CAR wrote: >>> >>>> <> Hello, >>>> >>>> I'm getting the following compiler error when attempting to compile Kaffe 1.1.8 for Coldfire (54418): >>>> >>>> methodcalls.c: In function 'engine_callMethod': >>>> methodcalls.c:225:1: error: insn does not satisfy its constraints: >>>> (insn 599 398 400 47 ../../../config/md.h:99 (set (reg:DF 0 %d0) >>>> (reg:DF 16 %fp0)) 52 {movdf_cf_soft} (nil)) >>>> methodcalls.c:225:1: internal compiler error: in reload_cse_simplify_operands, at postreload.c:403 >>>> Please submit a full bug report, >>>> with preprocessed source if appropriate. >>>> See for instructions. >>>> >>>> Methodcalls.c is attached. This happens using both 4.4.1 and 4.5.2 (2011.03-98) versions of the compilers. CFLAGS are as follows: >>>> >>>> -mcpu=54418 -msoft-float -march=isac -Wall -W -Wextra -fno-strict-aliasing -fno-omit-frame-pointer -O1 -pthread >>>> >>>> Any ideas what could be causing this error? >>>> >>>> >>>> Thanks, >>>> >>>> >>>> Jeff >>>> >>>> >>> >>> >> > > From maxim at codesourcery.com Mon Aug 22 20:41:51 2011 From: maxim at codesourcery.com (Maxim Kuvyrkov) Date: Tue, 23 Aug 2011 08:41:51 +1200 Subject: [coldfire-gnu-discuss] insn does not satisfy its constraints In-Reply-To: <025F5312-CDBB-4B91-B16A-008FB8485022@codesourcery.com> References: <6D33C4BCDBCCFC478D604EF39B60F17802CC9FF8@UUSNWEJ1.na.utcmail.com> <10657EFD-77B6-4CFC-9C68-6EF53BDD1BD6@codesourcery.com> <6D33C4BCDBCCFC478D604EF39B60F17802CCA7FE@UUSNWEJ1.na.utcmail.com> <6629AE01-79E3-4CCD-BC00-07AE78ABDE18@codesourcery.com> <7A06DC45-ECE7-4298-B050-50AB61F4C9F7@codesourcery.com> <6D33C4BCDBCCFC478D604EF39B60F17802CCAB54@UUSNWEJ1.na.utcmail.com> <025F5312-CDBB-4B91-B16A-008FB8485022@codesourcery.com> Message-ID: <5E83ACFA-1CBC-41FC-AFB9-9F0B8957F766@codesourcery.com> For inspiration see http://www.eglibc.org/cgi-bin/viewcvs.cgi/trunk/ports/sysdeps/unix/sysv/linux/m68k/coldfire/m68k-helpers.S?rev=10032&view=markup http://www.eglibc.org/cgi-bin/viewcvs.cgi/trunk/ports/sysdeps/unix/sysv/linux/m68k/coldfire/nptl/bits/atomic.h?rev=10032&view=markup -- Maxim Kuvyrkov CodeSourcery / Mentor Graphics On Aug 23, 2011, at 8:33 AM, Maxim Kuvyrkov wrote: > On Aug 23, 2011, at 8:24 AM, Boyce, Jeffrey A CAR wrote: > >> Maxim, >> >> Thanks, that allowed me to get past that error and much further into the build. >> >> I'm now getting several assembler errors when trying to build libkaffe_la-locks. For example: >> >> locks.s: Assembler messages: >> locks.s:71: Error: invalid instruction for this architecture; needs 68020 or higher (68020 [68k, 68ec020], 68030 [68ec030], 68040 [68ec040], 68060 [68ec060]) -- statement `cas.l %d0,%d1,(%a2)' ignored >> >> I haven't had time to dig into these, but do you have any thoughts? > > This one is trickier. > > ColdFire ISA does not have compare-and-swap instruction. If you are on Linux and have a reasonably new kernel, you can try using __kernel_atomic_cmpxchg_32 vDSO helper (faster) or atomic_cmpxchg_32 system call (slower). Or implement synchronization in some other way. > > -- > Maxim Kuvyrkov > CodeSourcery / Mentor Graphics > >> >> -----Original Message----- >> From: Maxim Kuvyrkov [mailto:maxim at codesourcery.com] >> Sent: Monday, August 22, 2011 3:06 PM >> To: Boyce, Jeffrey A CAR >> Cc: coldfire-gnu-discuss at codesourcery.com >> Subject: Re: [coldfire-gnu-discuss] insn does not satisfy its constraints >> >> Jeff, >> >> I realized that I didn't give you the pointers to fix the code. To make code compile (and work) for FPU-less ColdFire, such as MCF544xx families, you need to condition the references to FPU registers in Kaffe's md.h file. You can use builtin compiler macros for that: >> >> #if !defined (__mcoldfire__) || defined (__mcffpu__) >> >> #else >> >> #endif >> >> Regards, >> >> -- >> Maxim Kuvyrkov >> CodeSourcery / Mentor Graphics >> >> On Aug 23, 2011, at 4:28 AM, Maxim Kuvyrkov wrote: >> >>> Jeff, >>> >>> This appears to be a bug in the source code rather than in the compiler. The sysdepCallMethod() function explicitly refers to the FP0 register via 'register double f0d asm ("fp0")' statement, and this causes the compiler to fail when compiling for FPU-less ColdFire target. >>> >>> Regards, >>> >>> -- >>> Maxim Kuvyrkov >>> CodeSourcery / Mentor Graphics >>> >>> On Aug 23, 2011, at 12:21 AM, Boyce, Jeffrey A CAR wrote: >>> >>>> Maxim, >>>> >>>> Please see attached. >>>> >>>> >>>> Thanks, >>>> >>>> Jeff >>>> >>>> >>>> -----Original Message----- >>>> From: Maxim Kuvyrkov [mailto:maxim at codesourcery.com] >>>> Sent: Sunday, August 21, 2011 2:45 AM >>>> To: Boyce, Jeffrey A CAR >>>> Cc: coldfire-gnu-discuss at codesourcery.com >>>> Subject: Re: [coldfire-gnu-discuss] insn does not satisfy its constraints >>>> >>>> Jeffrey, >>>> >>>> Please attach the preprocessed source file so that we can reproduce the problem on our side. You can get the preprocessed example by adding -save-temps to the command line -- the preprocessed source will be saved in a .i file. >>>> >>>> It seems something causes the compiler to generate code that uses a floating point register for a soft-fp target. >>>> >>>> Thank you, >>>> >>>> -- >>>> Maxim Kuvyrkov >>>> CodeSourcery / Mentor Graphics >>>> >>>> On Aug 18, 2011, at 8:32 AM, Boyce, Jeffrey A CAR wrote: >>>> >>>>> <> Hello, >>>>> >>>>> I'm getting the following compiler error when attempting to compile Kaffe 1.1.8 for Coldfire (54418): >>>>> >>>>> methodcalls.c: In function 'engine_callMethod': >>>>> methodcalls.c:225:1: error: insn does not satisfy its constraints: >>>>> (insn 599 398 400 47 ../../../config/md.h:99 (set (reg:DF 0 %d0) >>>>> (reg:DF 16 %fp0)) 52 {movdf_cf_soft} (nil)) >>>>> methodcalls.c:225:1: internal compiler error: in reload_cse_simplify_operands, at postreload.c:403 >>>>> Please submit a full bug report, >>>>> with preprocessed source if appropriate. >>>>> See for instructions. >>>>> >>>>> Methodcalls.c is attached. This happens using both 4.4.1 and 4.5.2 (2011.03-98) versions of the compilers. CFLAGS are as follows: >>>>> >>>>> -mcpu=54418 -msoft-float -march=isac -Wall -W -Wextra -fno-strict-aliasing -fno-omit-frame-pointer -O1 -pthread >>>>> >>>>> Any ideas what could be causing this error? >>>>> >>>>> >>>>> Thanks, >>>>> >>>>> >>>>> Jeff >>>>> >>>>> >>>> >>>> >>> >> >> > From maxim at codesourcery.com Tue Aug 23 19:12:30 2011 From: maxim at codesourcery.com (Maxim Kuvyrkov) Date: Wed, 24 Aug 2011 07:12:30 +1200 Subject: [coldfire-gnu-discuss] insn does not satisfy its constraints In-Reply-To: <5E83ACFA-1CBC-41FC-AFB9-9F0B8957F766@codesourcery.com> References: <6D33C4BCDBCCFC478D604EF39B60F17802CC9FF8@UUSNWEJ1.na.utcmail.com> <10657EFD-77B6-4CFC-9C68-6EF53BDD1BD6@codesourcery.com> <6D33C4BCDBCCFC478D604EF39B60F17802CCA7FE@UUSNWEJ1.na.utcmail.com> <6629AE01-79E3-4CCD-BC00-07AE78ABDE18@codesourcery.com> <7A06DC45-ECE7-4298-B050-50AB61F4C9F7@codesourcery.com> <6D33C4BCDBCCFC478D604EF39B60F17802CCAB54@UUSNWEJ1.na.utcmail.com> <025F5312-CDBB-4B91-B16A-008FB8485022@codesourcery.com> <5E83ACFA-1CBC-41FC-AFB9-9F0B8957F766@codesourcery.com> Message-ID: <8A866B2A-4DAD-4358-8D8C-7D5A8904B3CC@codesourcery.com> I may have over-engineered my suggestions. You should be able to use user-friendly GLIBC's libphread's synchronization mechanisms that use the aforementioned kernel helpers as the back-end. -- Maxim Kuvyrkov CodeSourcery / Mentor Graphics On Aug 23, 2011, at 8:41 AM, Maxim Kuvyrkov wrote: > For inspiration see > > http://www.eglibc.org/cgi-bin/viewcvs.cgi/trunk/ports/sysdeps/unix/sysv/linux/m68k/coldfire/m68k-helpers.S?rev=10032&view=markup > > http://www.eglibc.org/cgi-bin/viewcvs.cgi/trunk/ports/sysdeps/unix/sysv/linux/m68k/coldfire/nptl/bits/atomic.h?rev=10032&view=markup > > -- > Maxim Kuvyrkov > CodeSourcery / Mentor Graphics > > On Aug 23, 2011, at 8:33 AM, Maxim Kuvyrkov wrote: > >> On Aug 23, 2011, at 8:24 AM, Boyce, Jeffrey A CAR wrote: >> >>> Maxim, >>> >>> Thanks, that allowed me to get past that error and much further into the build. >>> >>> I'm now getting several assembler errors when trying to build libkaffe_la-locks. For example: >>> >>> locks.s: Assembler messages: >>> locks.s:71: Error: invalid instruction for this architecture; needs 68020 or higher (68020 [68k, 68ec020], 68030 [68ec030], 68040 [68ec040], 68060 [68ec060]) -- statement `cas.l %d0,%d1,(%a2)' ignored >>> >>> I haven't had time to dig into these, but do you have any thoughts? >> >> This one is trickier. >> >> ColdFire ISA does not have compare-and-swap instruction. If you are on Linux and have a reasonably new kernel, you can try using __kernel_atomic_cmpxchg_32 vDSO helper (faster) or atomic_cmpxchg_32 system call (slower). Or implement synchronization in some other way. >> >> -- >> Maxim Kuvyrkov >> CodeSourcery / Mentor Graphics >> >>> >>> -----Original Message----- >>> From: Maxim Kuvyrkov [mailto:maxim at codesourcery.com] >>> Sent: Monday, August 22, 2011 3:06 PM >>> To: Boyce, Jeffrey A CAR >>> Cc: coldfire-gnu-discuss at codesourcery.com >>> Subject: Re: [coldfire-gnu-discuss] insn does not satisfy its constraints >>> >>> Jeff, >>> >>> I realized that I didn't give you the pointers to fix the code. To make code compile (and work) for FPU-less ColdFire, such as MCF544xx families, you need to condition the references to FPU registers in Kaffe's md.h file. You can use builtin compiler macros for that: >>> >>> #if !defined (__mcoldfire__) || defined (__mcffpu__) >>> >>> #else >>> >>> #endif >>> >>> Regards, >>> >>> -- >>> Maxim Kuvyrkov >>> CodeSourcery / Mentor Graphics >>> >>> On Aug 23, 2011, at 4:28 AM, Maxim Kuvyrkov wrote: >>> >>>> Jeff, >>>> >>>> This appears to be a bug in the source code rather than in the compiler. The sysdepCallMethod() function explicitly refers to the FP0 register via 'register double f0d asm ("fp0")' statement, and this causes the compiler to fail when compiling for FPU-less ColdFire target. >>>> >>>> Regards, >>>> >>>> -- >>>> Maxim Kuvyrkov >>>> CodeSourcery / Mentor Graphics >>>> >>>> On Aug 23, 2011, at 12:21 AM, Boyce, Jeffrey A CAR wrote: >>>> >>>>> Maxim, >>>>> >>>>> Please see attached. >>>>> >>>>> >>>>> Thanks, >>>>> >>>>> Jeff >>>>> >>>>> >>>>> -----Original Message----- >>>>> From: Maxim Kuvyrkov [mailto:maxim at codesourcery.com] >>>>> Sent: Sunday, August 21, 2011 2:45 AM >>>>> To: Boyce, Jeffrey A CAR >>>>> Cc: coldfire-gnu-discuss at codesourcery.com >>>>> Subject: Re: [coldfire-gnu-discuss] insn does not satisfy its constraints >>>>> >>>>> Jeffrey, >>>>> >>>>> Please attach the preprocessed source file so that we can reproduce the problem on our side. You can get the preprocessed example by adding -save-temps to the command line -- the preprocessed source will be saved in a .i file. >>>>> >>>>> It seems something causes the compiler to generate code that uses a floating point register for a soft-fp target. >>>>> >>>>> Thank you, >>>>> >>>>> -- >>>>> Maxim Kuvyrkov >>>>> CodeSourcery / Mentor Graphics >>>>> >>>>> On Aug 18, 2011, at 8:32 AM, Boyce, Jeffrey A CAR wrote: >>>>> >>>>>> <> Hello, >>>>>> >>>>>> I'm getting the following compiler error when attempting to compile Kaffe 1.1.8 for Coldfire (54418): >>>>>> >>>>>> methodcalls.c: In function 'engine_callMethod': >>>>>> methodcalls.c:225:1: error: insn does not satisfy its constraints: >>>>>> (insn 599 398 400 47 ../../../config/md.h:99 (set (reg:DF 0 %d0) >>>>>> (reg:DF 16 %fp0)) 52 {movdf_cf_soft} (nil)) >>>>>> methodcalls.c:225:1: internal compiler error: in reload_cse_simplify_operands, at postreload.c:403 >>>>>> Please submit a full bug report, >>>>>> with preprocessed source if appropriate. >>>>>> See for instructions. >>>>>> >>>>>> Methodcalls.c is attached. This happens using both 4.4.1 and 4.5.2 (2011.03-98) versions of the compilers. CFLAGS are as follows: >>>>>> >>>>>> -mcpu=54418 -msoft-float -march=isac -Wall -W -Wextra -fno-strict-aliasing -fno-omit-frame-pointer -O1 -pthread >>>>>> >>>>>> Any ideas what could be causing this error? >>>>>> >>>>>> >>>>>> Thanks, >>>>>> >>>>>> >>>>>> Jeff >>>>>> >>>>>> >>>>> >>>>> >>>> >>> >>> >> > From Jeffrey.A.Boyce at carrier.utc.com Wed Aug 24 13:21:31 2011 From: Jeffrey.A.Boyce at carrier.utc.com (Boyce, Jeffrey A CAR) Date: Wed, 24 Aug 2011 09:21:31 -0400 Subject: [coldfire-gnu-discuss] insn does not satisfy its constraints In-Reply-To: <8A866B2A-4DAD-4358-8D8C-7D5A8904B3CC@codesourcery.com> References: <6D33C4BCDBCCFC478D604EF39B60F17802CC9FF8@UUSNWEJ1.na.utcmail.com> <10657EFD-77B6-4CFC-9C68-6EF53BDD1BD6@codesourcery.com> <6D33C4BCDBCCFC478D604EF39B60F17802CCA7FE@UUSNWEJ1.na.utcmail.com> <6629AE01-79E3-4CCD-BC00-07AE78ABDE18@codesourcery.com> <7A06DC45-ECE7-4298-B050-50AB61F4C9F7@codesourcery.com> <6D33C4BCDBCCFC478D604EF39B60F17802CCAB54@UUSNWEJ1.na.utcmail.com> <025F5312-CDBB-4B91-B16A-008FB8485022@codesourcery.com> <5E83ACFA-1CBC-41FC-AFB9-9F0B8957F766@codesourcery.com> <8A866B2A-4DAD-4358-8D8C-7D5A8904B3CC@codesourcery.com> Message-ID: <6D33C4BCDBCCFC478D604EF39B60F17802D1B710@UUSNWEJ1.na.utcmail.com> I wound up modifying common.h to include generic/genatomic.h rather than the platform-specific atomic.h. This allowed the build to complete without errors. Haven't tried it yet to see if it actually works... Thanks again for your help, Jeff -----Original Message----- From: Maxim Kuvyrkov [mailto:maxim at codesourcery.com] Sent: Tuesday, August 23, 2011 3:13 PM To: Boyce, Jeffrey A CAR Cc: coldfire-gnu-discuss at codesourcery.com Subject: Re: [coldfire-gnu-discuss] insn does not satisfy its constraints I may have over-engineered my suggestions. You should be able to use user-friendly GLIBC's libphread's synchronization mechanisms that use the aforementioned kernel helpers as the back-end. -- Maxim Kuvyrkov CodeSourcery / Mentor Graphics On Aug 23, 2011, at 8:41 AM, Maxim Kuvyrkov wrote: > For inspiration see > > http://www.eglibc.org/cgi-bin/viewcvs.cgi/trunk/ports/sysdeps/unix/sysv/linux/m68k/coldfire/m68k-helpers.S?rev=10032&view=markup > > http://www.eglibc.org/cgi-bin/viewcvs.cgi/trunk/ports/sysdeps/unix/sysv/linux/m68k/coldfire/nptl/bits/atomic.h?rev=10032&view=markup > > -- > Maxim Kuvyrkov > CodeSourcery / Mentor Graphics > > On Aug 23, 2011, at 8:33 AM, Maxim Kuvyrkov wrote: > >> On Aug 23, 2011, at 8:24 AM, Boyce, Jeffrey A CAR wrote: >> >>> Maxim, >>> >>> Thanks, that allowed me to get past that error and much further into the build. >>> >>> I'm now getting several assembler errors when trying to build libkaffe_la-locks. For example: >>> >>> locks.s: Assembler messages: >>> locks.s:71: Error: invalid instruction for this architecture; needs 68020 or higher (68020 [68k, 68ec020], 68030 [68ec030], 68040 [68ec040], 68060 [68ec060]) -- statement `cas.l %d0,%d1,(%a2)' ignored >>> >>> I haven't had time to dig into these, but do you have any thoughts? >> >> This one is trickier. >> >> ColdFire ISA does not have compare-and-swap instruction. If you are on Linux and have a reasonably new kernel, you can try using __kernel_atomic_cmpxchg_32 vDSO helper (faster) or atomic_cmpxchg_32 system call (slower). Or implement synchronization in some other way. >> >> -- >> Maxim Kuvyrkov >> CodeSourcery / Mentor Graphics >> >>> >>> -----Original Message----- >>> From: Maxim Kuvyrkov [mailto:maxim at codesourcery.com] >>> Sent: Monday, August 22, 2011 3:06 PM >>> To: Boyce, Jeffrey A CAR >>> Cc: coldfire-gnu-discuss at codesourcery.com >>> Subject: Re: [coldfire-gnu-discuss] insn does not satisfy its constraints >>> >>> Jeff, >>> >>> I realized that I didn't give you the pointers to fix the code. To make code compile (and work) for FPU-less ColdFire, such as MCF544xx families, you need to condition the references to FPU registers in Kaffe's md.h file. You can use builtin compiler macros for that: >>> >>> #if !defined (__mcoldfire__) || defined (__mcffpu__) >>> >>> #else >>> >>> #endif >>> >>> Regards, >>> >>> -- >>> Maxim Kuvyrkov >>> CodeSourcery / Mentor Graphics >>> >>> On Aug 23, 2011, at 4:28 AM, Maxim Kuvyrkov wrote: >>> >>>> Jeff, >>>> >>>> This appears to be a bug in the source code rather than in the compiler. The sysdepCallMethod() function explicitly refers to the FP0 register via 'register double f0d asm ("fp0")' statement, and this causes the compiler to fail when compiling for FPU-less ColdFire target. >>>> >>>> Regards, >>>> >>>> -- >>>> Maxim Kuvyrkov >>>> CodeSourcery / Mentor Graphics >>>> >>>> On Aug 23, 2011, at 12:21 AM, Boyce, Jeffrey A CAR wrote: >>>> >>>>> Maxim, >>>>> >>>>> Please see attached. >>>>> >>>>> >>>>> Thanks, >>>>> >>>>> Jeff >>>>> >>>>> >>>>> -----Original Message----- >>>>> From: Maxim Kuvyrkov [mailto:maxim at codesourcery.com] >>>>> Sent: Sunday, August 21, 2011 2:45 AM >>>>> To: Boyce, Jeffrey A CAR >>>>> Cc: coldfire-gnu-discuss at codesourcery.com >>>>> Subject: Re: [coldfire-gnu-discuss] insn does not satisfy its constraints >>>>> >>>>> Jeffrey, >>>>> >>>>> Please attach the preprocessed source file so that we can reproduce the problem on our side. You can get the preprocessed example by adding -save-temps to the command line -- the preprocessed source will be saved in a .i file. >>>>> >>>>> It seems something causes the compiler to generate code that uses a floating point register for a soft-fp target. >>>>> >>>>> Thank you, >>>>> >>>>> -- >>>>> Maxim Kuvyrkov >>>>> CodeSourcery / Mentor Graphics >>>>> >>>>> On Aug 18, 2011, at 8:32 AM, Boyce, Jeffrey A CAR wrote: >>>>> >>>>>> <> Hello, >>>>>> >>>>>> I'm getting the following compiler error when attempting to compile Kaffe 1.1.8 for Coldfire (54418): >>>>>> >>>>>> methodcalls.c: In function 'engine_callMethod': >>>>>> methodcalls.c:225:1: error: insn does not satisfy its constraints: >>>>>> (insn 599 398 400 47 ../../../config/md.h:99 (set (reg:DF 0 %d0) >>>>>> (reg:DF 16 %fp0)) 52 {movdf_cf_soft} (nil)) >>>>>> methodcalls.c:225:1: internal compiler error: in reload_cse_simplify_operands, at postreload.c:403 >>>>>> Please submit a full bug report, >>>>>> with preprocessed source if appropriate. >>>>>> See for instructions. >>>>>> >>>>>> Methodcalls.c is attached. This happens using both 4.4.1 and 4.5.2 (2011.03-98) versions of the compilers. CFLAGS are as follows: >>>>>> >>>>>> -mcpu=54418 -msoft-float -march=isac -Wall -W -Wextra -fno-strict-aliasing -fno-omit-frame-pointer -O1 -pthread >>>>>> >>>>>> Any ideas what could be causing this error? >>>>>> >>>>>> >>>>>> Thanks, >>>>>> >>>>>> >>>>>> Jeff >>>>>> >>>>>> >>>>> >>>>> >>>> >>> >>> >> > -------------- next part -------------- A non-text attachment was scrubbed... Name: common.h Type: application/octet-stream Size: 925 bytes Desc: common.h URL: