Re: soft-fp functions support without using libgcc

2014-05-22 Thread Joern Rennecke
On 21 May 2014 14:13, Sheheryar Zahoor Qazi
sheheryar.zahoor.q...@gmail.com wrote:
Building libgcc is not optional.  It is required for all targets.

 So, irrespective whether i provide floating point implementation by
 soft-fp, fpu-bit or ieeelib, an error free libgcc build is a MUST?

 What if I dont want to generate calls to libgcc.a but want want gcc to
 generate inline code?

While this is not possible for all calls, a lot of library calls can be
avoided or emitted with a custome ABI by having a suitable expander
in the .md file that emits whatever you want.  E.g., several of the
ARC subtargets/mulitlibs emit inline code for the simpler soft-fp functions,
and custom calls to optimized assembler for medium complexity operations.
You should really read md.texi and look at optabs.def to get a glimpse
of the code generation customization potential of GCC.


Re: soft-fp functions support without using libgcc

2014-05-21 Thread Sheheryar Zahoor Qazi
On Tue, May 20, 2014 at 10:47 PM, Ian Lance Taylor i...@google.com wrote:
 On Tue, May 20, 2014 at 12:51 PM, Sheheryar Zahoor Qazi
 sheheryar.zahoor.q...@gmail.com wrote:
 Hi again!

You need to look in target-arch/libgcc/config.log to see what the
problem is.
 config.log states the following error:
 configure:2590: checking for suffix of object files
 configure:2611: /home/lab/target/target-gcc/builddir/./gcc/xgcc
 -B/home/lab/target/target-gcc/builddir/./gcc/ -B/usr/local/target/bin/
 -B/usr/local/target/lib/ -isystem /usr/local/target/include -isystem
 /usr/local/target/sys-include -c -g -O2conftest.c 5
 /home/laboruser/spartanmc/spartanmc-gcc/builddir/./gcc/as: 76: exec: :
 Permission denied
 configure:2614: $? = 1
 configure: failed program was:
 | /* confdefs.h.  */

 Is it complaining for root access??


 Please reply to the mailing list, not just to me.  Thanks.

 I doubt it is a root access issue.  Look at the permissions of the
 gcc/as file.  You will probably need to debug it a bit to find out why
 it is failing.  It's just a shell script so it shouldn't be too hard.


It's because libgcc was not built.
 What are my options to provide software floating point support to my
 architecture if I am unable to build libgcc for my target?
 Any example implementation??

 Building libgcc is not optional.  It is required for all targets.

 Ian


Re: soft-fp functions support without using libgcc

2014-05-21 Thread Sheheryar Zahoor Qazi
Building libgcc is not optional.  It is required for all targets.

So, irrespective whether i provide floating point implementation by
soft-fp, fpu-bit or ieeelib, an error free libgcc build is a MUST?

What if I dont want to generate calls to libgcc.a but want want gcc to
generate inline code?

Regards

Sheheryar


Re: soft-fp functions support without using libgcc

2014-05-21 Thread Ian Lance Taylor
On Wed, May 21, 2014 at 6:13 AM, Sheheryar Zahoor Qazi
sheheryar.zahoor.q...@gmail.com wrote:
Building libgcc is not optional.  It is required for all targets.

 So, irrespective whether i provide floating point implementation by
 soft-fp, fpu-bit or ieeelib, an error free libgcc build is a MUST?

Yes.

 What if I dont want to generate calls to libgcc.a but want want gcc to
 generate inline code?

libgcc also provides functionality that GCC requires that can not
reasonably be inlined, such as the stack unwind code used for
exception handling.

Ian


Re: soft-fp functions support without using libgcc

2014-05-20 Thread Sheheryar Zahoor Qazi
If you have a working compiler that is missing some functions
provided by libgcc, that should be sufficient to build libgcc.
Meaning that even if i am unable build libgcc to my new architecture,
I should be able to able to provide soft-fp support to the
architecture?

Btw i get the following error when i build gcc:
configure:2627: error: in
`/target-arch/target-arch-gcc/builddir/target-arch/libgcc':
configure:2630: error: cannot compute suffix of object files: cannot compile


And regarding soft-fp, I get the following error when i use soft-fp
functions in a test program:
: In function `test':
(.text+0x0): undefined reference to `__floatsisf'
 In function `test':
: In function `test':
(.text+0x2c): undefined reference to `__mulsf3'
: In function `test':
(.text+0x2e): undefined reference to `__fixsfsi'

Is this due to libgcc build fail or it just linking error?


In other words, if you want soft-fp for IEEE float, the job should be very 
simple because that has already been done.  If you want soft-fp for CDC 6000 
float, you have to do a full implementation of that.
Actually i want soft-fp for standard IEEE 754

Sheheryar


On Fri, May 16, 2014 at 6:34 PM,  paul_kon...@dell.com wrote:

 On May 16, 2014, at 12:25 PM, Ian Bolton ian.bol...@arm.com wrote:

 On Fri, May 16, 2014 at 6:34 AM, Sheheryar Zahoor Qazi
 sheheryar.zahoor.q...@gmail.com wrote:

 I am trying to provide soft-fp support to a an 18-bit soft-core
 processor architecture at my university. But the problem is that
 libgcc has not been cross-compiled for my target architecture and
 some
 functions are missing so i cannot build libgcc.I believe soft-fp is
 compiled in libgcc so i am usable to invoke soft-fp functions from
 libgcc.
 It is possible for me to provide soft-fp support without using
 libgcc.
 How should i proceed in defining the functions? Any idea? And does
 any
 archoitecture provide floating point support withoput using libgcc?

 I'm sorry, I don't understand the premise of your question.  It is not
 necessary to build libgcc before building libgcc.  That would not make
 sense.  If you have a working compiler that is missing some functions
 provided by libgcc, that should be sufficient to build libgcc.

 If you replace cross-compiled with ported, I think it makes senses.
 Can one provide soft-fp support without porting libgcc for their
 architecture?

 By definition, in soft-fp you have to implement the FP operations in 
 software.  That’s not quite the same as porting libgcc to the target 
 architecture.  It should translate to porting libgcc (the FP emulation part) 
 to the floating point format being used.

 In other words, if you want soft-fp for IEEE float, the job should be very 
 simple because that has already been done.  If you want soft-fp for CDC 6000 
 float, you have to do a full implementation of that.

 paul



Re: soft-fp functions support without using libgcc

2014-05-20 Thread Ian Lance Taylor
On Tue, May 20, 2014 at 7:37 AM, Sheheryar Zahoor Qazi
sheheryar.zahoor.q...@gmail.com wrote:
If you have a working compiler that is missing some functions
provided by libgcc, that should be sufficient to build libgcc.
 Meaning that even if i am unable build libgcc to my new architecture,
 I should be able to able to provide soft-fp support to the
 architecture?

You need to build soft-fp as part of libgcc.  What I am saying is that
you don't need soft-fp support in order to build libgcc.


 Btw i get the following error when i build gcc:
 configure:2627: error: in
 `/target-arch/target-arch-gcc/builddir/target-arch/libgcc':
 configure:2630: error: cannot compute suffix of object files: cannot compile

You need to look in target-arch/libgcc/config.log to see what the
problem is.


 And regarding soft-fp, I get the following error when i use soft-fp
 functions in a test program:
 : In function `test':
 (.text+0x0): undefined reference to `__floatsisf'
  In function `test':
 : In function `test':
 (.text+0x2c): undefined reference to `__mulsf3'
 : In function `test':
 (.text+0x2e): undefined reference to `__fixsfsi'

 Is this due to libgcc build fail or it just linking error?

It's because libgcc was not built.

Ian


soft-fp functions support without using libgcc

2014-05-16 Thread Sheheryar Zahoor Qazi
Hi all,
I am trying to provide soft-fp support to a an 18-bit soft-core
processor architecture at my university. But the problem is that
libgcc has not been cross-compiled for my target architecture and some
functions are missing so i cannot build libgcc.I believe soft-fp is
compiled in libgcc so i am usable to invoke soft-fp functions from
libgcc.
It is possible for me to provide soft-fp support without using libgcc.
How should i proceed in defining the functions? Any idea? And does any
archoitecture provide floating point support withoput using libgcc?

Regards
Sheheryar


Re: soft-fp functions support without using libgcc

2014-05-16 Thread Ian Lance Taylor
On Fri, May 16, 2014 at 6:34 AM, Sheheryar Zahoor Qazi
sheheryar.zahoor.q...@gmail.com wrote:

 I am trying to provide soft-fp support to a an 18-bit soft-core
 processor architecture at my university. But the problem is that
 libgcc has not been cross-compiled for my target architecture and some
 functions are missing so i cannot build libgcc.I believe soft-fp is
 compiled in libgcc so i am usable to invoke soft-fp functions from
 libgcc.
 It is possible for me to provide soft-fp support without using libgcc.
 How should i proceed in defining the functions? Any idea? And does any
 archoitecture provide floating point support withoput using libgcc?

I'm sorry, I don't understand the premise of your question.  It is not
necessary to build libgcc before building libgcc.  That would not make
sense.  If you have a working compiler that is missing some functions
provided by libgcc, that should be sufficient to build libgcc.

Ian


RE: soft-fp functions support without using libgcc

2014-05-16 Thread Ian Bolton
 On Fri, May 16, 2014 at 6:34 AM, Sheheryar Zahoor Qazi
 sheheryar.zahoor.q...@gmail.com wrote:
 
  I am trying to provide soft-fp support to a an 18-bit soft-core
  processor architecture at my university. But the problem is that
  libgcc has not been cross-compiled for my target architecture and
 some
  functions are missing so i cannot build libgcc.I believe soft-fp is
  compiled in libgcc so i am usable to invoke soft-fp functions from
  libgcc.
  It is possible for me to provide soft-fp support without using
 libgcc.
  How should i proceed in defining the functions? Any idea? And does
 any
  archoitecture provide floating point support withoput using libgcc?
 
 I'm sorry, I don't understand the premise of your question.  It is not
 necessary to build libgcc before building libgcc.  That would not make
 sense.  If you have a working compiler that is missing some functions
 provided by libgcc, that should be sufficient to build libgcc.

If you replace cross-compiled with ported, I think it makes senses.
Can one provide soft-fp support without porting libgcc for their
architecture?

Cheers,
Ian





Re: soft-fp functions support without using libgcc

2014-05-16 Thread Paul_Koning

On May 16, 2014, at 12:25 PM, Ian Bolton ian.bol...@arm.com wrote:

 On Fri, May 16, 2014 at 6:34 AM, Sheheryar Zahoor Qazi
 sheheryar.zahoor.q...@gmail.com wrote:
 
 I am trying to provide soft-fp support to a an 18-bit soft-core
 processor architecture at my university. But the problem is that
 libgcc has not been cross-compiled for my target architecture and
 some
 functions are missing so i cannot build libgcc.I believe soft-fp is
 compiled in libgcc so i am usable to invoke soft-fp functions from
 libgcc.
 It is possible for me to provide soft-fp support without using
 libgcc.
 How should i proceed in defining the functions? Any idea? And does
 any
 archoitecture provide floating point support withoput using libgcc?
 
 I'm sorry, I don't understand the premise of your question.  It is not
 necessary to build libgcc before building libgcc.  That would not make
 sense.  If you have a working compiler that is missing some functions
 provided by libgcc, that should be sufficient to build libgcc.
 
 If you replace cross-compiled with ported, I think it makes senses.
 Can one provide soft-fp support without porting libgcc for their
 architecture?

By definition, in soft-fp you have to implement the FP operations in software.  
That’s not quite the same as porting libgcc to the target architecture.  It 
should translate to porting libgcc (the FP emulation part) to the floating 
point format being used.

In other words, if you want soft-fp for IEEE float, the job should be very 
simple because that has already been done.  If you want soft-fp for CDC 6000 
float, you have to do a full implementation of that.

paul