Part Number:TMS320C6455
Tool/software: TI C/C++ Compiler
Hello,
I am working for Tms320c6455 and hit a blocking issue when trying to do a simple 16bit complex multiplication.
(1) how to force sign extended right shift?
code:
~~~~
long long tmp_pm0, tmp_pm1, tmp_pm;
tmp_pm0 = _cmpy(_loll(_amem8_const(&a[i])), _loll(_amem8_const(&b[i])));
tmp_pm1 = _cmpy(_hill(_amem8_const(&a[i])), _hill(_amem8_const(&b[i])));
tmp_pm = _itoll(_pack2(_loll(tmp_pm1))>> 15, _hill(tmp_pm1) >> 15),
_pack2(_loll(tmp_pm0) >> 15, _hill(tmp_pm0)) >> 15);I tried casting the each of the _lo & _hi elements to signed before the shift right, still it would only treat is as unsigned and use the SHRU instruction and not the signed SHR.
(2) I thought I could use the intrinsic _shr() directly instead of using the C operator >>, but then _shr() does not exists, and it appears a good portion of the assembly instructions do not have intrinsic equivalents. I thought it would be useful to have the full set.
Please send me suggestion to get sign extended right shift in the most efficient way for 16-bit complex multiply operation.
Thanks,
-Michael.