PIC32 AI compiler S-reg swap bug on PIC32MZ

Fully featured ARM compilers available on Windows, Linux, and macOS.
Post Reply
Author
Message
Ilya K
Posts: 1
Joined: 07 Jun 2023 08:43

PIC32 AI compiler S-reg swap bug on PIC32MZ

#1 Post by Ilya K » 28 Nov 2023 13:35

The PIC32 AI compiler v3.0.0 (2022) generates the following code for PIC32MZ and then uses the registers S2 and S3 as if they were swapped, but the value in S2 is actually lost.

;Address Opcode ASM
0x9D0380AC 0x46001886 MOV.S S2, S3
0x9D0380B0 0x460010C6 MOV.S S3, S2

If the option -SSA is omitted, then these variables reside on stack and this error does not appear.

Post Reply

Return to “PIC32 AI Compilers”