This thread has been locked.
If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.
The _gmpy() intrinsic on C64x+ and later DSP cores uses GPLYA versus GPLYB based on which side the GMPY instruction executes on. If a developer wants to use two different generator polynomials at the same time, is there a way to constrain a particular call to _gmpy() to use side A or side B, and thus use the intended polynomial?
If the current answer is no, it would be nice if the compiler recognized intrinsics like _gmpya() and _gmpyb() to do this, keeping _gmpy() for cases where GPLYA==GPLYB and the developer wants to leave the side assignment to the compiler.
Michael P said:is there a way to constrain a particular call to _gmpy() to use side A or side B, and thus use the intended polynomial?
Unfortunately, no.
To solve this problem today, your best bet is linear assembly. Linear assembly is method of programming for C6000 that, in terms of abstraction, is at a level between C code and hand-coded assembly. The problem of instruction selection is left entirely to the user. The problems of instruction scheduling (including software pipelining), register allocation, and partitioning (whether to use the A-side or B-side) are left to the compiler, though the user has some ability to dictate some of these details. Read about it in the chapter titled Using the Assembly Optimizer in the C6000 compiler manual.
As for changing how the _gmpy intrinsic works ... I filed SDSCM00046615 in the SDOWP system to have that idea considered. Feel free to follow it with the SDOWP link below in my signature.
Thanks and regards,
-George