|
; Listing generated by Microsoft (R) Optimizing Compiler Version 16.00.30319.01
TITLE D:\Articles\CodeProject\switch\CppExample\switch7.cpp
.686P
.XMM
include listing.inc
.model flat
INCLUDELIB LIBCMTD
INCLUDELIB OLDNAMES
PUBLIC ?main7@@YAHXZ ; main7
EXTRN ?f3@@YAXXZ:PROC ; f3
EXTRN ?f1@@YAXXZ:PROC ; f1
EXTRN ?f2@@YAXXZ:PROC ; f2
EXTRN __RTC_CheckEsp:PROC
EXTRN __RTC_Shutdown:PROC
EXTRN __RTC_InitBase:PROC
; COMDAT rtc$TMZ
; File d:\articles\codeproject\switch\cppexample\switch7.cpp
rtc$TMZ SEGMENT
__RTC_Shutdown.rtc$TMZ DD FLAT:__RTC_Shutdown
rtc$TMZ ENDS
; COMDAT rtc$IMZ
rtc$IMZ SEGMENT
__RTC_InitBase.rtc$IMZ DD FLAT:__RTC_InitBase
; Function compile flags: /Odtp /RTCsu /ZI
rtc$IMZ ENDS
; COMDAT ?main7@@YAHXZ
_TEXT SEGMENT
tv64 = -208 ; size = 4
_i$ = -8 ; size = 4
?main7@@YAHXZ PROC ; main7, COMDAT
; 4 : {
push ebp
mov ebp, esp
sub esp, 208 ; 000000d0H
push ebx
push esi
push edi
lea edi, DWORD PTR [ebp-208]
mov ecx, 52 ; 00000034H
mov eax, -858993460 ; ccccccccH
rep stosd
; 5 : int i =15;
mov DWORD PTR _i$[ebp], 15 ; 0000000fH
; 6 :
; 7 : switch (i)
mov eax, DWORD PTR _i$[ebp]
mov DWORD PTR tv64[ebp], eax
mov ecx, DWORD PTR tv64[ebp]
add ecx, 3
mov DWORD PTR tv64[ebp], ecx
cmp DWORD PTR tv64[ebp], 21 ; 00000015H
ja SHORT $LN5@main7
mov edx, DWORD PTR tv64[ebp]
movzx eax, BYTE PTR $LN15@main7[edx]
jmp DWORD PTR $LN16@main7[eax*4]
$LN10@main7:
; 8 : {
; 9 : case 2: f2(); break;
call ?f2@@YAXXZ ; f2
jmp SHORT $LN11@main7
$LN9@main7:
; 10 : case 1: f1(); break;
call ?f1@@YAXXZ ; f1
jmp SHORT $LN11@main7
$LN8@main7:
; 11 : case 5: f1(); break;
call ?f1@@YAXXZ ; f1
jmp SHORT $LN11@main7
$LN7@main7:
; 12 : case 10: f1(); break;
call ?f1@@YAXXZ ; f1
jmp SHORT $LN11@main7
$LN6@main7:
; 13 : case 7: f2(); break;
call ?f2@@YAXXZ ; f2
jmp SHORT $LN11@main7
$LN5@main7:
; 14 : default: f3(); break;
call ?f3@@YAXXZ ; f3
jmp SHORT $LN11@main7
$LN4@main7:
; 15 : case -3: f2(); break;
call ?f2@@YAXXZ ; f2
jmp SHORT $LN11@main7
$LN3@main7:
; 16 : case 12: f1(); break;
call ?f1@@YAXXZ ; f1
jmp SHORT $LN11@main7
$LN2@main7:
; 17 : case 17: f2(); break;
call ?f2@@YAXXZ ; f2
jmp SHORT $LN11@main7
$LN1@main7:
; 18 : case 18: f1(); break;
call ?f1@@YAXXZ ; f1
$LN11@main7:
; 19 : }
; 20 :
; 21 : return 0;
xor eax, eax
; 22 : }
pop edi
pop esi
pop ebx
add esp, 208 ; 000000d0H
cmp ebp, esp
call __RTC_CheckEsp
mov esp, ebp
pop ebp
ret 0
$LN16@main7:
DD $LN4@main7
DD $LN9@main7
DD $LN10@main7
DD $LN8@main7
DD $LN6@main7
DD $LN7@main7
DD $LN3@main7
DD $LN2@main7
DD $LN1@main7
DD $LN5@main7
$LN15@main7:
DB 0
DB 9
DB 9
DB 9
DB 1
DB 2
DB 9
DB 9
DB 3
DB 9
DB 4
DB 9
DB 9
DB 5
DB 9
DB 6
DB 9
DB 9
DB 9
DB 9
DB 7
DB 8
?main7@@YAHXZ ENDP ; main7
_TEXT ENDS
END
|
By viewing downloads associated with this article you agree to the Terms of Service and the article's licence.
If a file you wish to view isn't highlighted, and is a text file (not binary), please
let us know and we'll add colourisation support for it.
This member has not yet provided a Biography. Assume it's interesting and varied, and probably something to do with programming.