I talked to our guy that originally did this work for gcc and thought 
some more.

Essentially we call a different function based on the actual argument:

foo(a) for the given dsp instruction

if the value of a is not known at compile time, then we must use the 
register form of the instruction
if the value of a is known at compile time and small enough to fit in 
the immediate field, then we can use the immediate form;  otherwise we 
must use the register form


On 07/17/2012 01:03 PM, reed kotler wrote:
> On 07/17/2012 01:26 AM, Simon Atanasyan wrote:
>> On Tue, Jul 17, 2012 at 8:15 AM, reed kotler<[email protected]>   wrote:
>>> Hmmm...
>>>
>>> Seems like any kind of overloading resolution should be done by clang.
>>>
>>> there can be lots of issues regarding implicit conversions and other c++
>>> things.
>> It's not an overloading in the spirit of C++. Here is we select
>> intrinsics based on an argument's value. While C++ overloading uses an
>> argument's type.
>>
>> --
>> Simon
> Register is a different type.
>
> These two inline functions are essentially inline assembly instructions
> and we should give the user what he is asking for.
>
> They have subtly different semantics too.
>
> Reed
>
> _______________________________________________
> cfe-commits mailing list
> [email protected]
> http://lists.cs.uiuc.edu/mailman/listinfo/cfe-commits

_______________________________________________
cfe-commits mailing list
[email protected]
http://lists.cs.uiuc.edu/mailman/listinfo/cfe-commits

Reply via email to