Tool/software: Code Composer Studio
Hello, I am currently trying to port matrixSSL to the TIARM-compiler (which is a challenge, as most performance boosts for the GNU-compiler come from __asm__ statements, which don't work). When debugging some of the code, the disassembler shows some weird output (the software works, but the output looks strange). The asm-file shows:
.dwcfi cfa_offset, 0
PUSH {A4, V1, V2, V3, V4, LR} ; [DPU_V7M3_PIPE]
.dwcfi cfa_offset, 24
.dwcfi save_reg_to_mem, 14, -4
.dwcfi save_reg_to_mem, 7, -8
.dwcfi save_reg_to_mem, 6, -12
.dwcfi save_reg_to_mem, 5, -16
.dwcfi save_reg_to_mem, 4, -20
.dwcfi save_reg_to_mem, 3, -24
MOV V4, A1 ; [DPU_V7M3_PIPE] |1251|
MOV V1, A4 ; [DPU_V7M3_PIPE] |1251|
MOV V3, A2 ; [DPU_V7M3_PIPE] |1251|
.dwpsn file "D:/.../matrixssl-4-2-1/crypto/math/pstmnt.c",line 1259,column 5,is_stmt,isa 1
;----------------------------------------------------------------------
; 1259 | carry -= pstmnt_sub_mask(p, r, n, -(pstmnt_word) 1);
;----------------------------------------------------------------------
MOV A1, A2 ; [DPU_V7M3_PIPE] |1259|
.dwpsn file "D:/.../matrixssl-4-2-1/crypto/math/pstmnt.c",line 1251,column 1,is_stmt,isa 1
MOV V2, A3 ; [DPU_V7M3_PIPE] |1251|
.dwpsn file "D:/.../matrixssl-4-2-1/crypto/math/pstmnt.c",line 1259,column 5,is_stmt,isa 1
MOV A4, #-1 ; [DPU_V7M3_PIPE] |1259|
If I look at the same sequence in the debugger, it shows the following:
pstmnt_cmp_sub_mod_carry():
0004a418: B5F8 push {r3, r4, r5, r6, r7, lr}
0004a419: 07B5 .word 0x000007b5
0004a41b: 1C46 .word 0x00001c46
0004a41d: 0E46 .word 0x00000e46
0004a41f: 0846 .word 0x00000846
1259 carry -= pstmnt_sub_mask(p, r, n, -(pstmnt_word) 1);
0004a420: 4608 mov r0, r1
1251 {
0004a422: 4615 mov r5, r2
1251 {
......... 4F46 .word 0x00004f46
First of all, push is a 16bit-command. So the address increment of 1 is already wrong. In 0x4a420 it is resynced, but later it even doesn't show an address.
Is it a wrong setting or a disassembler bug? I don't know which component versions are interesting and the complete list is quite long. Here are some:
Code Composer Studio Base Components 8.3.0.01611
Code Composer Studio IDE ARM Components 8.3.0.201810301800
Debug Server 8.3.0.1611
Tiva C Series ARM MCUs 2.1.1.15071
Regards
Klaus