Re: inline assembly vs. intrinsic functions

2011-03-28 Thread Ian Lance Taylor
roy rosen writes: > 2011/3/24 Ian Lance Taylor : >> roy rosen writes: >> You build a RECORD_TYPE holding the fields you want to return.  You define the appropriate builtin functions to return that record type. >>> >>> How is that done? using define_insn? How do I tell it to return a st

Re: inline assembly vs. intrinsic functions

2011-03-28 Thread roy rosen
2011/3/24 Ian Lance Taylor : > roy rosen writes: > >>> You build a RECORD_TYPE holding the fields you want to return.  You >>> define the appropriate builtin functions to return that record type. >> >> How is that done? using define_insn? How do I tell it to return a struct? >> Is there an example

Re: inline assembly vs. intrinsic functions

2011-03-24 Thread Ian Lance Taylor
roy rosen writes: >> You build a RECORD_TYPE holding the fields you want to return.  You >> define the appropriate builtin functions to return that record type. > > How is that done? using define_insn? How do I tell it to return a struct? > Is there an example I can look at? A RECORD_TYPE is wha

Re: inline assembly vs. intrinsic functions

2011-03-24 Thread roy rosen
2011/3/22 Ian Lance Taylor : > roy rosen writes: > >> 2010/10/26 Ian Lance Taylor : >>> roy rosen writes: >>> I am trying to demonstrate my port capabilities. I am writing an application which needs to use instructions like max a,b,c,d,e,f where a,b,c are inputs and d,e,f are outpu

Re: inline assembly vs. intrinsic functions

2011-03-21 Thread Ian Lance Taylor
roy rosen writes: > 2010/10/26 Ian Lance Taylor : >> roy rosen writes: >> >>> I am trying to demonstrate my port capabilities. >>> I am writing an application which needs to use instructions like max >>> a,b,c,d,e,f where a,b,c are inputs and d,e,f are outputs. >>> Is that possible to write an i

Re: inline assembly vs. intrinsic functions

2011-03-17 Thread roy rosen
2010/10/26 Ian Lance Taylor : > roy rosen writes: > >> I am trying to demonstrate my port capabilities. >> I am writing an application which needs to use instructions like max >> a,b,c,d,e,f where a,b,c are inputs and d,e,f are outputs. >> Is that possible to write an intrinsic function for that?

Re: inline assembly vs. intrinsic functions

2010-11-15 Thread Ian Lance Taylor
roy rosen writes: > Is there any another way to give attributes to inline assembly insns? Not that I know of. It would be a useful feature in some cases, though difficult to document. For specific cases a backend can normally do better by providing builtin functions. Ian

Re: inline assembly vs. intrinsic functions

2010-11-15 Thread roy rosen
But this lets you just set default attributes. I want to set real attributes so that the compiler would be able to know which insn can be parallelized with another. Is there a different way? Are you saying that an inline assembly statement would stay as is, and would not be touched by the compiler

Re: inline assembly vs. intrinsic functions

2010-11-15 Thread Joern Rennecke
Quoting roy rosen : Is there any another way to give attributes to inline assembly insns? See define_asm_attributes.

Re: inline assembly vs. intrinsic functions

2010-11-15 Thread roy rosen
Is there any another way to give attributes to inline assembly insns? 2010/10/26 Ian Lance Taylor : > roy rosen writes: > >> If I want the compiler to understand the inline assembly is it >> possible to write define_insn which would match the pattern that GCC >> creates for the inline assembly an

Re: inline assembly vs. intrinsic functions

2010-10-26 Thread Ian Lance Taylor
roy rosen writes: > If I want the compiler to understand the inline assembly is it > possible to write define_insn which would match the pattern that GCC > creates for the inline assembly and then GCC would be able to 'know' > some attributes about this insn and would be able to parallelize it?

Re: inline assembly vs. intrinsic functions

2010-10-26 Thread roy rosen
If I want the compiler to understand the inline assembly is it possible to write define_insn which would match the pattern that GCC creates for the inline assembly and then GCC would be able to 'know' some attributes about this insn and would be able to parallelize it? 2010/10/26 roy rosen : > I d

Re: inline assembly vs. intrinsic functions

2010-10-26 Thread roy rosen
I didn't give the full details of the instruction but for example a max instruction which gets an array and returns both the max value and its index in the array will need to return more than one argument. 2010/10/26 Ian Lance Taylor : > roy rosen writes: > >> I am trying to demonstrate my port c

Re: inline assembly vs. intrinsic functions

2010-10-26 Thread Ian Lance Taylor
roy rosen writes: > I am trying to demonstrate my port capabilities. > I am writing an application which needs to use instructions like max > a,b,c,d,e,f where a,b,c are inputs and d,e,f are outputs. > Is that possible to write an intrinsic function for that? > I think not because that means that