--- Quote Start ---
What result do you get instead of he expected 11?
Try with this alternate data:
alt_u8 small_1[4]= {0x01,0x02,0x04,0x08};
alt_u8 small_2[4]= {0x10,0x20,0x40,0x80};
With this trick you can easily see which data has been added in the result: every bit set to 1 will indicate a specific addendum.
--- Quote End ---
Thanks Cris for the handy trick. Well, I found out that no matter what data I had in the array, I was always getting 930 as result. In memory, this appeared as A2 and 03. So I deduced something was definitely wrong with my passing of inputs as pointers. Then I tried passing them as 32-bit values, i.e. using __builtin_custom_inii and
alt_u32 input1_32bits = (small_1<<24) | (small_1<<16) |(small_1<<8) | small_1 ;
alt_u32 input2_32bits = (small_2<<24) | (small_2<<16) |(small_2<<8) | small_2 ;
custom_int_res = ALT_CI_MYMACRO(input1_32bits ,input2_32bits );
This one gave the expected result of 11! I will keep using the builtin_custom_inii now and next thing is I will try your trick of earlier post with pointers which didn't require any cpu effort. But knowing me, be prepared to hear from me soon as pointers and I will never be friends :)