[Simh] Compile problems with SIMH V3.7-3
Matjaz Rihtar
matjaz at eunet.si
Tue Oct 16 07:11:17 EDT 2007
> Can you post the disassembly?
VC 2003 disassembly:
if (cptr) {
00441905 cmp dword ptr [cptr],0
00441909 je rq_set_type+0C9h (441969h)
cap = (uint32) get_uint (cptr, 10, 0xFFFFFFFF, &r);
0044190B lea eax,[r]
0044190E push eax
0044190F push 0
00441911 push 0FFFFFFFFh
00441913 push 0Ah
00441915 mov ecx,dword ptr [cptr]
00441918 push ecx
00441919 call @ILT+55(_get_uint) (43403Ch)
0044191E add esp,14h
00441921 mov dword ptr [cap],eax
MinGW gcc 3.4.5 disassembly:
cap = (uint32) get_uint (cptr, 10, 0xFFFFFFFF, &r);
0x0041822d <rq_set_type+104>: lea 0xfffffff4(%ebp),%eax
0x00418230 <rq_set_type+107>: mov %eax,0x10(%esp)
0x00418234 <rq_set_type+111>: movl $0xffffffff,0x8(%esp)
0x0041823c <rq_set_type+119>: movl $0x0,0xc(%esp)
0x00418244 <rq_set_type+127>: movl $0xa,0x4(%esp)
0x0041824c <rq_set_type+135>: mov 0x10(%ebp),%eax
0x0041824f <rq_set_type+138>: mov %eax,(%esp)
0x00418252 <rq_set_type+141>: call 0x4093c5 <get_uint>
0x00418257 <rq_set_type+146>: mov %eax,0xfffffffc(%ebp)
It seems that in both cases the compiler is pushing 5 arguments
to the stack/(%esp) before calling get_uint?!
Could there be any flag regarding the length of MAXINT (0xFFFFFFFF),
that the code is missing?
> Out of curiosity, do the binaries on the sourceforge site work for
you at all?
Yes, both simhv37-3-exe-ether.zip and
simh3.7-3_visualc++2005-ethernet.exe.zip work just fine. I guess VC 2005
produces different code than VC 2003. I don't know how the other package
was compiled.
Matjaz
More information about the Simh
mailing list