Skip to content

Instantly share code, notes, and snippets.

Created August 14, 2011 08:29
Show Gist options
  • Select an option

  • Save anonymous/1144706 to your computer and use it in GitHub Desktop.

Select an option

Save anonymous/1144706 to your computer and use it in GitHub Desktop.
Open mp test / ptt / tropical72
; Listing generated by Microsoft (R) Optimizing Compiler Version 15.00.30729.01
TITLE d:\Setting\XP_DESKTOP\Algorithm\Test\VCTest\main.cpp
.686P
.XMM
include listing.inc
.model flat
INCLUDELIB OLDNAMES
PUBLIC ??_C@_0BG@JDKNBCPE@code1?5?$CIopenmp?5inside?$CJ?$AA@ ; `string'
PUBLIC ??_C@_0BA@LIDABEPC@?$CFs?5elaspe?3?5?$CFld?6?$AA@ ; `string'
PUBLIC ??_C@_0P@MACJDOEB@code2?5?$CInormal?$CJ?$AA@ ; `string'
PUBLIC ??_C@_0BH@IGDMJOPJ@code3?5?$CIopenmp?5outside?$CJ?$AA@ ; `string'
EXTRN _clock:PROC
EXTRN _printf:PROC
; COMDAT ??_C@_0BH@IGDMJOPJ@code3?5?$CIopenmp?5outside?$CJ?$AA@
CONST SEGMENT
??_C@_0BH@IGDMJOPJ@code3?5?$CIopenmp?5outside?$CJ?$AA@ DB 'code3 (openmp '
DB 'outside)', 00H ; `string'
CONST ENDS
; COMDAT ??_C@_0P@MACJDOEB@code2?5?$CInormal?$CJ?$AA@
CONST SEGMENT
??_C@_0P@MACJDOEB@code2?5?$CInormal?$CJ?$AA@ DB 'code2 (normal)', 00H ; `string'
CONST ENDS
; COMDAT ??_C@_0BA@LIDABEPC@?$CFs?5elaspe?3?5?$CFld?6?$AA@
CONST SEGMENT
??_C@_0BA@LIDABEPC@?$CFs?5elaspe?3?5?$CFld?6?$AA@ DB '%s elaspe: %ld', 0aH
DB 00H ; `string'
CONST ENDS
; COMDAT ??_C@_0BG@JDKNBCPE@code1?5?$CIopenmp?5inside?$CJ?$AA@
CONST SEGMENT
??_C@_0BG@JDKNBCPE@code1?5?$CIopenmp?5inside?$CJ?$AA@ DB 'code1 (openmp i'
DB 'nside)', 00H ; `string'
CONST ENDS
EXTRN __You_must_link_with_Microsoft_OpenMP_library:DWORD
EXTRN __vcomp_for_static_end:PROC
EXTRN __vcomp_for_static_simple_init:PROC
; Function compile flags: /Ogtpy
; File d:\setting\xp_desktop\algorithm\test\vctest\main.cpp
; COMDAT _main$omp$1
_TEXT SEGMENT
$T4940 = -8 ; size = 4
$T4941 = -4 ; size = 4
_i$ = 8 ; size = 4
_in$ = 12 ; size = 4
_main$omp$1 PROC ; COMDAT
sub esp, 8
; 21 : for (j=0; j<ITER; ++j)
lea eax, DWORD PTR $T4941[esp+8]
push eax
lea ecx, DWORD PTR $T4940[esp+12]
push ecx
push 1
push 1
push 99999 ; 0001869fH
push 0
call __vcomp_for_static_simple_init
mov ecx, DWORD PTR $T4940[esp+32]
mov eax, DWORD PTR $T4941[esp+32]
add esp, 24 ; 00000018H
cmp ecx, eax
jg SHORT $LN13@main$omp$1
mov edx, DWORD PTR _i$[esp+4]
sub eax, ecx
push esi
lea esi, DWORD PTR [edx+2680]
inc eax
npad 6
$LL20@main$omp$1:
sub eax, 1
jne SHORT $LL20@main$omp$1
mov eax, DWORD PTR _in$[esp+8]
mov DWORD PTR [eax+edx*4], esi
pop esi
$LN13@main$omp$1:
; 22 : in[i] = i + 2680;
add esp, 8
; 21 : for (j=0; j<ITER; ++j)
jmp __vcomp_for_static_end
_main$omp$1 ENDP
; Function compile flags: /Ogtpy
_TEXT ENDS
; COMDAT _main$omp$2
_TEXT SEGMENT
$T4954 = -8 ; size = 4
$T4955 = -4 ; size = 4
_j$ = 8 ; size = 4
_in$ = 12 ; size = 4
_main$omp$2 PROC ; COMDAT
sub esp, 8
push edi
; 38 : for (i=0;i<SIZE;++i)
lea eax, DWORD PTR $T4955[esp+12]
push eax
lea ecx, DWORD PTR $T4954[esp+16]
push ecx
push 1
push 1
push 19999 ; 00004e1fH
push 0
call __vcomp_for_static_simple_init
mov ecx, DWORD PTR $T4954[esp+36]
mov edi, DWORD PTR $T4955[esp+36]
add esp, 24 ; 00000018H
cmp ecx, edi
jg SHORT $LN5@main$omp$2
mov edx, DWORD PTR _in$[esp+8]
mov eax, DWORD PTR _j$[esp+8]
lea edx, DWORD PTR [edx+ecx*4]
push esi
npad 7
$LL26@main$omp$2:
; 39 : for (j=0; j<ITER; ++j)
mov DWORD PTR [eax], 0
lea esi, DWORD PTR [ecx+2680]
npad 4
$LL3@main$omp$2:
inc DWORD PTR [eax]
cmp DWORD PTR [eax], 100000 ; 000186a0H
jl SHORT $LL3@main$omp$2
mov DWORD PTR [edx], esi
inc ecx
add edx, 4
cmp ecx, edi
jle SHORT $LL26@main$omp$2
pop esi
$LN5@main$omp$2:
pop edi
; 40 : in[i] = i + 2680;
add esp, 8
; 38 : for (i=0;i<SIZE;++i)
jmp __vcomp_for_static_end
_main$omp$2 ENDP
_TEXT ENDS
PUBLIC _main
EXTRN __chkstk:PROC
EXTRN __vcomp_fork:PROC
; Function compile flags: /Ogtpy
; COMDAT _main
_TEXT SEGMENT
_j$ = -80004 ; size = 4
_in$ = -80000 ; size = 80000
_main PROC ; COMDAT
; 12 : {
mov eax, 80004 ; 00013884H
call __chkstk
push esi
push edi
; 13 : int i, j, in[SIZE]={0};
; 14 : clock_t t;
; 15 :
; 16 : /* code 1 - omp inside, 891 */
; 17 : memset(in, 0, SIZE);
; 18 : t=clock();
call _clock
mov edi, eax
; 19 : for (i=0;i<SIZE;++i)
xor esi, esi
$LL16@main:
; 20 : #pragma omp parallel for
lea eax, DWORD PTR _in$[esp+80012]
push eax
push esi
push OFFSET _main$omp$1
push 2
push 1
call __vcomp_fork
add esp, 20 ; 00000014H
inc esi
cmp esi, 20000 ; 00004e20H
jl SHORT $LL16@main
; 21 : for (j=0; j<ITER; ++j)
; 22 : in[i] = i + 2680;
; 23 : ELASPE("code1 (openmp inside)", t);
call _clock
sub eax, edi
push eax
push OFFSET ??_C@_0BG@JDKNBCPE@code1?5?$CIopenmp?5inside?$CJ?$AA@
push OFFSET ??_C@_0BA@LIDABEPC@?$CFs?5elaspe?3?5?$CFld?6?$AA@
call _printf
add esp, 12 ; 0000000cH
; 24 :
; 25 : /* code 2 - normal, 1406 */
; 26 : memset(in, 0, SIZE);
; 27 : t=clock();
call _clock
mov edi, eax
; 28 : for (i=0;i<SIZE;++i)
xor eax, eax
; 29 : for (j=0; j<ITER; ++j)
mov DWORD PTR _j$[esp+80012], 100000 ; 000186a0H
lea ecx, DWORD PTR _in$[esp+80012]
$LL11@main:
mov edx, 100000 ; 000186a0H
npad 7
$LL8@main:
sub edx, 1
jne SHORT $LL8@main
inc eax
add ecx, 4
cmp eax, 20000 ; 00004e20H
jl SHORT $LL11@main
; 30 : in[i] = i + 2680;
; 31 : ELASPE("code2 (normal)", t);
call _clock
sub eax, edi
push eax
push OFFSET ??_C@_0P@MACJDOEB@code2?5?$CInormal?$CJ?$AA@
push OFFSET ??_C@_0BA@LIDABEPC@?$CFs?5elaspe?3?5?$CFld?6?$AA@
call _printf
; 32 :
; 33 :
; 34 : /* code 3 - omp outside, 12062 */
; 35 : memset(in, 0, SIZE);
; 36 : t=clock();
call _clock
mov esi, eax
; 37 : #pragma omp parallel for
lea ecx, DWORD PTR _in$[esp+80024]
push ecx
lea edx, DWORD PTR _j$[esp+80028]
push edx
push OFFSET _main$omp$2
push 2
push 1
call __vcomp_fork
; 38 : for (i=0;i<SIZE;++i)
; 39 : for (j=0; j<ITER; ++j)
; 40 : in[i] = i + 2680;
; 41 : ELASPE("code3 (openmp outside)", t);
call _clock
sub eax, esi
push eax
push OFFSET ??_C@_0BH@IGDMJOPJ@code3?5?$CIopenmp?5outside?$CJ?$AA@
push OFFSET ??_C@_0BA@LIDABEPC@?$CFs?5elaspe?3?5?$CFld?6?$AA@
call _printf
add esp, 44 ; 0000002cH
pop edi
; 42 :
; 43 : return 0;
xor eax, eax
pop esi
; 44 : }
add esp, 80004 ; 00013884H
ret 0
_main ENDP
_TEXT ENDS
END
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment