The MASM Forum

64 bit assembler => UASM Assembler Development => Topic started by: johnsa on April 25, 2017, 07:08:12 AM

Title: HJWasm 2.28 Updated Release
Post by: johnsa on April 25, 2017, 07:08:12 AM
Hi,

Git and packages on the site updated, dated 24th April.
Fixes and changes are:
1) Fixed SHR (As per Nidud's fix)
2) Fixed VARARG register overwrite warning (as found by Powershadow)
3) Added -less command line option to reduce verbosity of output to console.
4) Progressively flush the console output after each file is processed (as per JJ's request)

This is an interim update until the delphi/borland changes are totally in and that will be 2.29

Cheers,
John
Title: Re: HJWasm 2.28 Updated Release
Post by: Adamanteus on April 26, 2017, 11:30:13 PM
For whart in globals enum delphi_type, variosly mought be such :

enum fastcall_type {
    FCT_MSC,        /* MS 16-/32-bit fastcall (ax,dx,cx / ecx,edx) */
#if OWFC_SUPPORT
    FCT_WATCOMC,    /* OW register calling convention (eax, ebx, ecx, edx) */
#endif
#if AMD64_SUPPORT
    FCT_WIN64,      /* Win64 fastcall convention (rcx, rdx, r8, r9) */
#endif
    FCT_DELPHI       /* delphi fastcall convention (eax, edx, ecx ) */
};


And in ParseParams doubling line with proc->sym.langtype == LANG_DELPHICALL.
Title: Re: HJWasm 2.28 Updated Release
Post by: habran on April 27, 2017, 05:47:08 AM
You are correct, it is unnecessary, however, it doesn't hurt. Will be removed for next release, we are still working on it.
Title: Re: HJWasm 2.28 Updated Release
Post by: Adamanteus on May 02, 2017, 10:56:54 PM
Looks, that for correct handling sizes of register parameters :

invoke.c :

line 2103 :

      if ((asize > psize && opnd.kind != EXPR_REG) || (asize < psize && curr->sym.mem_type == MT_PTR)) {



test1 PROTO FASTCALL a : DWORD, b : WORD, d : BYTE

test2 PROC FASTCALL,
a : QWORD, b : WORD, d : BYTE
invoke test1, ADDR a, b, d
RET
test2 ENDP
Title: Re: HJWasm 2.28 Updated Release
Post by: johnsa on May 03, 2017, 12:43:03 AM
That was really cryptic to say the least! :)

Can you describe what the issue is exactly?
Title: Re: HJWasm 2.28 Updated Release
Post by: Adamanteus on May 03, 2017, 01:28:21 AM
 Not assembling code in win32 mode - and where it possible fix (maybe not very accurate).
Title: Re: HJWasm 2.28 Updated Release
Post by: johnsa on May 03, 2017, 07:26:30 AM
Looking into it now.
Title: Re: HJWasm 2.28 Updated Release
Post by: TWell on May 08, 2017, 10:33:56 PM
An idea to avoid UTF-8 BOM,
checkbom.c:#include <stdio.h>

void CheckBOM(FILE *f)
{
unsigned long bom;
fread(&bom, 3, 1, f);
if ((bom & 0xFFFFFF) != 0xBFBBEF)
rewind(f);
}
and add CheckBOM(CurrFile[ASM]); to assemble.c to lines 1334, 1660.
What other places need similar thing?

EDIT: a bad idea as literal strings are in utf-8 format and needs conversions.
Title: Re: HJWasm 2.28 Updated Release
Post by: habran on May 10, 2017, 06:08:32 AM
Thanks TWell :biggrin:
Will check it as soon as we get some time :t