Botond Kósa
|
|
« on: December 07, 2014, 02:51:18 AM » |
|
I made the source code of version 1.3.10 available for download. The Java and C++/ASM files can be downloaded separately. Please be aware that the code is in prototype state. It lacks documentation, even most of the comments are in Hungarian. I do not take any responsibilities, nor do I promise any development targeting code reuseability. I will happily answer any questions regarding the code, though.
|
|
|
Logged
|
|
|
|
quaz0r
Fractal Molossus
Posts: 652
|
|
« Reply #1 on: December 07, 2014, 08:46:51 AM » |
|
damn you wrote over 200kb of assembly...that must have taken ages
|
|
|
Logged
|
|
|
|
Chillheimer
|
|
« Reply #2 on: December 07, 2014, 09:46:35 AM » |
|
Thank you Botond for this great gift to the community!
|
|
|
Logged
|
--- Fractals - add some Chaos to your life and put the world in order. ---
|
|
|
Kalles Fraktaler
|
|
« Reply #3 on: December 07, 2014, 05:25:45 PM » |
|
Thanks for maintaining the spirit of K.I.Martin!
|
|
|
Logged
|
|
|
|
Botond Kósa
|
|
« Reply #4 on: December 08, 2014, 03:08:15 PM » |
|
You're welcome!
|
|
|
Logged
|
|
|
|
claude
Fractal Bachius
Posts: 563
|
|
« Reply #5 on: December 11, 2014, 04:18:50 PM » |
|
I hoped to try to compile on Linux but had some problems. Not expecting a fix from you but more highlighting issues so other people don't waste time covering the same ground.
The asm source seems to be MASM syntax, and while I did find JWasm which claimed to be compatible it wasn't quite compatible enough. GNU's assembler 'as' doesn't work at all, nor nasm or yasm. I might try to assemble it on windows (hopefully WINE will work) and try something like objcopy to extract the code from windows object into ELF64. I don't have access to a windows machine though...
The C++ compiled fine with GNU g++, once I changed #include <intrin.h> to #include <x86intrin.h>, and typedef int64_t __int64, and #include <some path to jni.h> to #include <jni.h> in the worker.h with the correct -Ipath for my system, but missed symbols defined in the asm code.
I didn't try anything with the Java so far, there is no build system but perhaps something like this might work (haven't tried it yet): find -iname "*.java" | xargs javac
Then remains the issue of combining all of the compiled code into one program, but the other things would need to work first.
Thanks for releasing the source in any case.
|
|
|
Logged
|
|
|
|
3dickulus
|
|
« Reply #6 on: December 12, 2014, 05:54:11 AM » |
|
if you have a mm64core.o the linux objdump command might be able to produce asm source for gcc ?
|
|
|
Logged
|
|
|
|
Botond Kósa
|
|
« Reply #7 on: December 12, 2014, 08:35:25 AM » |
|
I hoped to try to compile on Linux but had some problems. Not expecting a fix from you but more highlighting issues so other people don't waste time covering the same ground.
The asm source seems to be MASM syntax, and while I did find JWasm which claimed to be compatible it wasn't quite compatible enough. GNU's assembler 'as' doesn't work at all, nor nasm or yasm. I might try to assemble it on windows (hopefully WINE will work) and try something like objcopy to extract the code from windows object into ELF64. I don't have access to a windows machine though...
The C++ compiled fine with GNU g++, once I changed #include <intrin.h> to #include <x86intrin.h>, and typedef int64_t __int64, and #include <some path to jni.h> to #include <jni.h> in the worker.h with the correct -Ipath for my system, but missed symbols defined in the asm code.
I didn't try anything with the Java so far, there is no build system but perhaps something like this might work (haven't tried it yet): find -iname "*.java" | xargs javac
Then remains the issue of combining all of the compiled code into one program, but the other things would need to work first.
Thanks for releasing the source in any case.
I'm afraid it would need a deeper rewrite of the ASM source to compile on Linux, because gcc on Linux and Microsoft's 64-bit C compiler conform to different calling conventions.
|
|
|
Logged
|
|
|
|
claude
Fractal Bachius
Posts: 563
|
|
« Reply #8 on: December 12, 2014, 01:41:01 PM » |
|
I'm afraid it would need a deeper rewrite of the ASM source to compile on Linux, because gcc on Linux and Microsoft's 64-bit C compiler conform to different calling conventions. Ah good point. I give up for now! I'll wait until wine64 is available on Debian stable..
|
|
|
Logged
|
|
|
|
PieMan597
|
|
« Reply #9 on: December 12, 2014, 02:32:06 PM » |
|
Claude, just get linux mint!
|
|
|
Logged
|
|
|
|
3dickulus
|
|
« Reply #10 on: December 12, 2014, 03:26:47 PM » |
|
@Claude 180001000: f2 0f 10 15 00 70 0c movsd 0xc7000(%rip),%xmm2 # 0x1800c8008 180001007: 00 180001008: f2 0f 10 05 00 70 0c movsd 0xc7000(%rip),%xmm0 # 0x1800c8010 18000100f: 00 180001010: b8 3c 00 00 00 mov $0x3c,%eax 180001015: 0f 28 ca movaps %xmm2,%xmm1 180001018: a8 01 test $0x1,%al 18000101a: 74 04 je 0x180001020 18000101c: f2 0f 59 c8 mulsd %xmm0,%xmm1 180001020: d1 e8 shr %eax 180001022: 74 06 je 0x18000102a 180001024: f2 0f 59 c0 mulsd %xmm0,%xmm0 180001028: eb ee jmp 0x180001018 18000102a: f2 0f 5e d1 divsd %xmm1,%xmm2 18000102e: f2 0f 11 15 6a 80 0c movsd %xmm2,0xc806a(%rip) # 0x1800c90a0 180001035: 00 180001036: c3 retq 180001037: cc int3 180001038: cc int3 180001039: cc int3 18000103a: cc int3 18000103b: cc int3 18000103c: cc int3 18000103d: cc int3 18000103e: cc int3 18000103f: cc int3
this is some output from objdump, mm64.dll makes 20k+ lines of asm code with debug information, an un-stripped object should reproduce all labels and jump offsets
|
|
|
Logged
|
|
|
|
|