Liste des Groupes | Revenir à c theory |
On 6/27/2024 2:18 AM, Mikko wrote:Which isn't a correct simulation of the CALL HHH1 instruction.On 2024-06-26 12:53:16 +0000, olcott said:You contradict yourself.
>On 6/26/2024 2:54 AM, Mikko wrote:>>>
Obviously false. The meaning of H(P,P) is determined by the text of H.
The meaning is fully determined by the complier that complies to the
x86 code and the semantics of x86. If one simulator interpretes the
x86 code differently from another simulator then one of them does not
follow the x86 semantics and is therefore incorrect.
_DDD()
[00002172] 55 push ebp ; housekeeping
[00002173] 8bec mov ebp,esp ; housekeeping
[00002175] 6872210000 push 00002172 ; push DDD
[0000217a] e853f4ffff call 000015d2 ; call H0(DDD)
[0000217f] 83c404 add esp,+04
[00002182] 5d pop ebp
[00002183] c3 ret
Size in bytes:(0018) [00002183]
>
The call from DDD to
the x86 emulator H0(DDD) at machine address 0000217a
when DDD is correctly emulated by H0 cannot possibly return.
>
When DDD is correctly emulated by H0 then H0 must emulate itself
emulating DDD. This derives recursive emulation.
>
When DDD is correctly emulated by H1 then H1 NEED NOT emulate itself
emulating DDD. This DOES NOT derive recursive emulation.
When DDD is emulated by H1 then H1 needs to the call to H0 and the
instructions of H0 which emulate DDD and its call to H0 and a recorsive
emulation follows. If H1 emulates correctly it must not emulate the
emulation of the instruction at 217f. Unless, of course, you lied
about H0.
>
*Here is what actually happens*
_DDD()
[00002172] 55 push ebp
[00002173] 8bec mov ebp,esp
[00002175] 6872210000 push 00002172 ; push DDD
[0000217a] e853f4ffff call 000015d2 ; call HHH0
[0000217f] 83c404 add esp,+04
[00002182] 5d pop ebp
[00002183] c3 ret
Size in bytes:(0018) [00002183]
_main()
[00002192] 55 push ebp
[00002193] 8bec mov ebp,esp
[00002195] 6872210000 push 00002172 ; push DDD
[0000219a] e863f3ffff call 00001502 ; call HHH1(DDD)
[0000219f] 83c404 add esp,+04
[000021a2] 50 push eax
[000021a3] 6843070000 push 00000743
[000021a8] e8b5e5ffff call 00000762
[000021ad] 83c408 add esp,+08
[000021b0] eb04 jmp 000021b6
[000021b2] 33c0 xor eax,eax
[000021b4] eb02 jmp 000021b8
[000021b6] 33c0 xor eax,eax
[000021b8] 5d pop ebp
[000021b9] c3 ret
Size in bytes:(0040) [000021b9]
machine stack stack machine assembly
address address data code language
======== ======== ======== ========= =============
[00002192][00103826][00000000] 55 push ebp
[00002193][00103826][00000000] 8bec mov ebp,esp
[00002195][00103822][00002172] 6872210000 push 00002172 ; push DDD
[0000219a][0010381e][0000219f] e863f3ffff call 00001502 ; call HHH1(DDD)
New slave_stack at:1038ca
Begin Local Halt Decider Simulation Execution Trace Stored at:1138d2
[00002172][001138c2][001138c6] 55 push ebp
[00002173][001138c2][001138c6] 8bec mov ebp,esp
[00002175][001138be][00002172] 6872210000 push 00002172 ; push DDD
[0000217a][001138ba][0000217f] e853f4ffff call 000015d2 ; call HHH0(DDD)
New slave_stack at:14e2f2
Begin Local Halt Decider Simulation Execution Trace Stored at:15e2fa
[00002172][0015e2ea][0015e2ee] 55 push ebp
[00002173][0015e2ea][0015e2ee] 8bec mov ebp,esp
[00002175][0015e2e6][00002172] 6872210000 push 00002172 ; push DDD
[0000217a][0015e2e2][0000217f] e853f4ffff call 000015d2 ; call HHH0(DDD)
New slave_stack at:198d1a
[00002172][001a8d12][001a8d16] 55 push ebp
[00002173][001a8d12][001a8d16] 8bec mov ebp,esp
[00002175][001a8d0e][00002172] 6872210000 push 00002172 ; push DDD
[0000217a][001a8d0a][0000217f] e853f4ffff call 000015d2 ; call HHH0(DDD)
Local Halt Decider: Infinite Recursion Detected Simulation Stopped
[0000217f][001138c2][001138c6] 83c404 add esp,+04 ; return to DDD
[00002182][001138c6][000015b7] 5d pop ebp
[00002183][001138ca][0003a980] c3 ret ; return to main
[0000219f][00103826][00000000] 83c404 add esp,+04
[000021a2][00103822][00000001] 50 push eax
[000021a3][0010381e][00000743] 6843070000 push 00000743
[000021a8][0010381e][00000743] e8b5e5ffff call 00000762
Input_Halts = 1
[000021ad][00103826][00000000] 83c408 add esp,+08
[000021b0][00103826][00000000] eb04 jmp 000021b6
[000021b6][00103826][00000000] 33c0 xor eax,eax
[000021b8][0010382a][00000018] 5d pop ebp
[000021b9][0010382e][00000000] c3 ret
Number of Instructions Executed(352835) == 5266 Pages
Les messages affichés proviennent d'usenet.