News:

Masm32 SDK description, downloads and other helpful links
Message to All Guests

Main Menu

JWasm12_AVX2_RIP Source

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

Previous topic - Next topic

GoneFishing

Quote from: Gunther on December 27, 2014, 09:17:55 AM
...
I'll try that at the end of January. I've vacation that time.
...

Hi Gunther,
Today I've noticed  one JWASM anomaly or maybe better name it SINGULARITY .
Let me explain it:
Acorrding to paragraph 3.2 FASTCALL Register Calling Convention of JWASM manual :
QuoteIn 64-bit mode, FASTCALL means the standard Windows 64 ABI if output format is not ELF.For -elf64, there is no FASTCALL support implemented yet.
I wrote a simple test app (see the attachment ) in such a way  as if JWASM already had FASTCALL support and guess what ... it worked !!!
Let's go back to manual and read:
QuoteTo make FASTCALL the default calling convention, there are 3 ways:

    Commandline options -Gr ( or -win64 )
    Second argument of the .MODEL directive: .MODEL FLAT, FASTCALL
    Directive OPTION LANGUAGE: FASTCALL
Now let's try to set calling convention to FASTCALL in all 3 ways and see what results we will get:
Quote

  • -Gr  -> testFC.asm : Error A2168: General Failure
  • .MODEL FLAT, FASTCALL -> test1.asm(9) : Warning A4095: Multiple .MODEL directives, .MODEL ignored
                                                test1.asm : Error A2168: General Failure
  • OPTION LANGUAGE: FASTCALL -> test1.asm : Error A2168: General Failure
Thus, JWASM doesn't allow us to specify FASTCALL for elf64  , then,  why does it work  ?

--- NOTE: testFC was compiled with JWasm v2.11 and tested on Ubuntu 14.4 64 bit ---
The output should be something like this:
Quote
--------- INFO ---------

User-level applications use as integer registers for passing the sequence:
rdi, rsi, rdx, rcx, r8 and r9.

--------- TEST ---------

RDI=0x215bd000, RSI=12345, RDX=67890, RCX=54321, R8=9876, R9=12345

--------- END ----------

habran

Uploaded new sources with two small fixes in C files and one fix in headers
Cod-Father

Adamanteus

 As need for speed underground - my build - with installer with docs and licenses, seh, unicode support ... looks well (and maybe need num to ext for unpack).

Adamanteus

 As need for speed underground - my build - with installer with docs and licenses, seh, unicode support ... fake attachment size

Adamanteus

 As need for speed underground - my build - with installer with docs and licenses, seh, unicode support ... and last fake attachment size

habran

Hi Adamanteus
Windows 8.1 is unable to read your compressed folders :icon_exclaim:
Cod-Father

Adamanteus

 If to move numbers in archives filenames to extensions (as JWasm.zip.00x) - my unzipping easy.
P.S. That's maybe admins will change forum settings for attachments, that to upload as one archive.