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.

  • Resolved

Compiler/MSP432P401R: Incorrect _sxtb16() implementation TI ARM Compiler v18.1.3.LTS

Part Number: MSP432P401R

Tool/software: TI C/C++ Compiler

Hi, 

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. 

43325.main.c

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,

    -George


    TI C/C++ Compiler Forum Moderator
    Please click This Resolved My Issue on the best reply to your question
    The CCS Youtube Channel
     has short how-to videos
    The 
    Compiler Wiki answers most common questions
    Track an issue with SDOWP. Enter your bug id in the Search box.

  • In reply to George Mock:

    Hi George,

    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.

    compiler_bug_build_console.txt

    main.pp

    Best regards,

    Caleb Overbay

  • In reply to Caleb Overbay:

    Thanks for the test case.  I added it to the existing report.

    Thanks and regards,

    -George


    TI C/C++ Compiler Forum Moderator
    Please click This Resolved My Issue on the best reply to your question
    The CCS Youtube Channel
     has short how-to videos
    The 
    Compiler Wiki answers most common questions
    Track an issue with SDOWP. Enter your bug id in the Search box.

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.