2010/2/15 Michael Menegakis <[email protected]>:
> The bins appear to be different; I've uploaded them here:
> http://www0.org/vm/bins.tar.bz2
I've put a fputs in emit() and I see some differences.
//
andl $0x1fffffc, %ecx on linux,
andl $0xffffc, %ecx on windows
when referring to emit("andl $0x%x, %%ecx", vm->dataMask &~(bytes-1));
//
(callq's pointer is normally different)
this portion is different:
//
linux:
addq $4, %rsi
movl $1004, 0(%rsi)
subq $4, %rsi
windows:
addq $4, %rsi
movl $4, 0(%rsi)
subq $4, %rsi
when referring to emit("movl $%d, 0(%%rsi)", const_value);
//
//again
linux
addq $4, %rsi
movl $6, 0(%rsi)
addl $28, %edi
windows
addq $4, %rsi
movl $4, 0(%rsi)
addl $28, %edi
ret
//
shortly after than there's deviation from the flow itself
//linux
ret
movq $0, %rax
jmpq *%rax
movl %edi, %ebx
addl $40,%ebx
addq $4, %rsi
movl %ebx, 0(%rsi)
movl 0(%rsi), %eax
movl %eax, %ecx
andl $0x1fffffc, %ecx
cmpl %eax, %ecx
//-linux
//windows
ret
movq $0, %rax
jmpq *%rax
movl %edi, %ecx
andl $0xffffc, %ecx
cmpl %edi, %ecx
jz rc_ok_i_0000001a
movq $5381734, %rax
callq *%rax
rc_ok_i_0000001a:
movl $27, 0(%r8, %rdi, 1)
movq $0, %rax
callq *%rax
//-windows
etc.
I suspect printf being inconsistent, or at least i hope it's that simple.
Assembly code in its core *seems* to be compatible, registers are
probably not violated provided one assumes the whole thing emulates
sysv abi though not sure either.
_______________________________________________
ioquake3 mailing list
[email protected]
http://lists.ioquake.org/listinfo.cgi/ioquake3-ioquake.org
By sending this message I agree to love ioquake3 and libsdl.