Intel® C++ Compiler
Community support and assistance for creating C++ code that runs on platforms based on Intel® processors.

Assembly output issue

jwitmann
Beginner
300 Views
Hi,

I should have reported this long ago, but I did a script that was fixing my issue. To put it simply, the way the LABEL are encoded is wrong since v11.0, and MASM would not process and assemble the file because of it. It seems someone decided to replace the '$' in labels by '.', which in turn breaks everything.

Back when the compiler was still on v10.1 a typical asm output was like:

_BASE64_freeContext PROC NEAR
$B1$1: ; Preds $B1$0
mov eax, DWORD PTR _mp_decBase64 ;58.17
test eax, eax ;58.5
jne $B1$3 ; Prob 68% ;58.5
; LOE eax ebx ebp esi edi
$B1$2: ; Preds $B1$1
mov eax, -6001 ;59.9
ret ;59.9
; LOE eax ebx ebp esi edi
$B1$3: ; Preds $B1$1
push eax ;58.17
call DWORD PTR __imp__free ;62.9
; LOE ebx ebp esi edi
$B1$8: ; Preds $B1$3
pop ecx ;62.9
; LOE ebx ebp esi edi
$B1$4: ; Preds $B1$8
mov DWORD PTR _mp_decBase64, 0 ;63.9
xor eax, eax ;
; LOE eax ebx ebp esi edi
$B1$5: ; Preds $B1$4
ret ;66.12
ALIGN 4
; LOE


From version 11.x the code output changed to:

_BASE64_freeContext PROC NEAR
.B4.1: ; Preds .B4.0
mov eax, DWORD PTR [_mp_decBase64.0] ;58.17
test eax, eax ;58.17
jne .B4.3 ; Prob 68% ;58.17
; LOE eax ebx ebp esi edi
.B4.2: ; Preds .B4.1
mov eax, -6001 ;59.9
ret ;59.9
; LOE eax ebx ebp esi edi
.B4.3: ; Preds .B4.1
push eax ;58.17
call DWORD PTR [__imp__free] ;62.9
; LOE ebx ebp esi edi
.B4.8: ; Preds .B4.3
pop ecx ;62.9
; LOE ebx ebp esi edi
.B4.4: ; Preds .B4.8
mov DWORD PTR [_mp_decBase64.0], 0 ;63.9
xor eax, eax ;
; LOE eax ebx ebp esi edi
.B4.5: ; Preds .B4.4
ret ;66.12
ALIGN 16
; LOE

This is not really hard to fix by a postprocessing tool, however It'd be better if the compiler was outputting directly the right syntax.

Regards,
Jerome
0 Kudos
0 Replies
Reply