gcc port to StarCore

2007-02-13 Thread David Livshin


Hi,

I am converting my StarCore port of the gcc version 3.2 to the current version 
4.1.1.
The following program ( part of the gcc's testsuite )

void bar(int *pc) {
 static const void *l[] = {&&lab0, &&end};

 foo(0);
 goto *l[*pc];
lab0:
 foo(0);
 pc++;
 goto *l[*pc];
end:
 return;
}


successfully compiled under 3.2 but under 4.1.1 I am getting the following 
error:


x.c: In function ‘bar’:
x.c:13: error: unrecognizable insn:
(jump_insn 26 25 27 2 (set (pc)
   (reg:SI 52)) -1 (nil)
   (nil))
x.c:13: internal compiler error: in extract_insn, at recog.c:2084


The .md file defines ( mandatory ) "indirect_jump" which allows ( a certain 
kind of ) register as parameter.
What is missing?

Thank you in advance,

David


--
David Livshin

http://www.dalsoft.com



Re: gcc port to StarCore

2007-02-13 Thread David Livshin

Ian Lance Taylor wrote:

David Livshin <[EMAIL PROTECTED]> writes:

  

x.c: In function ‘bar’:
x.c:13: error: unrecognizable insn:
(jump_insn 26 25 27 2 (set (pc)
(reg:SI 52)) -1 (nil)
(nil))
x.c:13: internal compiler error: in extract_insn, at recog.c:2084


The .md file defines ( mandatory ) "indirect_jump" which allows ( a certain 
kind of ) register as parameter.
What is missing?



Either the pattern doesn't match indirect_jump, or the instruction
predicate returns zero, or the operand predicate returns zero.

Beyond that we don't have enough information to say.

Ian
  
Is there a way to find out what was the pattern? And if the operand 
predicate fails, shouldn't gcc attempt to reassign the ( register , 
"(reg:SI 52)" ) operand in order to satisfy the predicate?


--
David Livshin

http://www.dalsoft.com



Thread safe functions from the C standard library

2008-12-09 Thread David Livshin

Hi,

What functions from the GNU's C standard library ( libc ) are thread 
safe? Of a particular interest are transcendental functions ( like 
'exp', 'sin' etc. ) - are they thread safe?


Are there any requirements/guidelines/assurances regarding thread safety 
of functions from the  C library?


Thanks in advance.

--
David Livshin

http://www.dalsoft.com



Re: Thread safe functions from the C standard library

2008-12-09 Thread David Livshin

Ian Lance Taylor wrote:

David Livshin <[EMAIL PROTECTED]> writes:

  

What functions from the GNU's C standard library ( libc ) are thread
safe? Of a particular interest are transcendental functions ( like
exp', 'sin' etc. ) - are they thread safe?

Are there any requirements/guidelines/assurances regarding thread
safety of functions from the  C library?



I'm sorry, this is the wrong mailing list.  This is a mailing list for
gcc developers.  Questions about using gcc should be sent to
[EMAIL PROTECTED]  However, this is a question about glibc; glibc
is not part of gcc.  For glibc, please see
http://sourceware.org/glibc/ .

As far as I know the functions like exp and sin are all thread safe.

Ian

  


Thank you for the pointer - I will redirect my question to the 
"libc-help" mailing list.


I thought that "gcc" mailing list is appropriate as I need this 
information in order to implement auto-parallelizer for the 
gcc-generated code. How the gcc-supported parallelizer (  
"-ftree-parallelize-loops=n" ) treats the calls to library routines?


--
David Livshin

http://www.dalsoft.com