News:

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

Main Menu

HJWasm 2.28 Updated Release

Started by johnsa, April 25, 2017, 07:08:12 AM

Previous topic - Next topic

johnsa

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

Adamanteus

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.

habran

You are correct, it is unnecessary, however, it doesn't hurt. Will be removed for next release, we are still working on it.
Cod-Father

Adamanteus

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

johnsa

That was really cryptic to say the least! :)

Can you describe what the issue is exactly?

Adamanteus

 Not assembling code in win32 mode - and where it possible fix (maybe not very accurate).


TWell

#7
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.

habran

Thanks TWell :biggrin:
Will check it as soon as we get some time :t
Cod-Father