Author: Jon Dart
Date: 12:35:20 10/15/05
Go up one level in this thread
This is the whole Intel assembly output
with /Ox /Gr:
; -- Machine type IA32
; mark_description "Intel(R) C++ Compiler for 32-bit applications, Version 9.0
Build 20050430Z %s";
; mark_description "-Qvc6 -Qlocation,link,C:\\Program Files\\Microsoft Visual
Studio\\VC98\\Bin -Ox -Gr -FAsc";
;ident "Intel(R) C++ Compiler for 32-bit applications, Version 9.0 Build
20050430Z %s"
;ident "-Qvc6 -Qlocation,link,C:\\Program Files\\Microsoft Visual
Studio\\VC98\\Bin -Ox -Gr -FAsc"
.486P
.387
OPTION DOTNAME
ASSUME CS:FLAT,DS:FLAT,SS:FLAT
_TEXT SEGMENT DWORD PUBLIC FLAT 'CODE'
; -- Begin _main
; mark_begin;
IF @Version GE 612
.MMX
MMWORD TEXTEQU <QWORD>
ENDIF
IF @Version GE 614
.XMM
XMMWORD TEXTEQU <OWORD>
ENDIF
ALIGN 4
PUBLIC _main
_main PROC NEAR
; parameter 1: 8 + ebp
; parameter 2: 12 + ebp
$B1$1: ; Preds $B1$0
;;; int main(int argc, char **argv) {
00000 55 push ebp ;main.c:29.33
00001 8b ec mov ebp, esp ;main.c:29.33
00003 83 ec 03 sub esp, 3 ;main.c:29.33
00006 83 e4 f8 and esp, -8 ;main.c:29.33
00009 83 c4 04 add esp, 4 ;main.c:29.33
0000c e8 fc ff ff ff call ___intel_proc_init ;main.c:29.33
; LOE ebx esi edi
$B1$4: ; Preds $B1$1
;;; return 0;
00011 33 c0 xor eax, eax ;main.c:30.10
00013 8b e5 mov esp, ebp ;main.c:30.10
00015 5d pop ebp ;main.c:30.10
00016 c3 ret ;main.c:30.10
00017 90 ALIGN 4
; LOE
; mark_end;
_main ENDP
_TEXT ENDS
_DATA SEGMENT DWORD PUBLIC FLAT 'DATA'
_DATA ENDS
; -- End _main
_TEXT SEGMENT DWORD PUBLIC FLAT 'CODE'
; -- Begin @getDayIndex1March00@12
; mark_begin;
ALIGN 4
PUBLIC @getDayIndex1March00@12
@getDayIndex1March00@12 PROC NEAR
; parameter 1: ecx
; parameter 2: edx
; parameter 3: 16 + esp
$B2$1: ; Preds $B2$0
;;; {
00018 57 push edi ;main.c:5.1
00019 56 push esi ;main.c:5.1
0001a 53 push ebx ;main.c:5.1
0001b 8b da mov ebx, edx ;main.c:5.1
;;; static int daysTilMonth[12] =
;;; {
;;; 6*31 + 4*30, // jan
;;; 7*31 + 4*30, // feb
;;; 0*31 + 0*30, // mar
;;; 1*31 + 0*30, // apr
;;; 1*31 + 1*30, // may
;;; 2*31 + 1*30, // jun
;;; 2*31 + 2*30, // jul
;;; 3*31 + 2*30, // aug
;;; 4*31 + 2*30, // sep
;;; 4*31 + 3*30, // oct
;;; 5*31 + 3*30, // nov
;;; 5*31 + 4*30, // dec
;;; };
;;; unsigned int cent, didx;
;;; year -= (month < 3);
0001d 8b 74 24 10 mov esi, DWORD PTR [esp+16] ;main.c:22.2
00021 83 fb 03 cmp ebx, 3 ;main.c:22.2
00024 b8 00 00 00 00 mov eax, 0 ;main.c:22.2
00029 0f 92 c0 setb al ;main.c:22.2
;;; cent = year / 100;
;;; didx = year * 365 + (year>>2) - cent + (cent>>2)
0002c 03 0c 9d fc ff
ff ff add ecx, DWORD PTR daysTilMonth$1$0$0[0+ebx*4-4]
;main.c:24.30
00033 2b f0 sub esi, eax ;main.c:22.2
00035 b8 1f 85 eb 51 mov eax, 1374389535 ;main.c:23.17
0003a f7 e6 mul esi ;main.c:23.17
0003c 8d 04 f6 lea eax, DWORD PTR [esi+esi*8] ;main.c:24.17
0003f 8d 04 c6 lea eax, DWORD PTR [esi+eax*8] ;main.c:24.17
00042 c1 ea 05 shr edx, 5 ;main.c:23.17
00045 8d 04 80 lea eax, DWORD PTR [eax+eax*4] ;main.c:24.17
00048 c1 ee 02 shr esi, 2 ;main.c:24.30
0004b 03 c6 add eax, esi ;main.c:24.35
0004d 03 c8 add ecx, eax ;main.c:24.49
0004f 8b c2 mov eax, edx ;main.c:24.49
00051 c1 e8 02 shr eax, 2 ;main.c:24.49
;;; + daysTilMonth[month-1] + day;
00054 2b c2 sub eax, edx ;main.c:25.7
00056 03 c1 add eax, ecx ;main.c:25.31
;;; return didx;
00058 5b pop ebx ;main.c:26.9
00059 5e pop esi ;main.c:26.9
0005a 5f pop edi ;main.c:26.9
0005b c2 04 00 ret 4 ;main.c:26.9
ALIGN 4
; LOE
; mark_end;
@getDayIndex1March00@12 ENDP
_TEXT ENDS
_RDATA SEGMENT DWORD PUBLIC FLAT 'DATA'
daysTilMonth$1$0$0 DD 306
DD 337
DD 0
DD 31
DD 61
DD 92
DD 122
DD 153
DD 184
DD 214
DD 245
DD 275
_RDATA ENDS
_DATA SEGMENT DWORD PUBLIC FLAT 'DATA'
_DATA ENDS
; -- End @getDayIndex1March00@12
_DATA SEGMENT DWORD PUBLIC FLAT 'DATA'
_DATA ENDS
EXTRN ___intel_proc_init:PROC
END
This page took 0 seconds to execute
Last modified: Thu, 15 Apr 21 08:11:13 -0700
Current Computer Chess Club Forums at Talkchess. This site by Sean Mintz.