Author Topic: JWasm12_AVX2_RIP Source  (Read 31397 times)

habran

  • Member
  • *****
  • Posts: 1228
    • uasm
Re: JWasm12_AVX2_RIP Source
« Reply #15 on: December 17, 2014, 10:36:54 PM »
Hey Gunther :biggrin:
You are perfectly right in what you said, that's why I uploaded sources and also build 32-bit and 64-bit binaries
Source is there for those who want to build other versions 8)
Cod-Father

Adamanteus

  • Member
  • **
  • Posts: 249
    • LLC "AMS"
Re: JWasm12_AVX2_RIP Source
« Reply #16 on: December 17, 2014, 10:55:02 PM »
I am not certain that I understand what you are actually saing :dazzled:
Can you please explain what are you talking about :P
This is simple in MSVC : in project options - C/C++ - Additional - Calling conventions - choose __stdcall /Gz or __fastcall /Gr, so program code will be more fast and compact. As __cdecl /Gd - allowing only to pass variable quantity of arguments, and occupies for this more size and execution time.

habran

  • Member
  • *****
  • Posts: 1228
    • uasm
Re: JWasm12_AVX2_RIP Source
« Reply #17 on: December 18, 2014, 05:49:15 AM »
Did you try to do that?
In 64-bit there is no problem to do that but not necessary because fastcall is the only possible convention
If I try to build 32-bit it trows errors:
Code: [Select]
error C2440: 'function' : cannot convert from 'int (__stdcall *)(const void *,const void *)' to 'int (__cdecl *)(const void *,const void *)'and there are plenty of __cdecl functions inside JWasm
I am not going to mess up JWasm with changing all of them to __stdcall
Cod-Father

Gunther

  • Member
  • *****
  • Posts: 4196
  • Forgive your enemies, but never forget their names
Re: JWasm12_AVX2_RIP Source
« Reply #18 on: December 19, 2014, 02:47:44 AM »
I am not going to mess up JWasm with changing all of them to __stdcall

Of course, it's better not to touch this.

Gunther
You have to know the facts before you can distort them.

Adamanteus

  • Member
  • **
  • Posts: 249
    • LLC "AMS"
Re: JWasm12_AVX2_RIP Source
« Reply #19 on: December 19, 2014, 02:19:49 PM »
Did you try to do that?
In 64-bit there is no problem to do that but not necessary because fastcall is the only possible convention
If I try to build 32-bit it trows errors:
Code: [Select]
error C2440: 'function' : cannot convert from 'int (__stdcall *)(const void *,const void *)' to 'int (__cdecl *)(const void *,const void *)'and there are plenty of __cdecl functions inside JWasm
I am not going to mess up JWasm with changing all of them to __stdcall
That's I suppose for strings compare type - it is need to define as pointer to runtime functions, as memcmp and memcmpi is from it.

habran

  • Member
  • *****
  • Posts: 1228
    • uasm
Re: JWasm12_AVX2_RIP Source
« Reply #20 on: December 19, 2014, 09:16:47 PM »
Hey Adamanteus, my intention is to improve JWasm not to spoil it ;)
However, JWasm is an open source, so you can create your fork and.....
Thanks Gunther for understanding:t
Cod-Father

Gunther

  • Member
  • *****
  • Posts: 4196
  • Forgive your enemies, but never forget their names
Re: JWasm12_AVX2_RIP Source
« Reply #21 on: December 20, 2014, 12:19:40 AM »
Hi Habran,

Thanks Gunther for understanding:t

no question. We don't know exactly what's with Andreas. It could be that he's back some day. If not, we'll talk about this questions again.

Gunther
You have to know the facts before you can distort them.

habran

  • Member
  • *****
  • Posts: 1228
    • uasm
Re: JWasm12_AVX2_RIP Source
« Reply #22 on: December 21, 2014, 02:01:02 PM »
Hi Gunther :biggrin:
Till now I have done so many changes to JWasm that it si not the same tool as original
I will be forced to create new fork for my version
I will call it XWasm and I will translate also to 64-bit ASM 8)
I am thinking of leaving 32-bit in C as it is
Cod-Father

Gunther

  • Member
  • *****
  • Posts: 4196
  • Forgive your enemies, but never forget their names
Re: JWasm12_AVX2_RIP Source
« Reply #23 on: December 22, 2014, 12:42:59 AM »
Hi Habran,

that's a good plan. In the next days I'll take a look into the sources.

Gunther
You have to know the facts before you can distort them.

habran

  • Member
  • *****
  • Posts: 1228
    • uasm
Re: JWasm12_AVX2_RIP Source
« Reply #24 on: December 22, 2014, 09:21:47 PM »
ToutEnMasm, thank you for finding the error in JWasm main  :t
It doesn't affect Windows 7 or former windows but the Windows 8
I have bought a new laptop (Toshiba Qosmio with pre-installed Windows 8.1 ) and encountered the same problem as you:
"General Failure"
So, I looked the changes you have suggested. It worked with them.
After a little bit  of experimenting I found out that the Windows 8.1 doesn't like long fh; 
when I changed it to intptr_t fh; it worked with no problem (intptr_t is __int64)

Therefore, there is no need to change anything else in main function except that

Here are the 64-bit binaries
Cod-Father

GoneFishing

  • Member
  • *****
  • Posts: 1072
  • Gone fishing
Re: JWasm12_AVX2_RIP Source
« Reply #25 on: December 26, 2014, 09:03:09 PM »
Hi Habran,

I am happy with my builds and I don't work with 32 bits anyway 8)

jWasm is designed for a lot of different operating systems and the 32-bit versions are important, too. Also jWasm for DOS.

Gunther

That's right, Gunther
JWASM still awaits implementing FASTCALL for elf64 ouptut file format.
Maybe anyone here ... there or anywhere  can do it

Gunther

  • Member
  • *****
  • Posts: 4196
  • Forgive your enemies, but never forget their names
Re: JWasm12_AVX2_RIP Source
« Reply #26 on: December 27, 2014, 02:01:09 AM »
Hi Habran,

JWASM still awaits implementing FASTCALL for elf64 ouptut file format.
Maybe anyone here ... there or anywhere  can do it

that's not so easy, because Linux and BSD are using another ABI, which you could find here. Therefore they are other parameter passing schemes and a lot of other differences. It is very hard, if not impossible, to write common code for both worlds.

Gunther
You have to know the facts before you can distort them.

habran

  • Member
  • *****
  • Posts: 1228
    • uasm
Re: JWasm12_AVX2_RIP Source
« Reply #27 on: December 27, 2014, 06:14:35 AM »
At this moment I am to busy even to think of that ::)
You Gunther are already familiar with it, maybe you can roll your sleeves and make your hands dirty :lol:
Cod-Father

Gunther

  • Member
  • *****
  • Posts: 4196
  • Forgive your enemies, but never forget their names
Re: JWasm12_AVX2_RIP Source
« Reply #28 on: December 27, 2014, 09:17:55 AM »
At this moment I am to busy even to think of that ::)
You Gunther are already familiar with it, maybe you can roll your sleeves and make your hands dirty :lol:

I'll try that at the end of January. I've vacation that time.

Gunther
You have to know the facts before you can distort them.

habran

  • Member
  • *****
  • Posts: 1228
    • uasm
Re: JWasm12_AVX2_RIP Source
« Reply #29 on: December 28, 2014, 07:01:07 AM »
Take your time :biggrin:
Cod-Father