News:

Masm32 SDK description, downloads and other helpful links
Message to All Guests
NB: Posting URL's See here: Posted URL Change

Main Menu

JWasm12_AVX2_RIP Source

Started by habran, December 14, 2014, 08:57:28 PM

Previous topic - Next topic

habran

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

Quote from: habran on December 17, 2014, 08:56:38 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

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:
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

Quote from: habran on December 18, 2014, 05:49:15 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

Quote from: habran 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:
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

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

Hi Habran,

Quote from: habran on December 19, 2014, 09:16:47 PM
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

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

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

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

Quote from: Gunther on December 17, 2014, 09:59:33 PM
Hi Habran,

Quote from: habran on December 17, 2014, 02:47:56 PM
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

Hi Habran,

Quote from: habran on December 17, 2014, 02:47:56 PM
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

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

Quote from: habran 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:

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

Cod-Father