Part Number: MSP432P401R
Tool/software: TI C/C++ Compiler
I was working with the CMSIS v5 DSPLib and noticed a difference in behavior when using the TI ARM Compiler v16.9.9.LTS versus the TI ARM Compiler v18.1.3.LTS.
I narrowed the issue down to the _sxtb16() intrinsic function:
Table 5-4 of ARM Optimizing C/C++ Compiler User's Guide
Section 4.6.186 of ARM Architecture Reference Manual Thumb-2 Supplement
Assembly code for correct implementation on TI ARM Compiler v16.9.9.LTS:
Assembly code for incorrect implementation on TI ARM Compiler v18.1.3.LTS
You can see the difference in the way the data is loaded with ldr or ldrsb.w. I've attached a main.c file with minimal code to reproduce the issue.
Can you verify if this is a real issue?
Best regards, Caleb Overbay
I am unable to reproduce the exact same assembly output. But I did reproduce it closely enough to conclude there is probably a problem. So, I filed CODEGEN-5473 in the SDOWP system to have this investigated. You are welcome to follow it with the SDOWP link below in my signature.
The reason I cannot precisely reproduce your results is probably because I don't use the same compiler build options. To be certain I am reproducing exactly the same problem for the exactly the same reason, please submit a test case as described in the article How to Submit a Compiler Test Case. I'll add it to the existing report.
Thanks and regards,
TI C/C++ Compiler Forum ModeratorPlease click This Resolved My Issue on the best reply to your questionThe CCS Youtube Channel has short how-to videosThe Compiler Wiki answers most common questionsTrack an issue with SDOWP. Enter your bug id in the Search box.
We are glad that we were able to resolve this issue, and will now proceed to close this thread.
If you have further questions related to this thread, you may click "Ask a related question" below. The newly created question will be automatically linked to this question.
In reply to George Mock:
Thanks for looking into this. I've attached my pre-processed main.c file and the console build log containing the compiler and linker options. Let me know if you need anything else from me.
In reply to Caleb Overbay:
Thanks for the test case. I added it to the existing report.
All content and materials on this site are provided "as is". TI and its respective suppliers and providers of content make no representations about the suitability of these materials for any purpose and disclaim all warranties and conditions with regard to these materials, including but not limited to all implied warranties and conditions of merchantability, fitness for a particular purpose, title and non-infringement of any third party intellectual property right. No license, either express or implied, by estoppel or otherwise, is granted by TI. Use of the information on this site may require a license from a third party, or a license from TI.
TI is a global semiconductor design and manufacturing company. Innovate with 100,000+ analog ICs andembedded processors, along with software, tools and the industry’s largest sales/support staff.