Re: no mul/div instruction

2008-04-22 Thread Kunal Parmar
Hi, I wanted support for software floating point on the architecture. I am using fp-bit.c & dp-bit.c and have defined FLOAT_TYPE_SIZE as 32 and DOUBLE_TYPE_SIZE as 64. dp-bit.c requires __muldi3. How do I enable emulation of 64 bit multiply in libgcc2.a ? Thanks in advance, Kunal Parmar

Re: no mul/div instruction

2008-04-22 Thread Kunal Parmar
Hi Ian, On Tue, Apr 22, 2008 at 7:12 PM, Ian Lance Taylor <[EMAIL PROTECTED]> wrote: > Looking at libgcc2.h, it seems like you might need to define > LIBGCC2_UNITS_PER_WORD in your tm.h file. That solved my problem. Thanks a ton ! Kunal

Re: no mul/div instruction

2008-04-22 Thread Ian Lance Taylor
"Kunal Parmar" <[EMAIL PROTECTED]> writes: >> Yes, I think __mulsi3 will be built for you automatically. > > I gave a definition of __mulhi3 for my architecture. But I don't get > __mulsi3 in libgcc.a. Do I have to enable some options for this ? Looking at libgcc2.h, it seems like you might need

Re: no mul/div instruction

2008-04-22 Thread Kunal Parmar
Hi Ian, > Yes, I think __mulsi3 will be built for you automatically. I gave a definition of __mulhi3 for my architecture. But I don't get __mulsi3 in libgcc.a. Do I have to enable some options for this ? Thanks in advance, Kunal Parmar

Re: no mul/div instruction

2008-04-22 Thread Ian Lance Taylor
"Kunal Parmar" <[EMAIL PROTECTED]> writes: > On Tue, Apr 22, 2008 at 1:24 PM, Ian Lance Taylor <[EMAIL PROTECTED]> wrote: >> It depends on UNITS_PER_WORD. If UNITS_PER_WORD is 4, you need >> __mulsi3. If UNITS_PER_WORD is 2, you need __mulhi3, and, if you have >> 32-bit integer types, you wil

Re: no mul/div instruction

2008-04-22 Thread Kunal Parmar
Hi Ian, On Tue, Apr 22, 2008 at 1:24 PM, Ian Lance Taylor <[EMAIL PROTECTED]> wrote: > It depends on UNITS_PER_WORD. If UNITS_PER_WORD is 4, you need > __mulsi3. If UNITS_PER_WORD is 2, you need __mulhi3, and, if you have > 32-bit integer types, you will also need __mulsi3. In the latter cas

Re: no mul/div instruction

2008-04-22 Thread Ian Lance Taylor
Kunal Parmar <[EMAIL PROTECTED]> writes: > I am porting GCC to a new 16 bit RISC architecture which does not have > multiplication and division instructions. I figured that I have to provide > emulation routines for the multiplication and division which will be > inserted into libgcc2.a. But I am

no mul/div instruction

2008-04-22 Thread Kunal Parmar
Hi all, I am porting GCC to a new 16 bit RISC architecture which does not have multiplication and division instructions. I figured that I have to provide emulation routines for the multiplication and division which will be inserted into libgcc2.a. But I am confused about which versions of these r