News:

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

Main Menu

HJWasm Releases

Started by johnsa, January 16, 2016, 08:24:52 AM

Previous topic - Next topic

GoneFishing

checked it with time utility :
Quotetime ./hjwasm. -q -elf64 simple.asm

real   0m0.052s
user   0m0.049s
sys   0m0.003s

Celeron Dual Core 2.6

What do 'real', 'user' and 'sys' mean in the output of time(1)?

habran

If you want to have a proper disassembly use Agner's OBJCONV, it produces a perfect output which you can use again to build the same binaries from it
Cod-Father

GoneFishing

Yes, I know about it.
I wanted to test it in SDE - IntelĀ® Software Development Emulator


jj2007

include \masm32\include\masm32rt.inc

opax macro arg
Local oa, tmp$
  oa = opattr arg
  tmp$ CATSTR <TheArg=>, <arg>, < with opattr=>, %oa
  % echo tmp$
ENDM

.code
start:
opax DWORD PTR [ebx]
opax -DWORD PTR [ebx]    ; <<<< assembles fine with MASM
print "ok"
  exit

end start

habran

You are correct JJ, however, this is JWasm fault
I will see why is it happening and try to fix it in HJWasm,
however, you are aware that at this time in the year I am busy with the Australian Open 8)
Cod-Father

Grincheux

You can call the assembler HJWasm, Toto... it will stay JWAsm for me.
When it was named JWAsm I did not have any answer I see that now it is the same. You make pleasure to your self in writing such a program, you ask us for tests but that's all.

QuoteHI Grincheux,
It is not any more JWasm, it is now HJWasm
Good question is already half an answer  ;)
What was your question about, what switches you want to use and for which purpose?

TouEnMasm

********* Test of avx,simple.asm win10 ************

Various crash without change of the hjwasm options
Quote
        .686P         
;      .XMM
;      .MMX
;
   .x64                ; -pe requires to set cpu, model & language
   .model flat, fastcall
option casemap : none
option win64 : 11
option frame : auto
option STACKBASE : RSP


codegen.c line 1274 runtime check failure
if (!comprdsp) CodeInfo->tuple = 0; <<<<<<<<<<<<<<<<<<<<<<<<<<<<<
Fa is a musical note to play with CL

johnsa

Quote from: jj2007 on January 29, 2016, 09:27:08 AM
include \masm32\include\masm32rt.inc

opax macro arg
Local oa, tmp$
  oa = opattr arg
  tmp$ CATSTR <TheArg=>, <arg>, < with opattr=>, %oa
  % echo tmp$
ENDM

.code
start:
opax DWORD PTR [ebx]
opax -DWORD PTR [ebx]    ; <<<< assembles fine with MASM
print "ok"
  exit

end start


I've logged this as an issue on github, I'll leave it to Habran to investigate this one :)

johnsa

Quote from: ToutEnMasm on January 29, 2016, 05:36:14 PM
********* Test of avx,simple.asm win10 ************

Various crash without change of the hjwasm options
Quote
        .686P         
;      .XMM
;      .MMX
;
   .x64                ; -pe requires to set cpu, model & language
   .model flat, fastcall
option casemap : none
option win64 : 11
option frame : auto
option STACKBASE : RSP


codegen.c line 1274 runtime check failure
if (!comprdsp) CodeInfo->tuple = 0; <<<<<<<<<<<<<<<<<<<<<<<<<<<<<

Are you getting the runtime check failure when assembling a file?
Could you post source of the test file so we can check it?
Thanks,

johnsa

Quote from: Grincheux on January 29, 2016, 07:58:31 AM
QuoteHey.. don't blame us for being proactive :) Only download it once a day then

That's what I do

I never had answer about JWAsm switch :

-Fd which does not work like said in the help file
-zlc -zld -zlf -zlp -zls : ?
-zzs

1) zzs is well explained (only applies when using Wlink and if the module has a fixed starting address.. so this wouldn't be relevant in any normal scenario).

Option -zlc:
suppresses writing OMF coment records about data in Code segments. These records may help a disassembler to produce nicer listings.

Option -zld:
suppresses writing an OMF coment record for each Code segment telling the linker that far calls to targets in the same segments should be optimized. This is more or less a feature for 16-bit code only.

Both of these only apply to OMF format output.. and zld only really for 16bit code.. once again this is all really legacy stuff.

Options -zlf, -zlp and -zls do reduce size of the COFF output module. They might be useful if lots of - small - modules are to be assembled and put into a static library.

-zlf suppresses the @file entry in the COFF symbol table. This entry is usually used for debugging purposes only and hence a - pretty small - amount of space can be saved. 
-zlp suppresses static (=private) procedures to be included into the COFF symbol table - as long as they aren't referenced absolutely. Such procedures aren't needed for the linking process. However, since the linker has no knowledge of them then, they will also disappear from the linker-generated map-file.
-zls suppresses the auxiliary entries for sections in the COFF symbol table. These entries may not be needed in all cases and thus a little space is saved. 

Once again.. I can't see any of these being relevant, -zls possibly.. but who needs to save a few bytes in the obj file ??

-Fd (only applies to jwlink and wlink).. it basically allows you to link the final executable without requiring the lib files.. once again.. why would you need it? Unless you had a dll without the lib file in the first place, but then you could just use loadlibrary..

Hopefully this helps a bit, basically.. they're all obsolete (to me anyway) :)

GoneFishing

GCC debug build
Test of Debug option :
-dr                  Display reserved words

simple.asm:

----------------------------------------------------------------
VPMASKMOVD xmm1, xmm2,m128
simple.asm(89) : Error A2049: Invalid instruction operands
VPMASKMOVQ xmm1, xmm2,m128
simple.asm(90) : Error A2049: Invalid instruction operands
VPMASKMOVD m128, xmm1,xmm2
simple.asm(91) : Error A2049: Invalid instruction operands
VPMASKMOVQ m128, xmm2,xmm2
simple.asm(92) : Error A2049: Invalid instruction operands
VPMASKMOVD ymm1, ymm2,m256
simple.asm(93) : Error A2049: Invalid instruction operands
VPMASKMOVQ ymm1, ymm2,m256
simple.asm(94) : Error A2049: Invalid instruction operands
VPMASKMOVD [rcx], ymm1,ymm2
simple.asm(95) : Error A2049: Invalid instruction operands
VPMASKMOVQ m256, ymm1,ymm2
simple.asm(96) : Error A2049: Invalid instruction operands
VMOVHPD xmm2, xmm1, [rcx]
simple.asm(103) : Error A2049: Invalid instruction operands
VMOVHPD xmm21, xmm1, [rcx]
simple.asm(105) : Error A2049: Invalid instruction operands
VMOVLPD xmm2, xmm1, [rcx]
simple.asm(108) : Error A2049: Invalid instruction operands
VMOVLPD xmm21, xmm1, [rcx]
simple.asm(110) : Error A2049: Invalid instruction operands
vptestnmd k5,zmm15,zmm6
simple.asm(190) : Error A2049: Invalid instruction operands
vptestnmd k5{k7},zmm15,zmm6
simple.asm(191) : Error A2049: Invalid instruction operands
vptestnmd k5,zmm15,ZMMWORD PTR [rcx]
simple.asm(192) : Error A2049: Invalid instruction operands
vptestnmd k5,zmm15,ZMMWORD PTR [rax+r14*8+123h]
simple.asm(193) : Error A2049: Invalid instruction operands
vptestnmd k5,zmm15,DWORD PTR [rcx]{1to16}
simple.asm(194) : Error A2049: Invalid instruction operands
vptestnmd k5,zmm15,ZMMWORD PTR [rdx+1fc0h]
simple.asm(195) : Error A2049: Invalid instruction operands
vptestnmd k5,zmm15,ZMMWORD PTR [rdx+200h]
simple.asm(196) : Error A2049: Invalid instruction operands
vptestnmd k5,zmm15,ZMMWORD PTR [rdx-200h]
simple.asm(197) : Error A2049: Invalid instruction operands
vptestnmd k5,zmm15,ZMMWORD PTR [rdx-2040h]
simple.asm(198) : Error A2049: Invalid instruction operands
vptestnmd k5,zmm15,DWORD PTR [rdx+1fch]{1to16}
simple.asm(199) : Error A2049: Invalid instruction operands
vptestnmd k5,zmm15,DWORD PTR [rdx+200h]{1to16}
simple.asm(200) : Error A2049: Invalid instruction operands
vptestnmd k5,zmm15,DWORD PTR [rdx-200h]{1to16}
simple.asm(201) : Error A2049: Invalid instruction operands
vptestnmd k5,zmm15,DWORD PTR [rdx-204h]{1to16}
simple.asm(202) : Error A2049: Invalid instruction operands
vptestnmq k5,zmm15,zmm6
simple.asm(203) : Error A2049: Invalid instruction operands
vptestnmq k5{k7},zmm15,zmm6
simple.asm(204) : Error A2049: Invalid instruction operands
vptestnmq k5,zmm15,ZMMWORD PTR [rcx]
simple.asm(205) : Error A2049: Invalid instruction operands
vptestnmq k5,zmm15,ZMMWORD PTR [rax+r14*8+123h]
simple.asm(206) : Error A2049: Invalid instruction operands
vptestnmq k5,zmm15,QWORD PTR [rcx]{1to8}
simple.asm(207) : Error A2049: Invalid instruction operands
vptestnmq k5,zmm15,ZMMWORD PTR [rdx+1fc0h]
simple.asm(208) : Error A2049: Invalid instruction operands
vptestnmq k5,zmm15,ZMMWORD PTR [rdx+200h]
simple.asm(209) : Error A2049: Invalid instruction operands
vptestnmq k5,zmm15,ZMMWORD PTR [rdx-200h]
simple.asm(210) : Error A2049: Invalid instruction operands
vptestnmq k5,zmm15,ZMMWORD PTR [rdx-2040h]
simple.asm(211) : Error A2049: Invalid instruction operands
vptestnmq k5,zmm15,QWORD PTR [rdx+3f8h]{1to8}
simple.asm(212) : Error A2049: Invalid instruction operands
vptestnmq k5,zmm15,QWORD PTR [rdx+400h]{1to8}
simple.asm(213) : Error A2049: Invalid instruction operands
vptestnmq k5,zmm15,QWORD PTR [rdx-400h]{1to8}
simple.asm(214) : Error A2049: Invalid instruction operands
vptestnmq k5,zmm15,QWORD PTR [rdx-408h]{1to8}
simple.asm(215) : Error A2049: Invalid instruction operands
VPMULLQ   xmm1 {k1}{z}, xmm2,xmm3
simple.asm(217) : Error A2049: Invalid instruction operands
VPMADD52HUQ xmm1 {k1}{z},xmm2,xmm3
simple.asm(276) : Error A2049: Invalid instruction operands
VPMADD52HUQ xmm1 {k1}{z},xmm2,[rcx]
simple.asm(277) : Error A2049: Invalid instruction operands
VPMADD52HUQ ymm1 {k1}{z},ymm2,ymm3
simple.asm(278) : Error A2049: Invalid instruction operands
VPMADD52HUQ ymm1 {k1}{z},ymm2,[rcx]
simple.asm(279) : Error A2049: Invalid instruction operands
VPMADD52HUQ zmm1 {k1}{z},zmm2,zmm3
simple.asm(280) : Error A2049: Invalid instruction operands
VPMADD52HUQ zmm1 {k1}{z},zmm2,[rcx]
simple.asm(281) : Error A2049: Invalid instruction operands
VPMADD52LUQ xmm1 {k1}{z},xmm2,xmm3
simple.asm(283) : Error A2049: Invalid instruction operands
VPMADD52LUQ xmm1 {k1}{z},xmm2,[rcx]
simple.asm(284) : Error A2049: Invalid instruction operands
VPMADD52LUQ ymm1 {k1}{z},ymm2,ymm3
simple.asm(285) : Error A2049: Invalid instruction operands
VPMADD52LUQ ymm1 {k1}{z},ymm2,[rcx]
simple.asm(286) : Error A2049: Invalid instruction operands
VPMADD52LUQ zmm1 {k1}{z},zmm2,zmm3
simple.asm(287) : Error A2049: Invalid instruction operands
VPMADD52LUQ zmm1 {k1}{z},zmm2,[rcx]
simple.asm(288) : Error A2049: Invalid instruction operands
simple.asm(288) : Fatal error A1113: Too many errors


Assembling (with debug build) without -dr switch gives the same errors

habran

It looks like GCC doesn't build properly
I tried to build with Code:Blocks and didn't work properly
VS doesn't have any problems to build binaries and exe is running flawlessly
I just tested it one hour ago with the newest sources from GIt
Cod-Father

johnsa

Quote from: GoneFishing on January 29, 2016, 09:08:24 PM
GCC debug build
Test of Debug option :
-dr                  Display reserved words

simple.asm:

----------------------------------------------------------------
VPMASKMOVD xmm1, xmm2,m128
simple.asm(89) : Error A2049: Invalid instruction operands
VPMASKMOVQ xmm1, xmm2,m128
simple.asm(90) : Error A2049: Invalid instruction operands
VPMASKMOVD m128, xmm1,xmm2
simple.asm(91) : Error A2049: Invalid instruction operands
VPMASKMOVQ m128, xmm2,xmm2
simple.asm(92) : Error A2049: Invalid instruction operands
VPMASKMOVD ymm1, ymm2,m256
simple.asm(93) : Error A2049: Invalid instruction operands
VPMASKMOVQ ymm1, ymm2,m256
simple.asm(94) : Error A2049: Invalid instruction operands
VPMASKMOVD [rcx], ymm1,ymm2
simple.asm(95) : Error A2049: Invalid instruction operands
VPMASKMOVQ m256, ymm1,ymm2
simple.asm(96) : Error A2049: Invalid instruction operands
VMOVHPD xmm2, xmm1, [rcx]
simple.asm(103) : Error A2049: Invalid instruction operands
VMOVHPD xmm21, xmm1, [rcx]
simple.asm(105) : Error A2049: Invalid instruction operands
VMOVLPD xmm2, xmm1, [rcx]
simple.asm(108) : Error A2049: Invalid instruction operands
VMOVLPD xmm21, xmm1, [rcx]
simple.asm(110) : Error A2049: Invalid instruction operands
vptestnmd k5,zmm15,zmm6
simple.asm(190) : Error A2049: Invalid instruction operands
vptestnmd k5{k7},zmm15,zmm6
simple.asm(191) : Error A2049: Invalid instruction operands
vptestnmd k5,zmm15,ZMMWORD PTR [rcx]
simple.asm(192) : Error A2049: Invalid instruction operands
vptestnmd k5,zmm15,ZMMWORD PTR [rax+r14*8+123h]
simple.asm(193) : Error A2049: Invalid instruction operands
vptestnmd k5,zmm15,DWORD PTR [rcx]{1to16}
simple.asm(194) : Error A2049: Invalid instruction operands
vptestnmd k5,zmm15,ZMMWORD PTR [rdx+1fc0h]
simple.asm(195) : Error A2049: Invalid instruction operands
vptestnmd k5,zmm15,ZMMWORD PTR [rdx+200h]
simple.asm(196) : Error A2049: Invalid instruction operands
vptestnmd k5,zmm15,ZMMWORD PTR [rdx-200h]
simple.asm(197) : Error A2049: Invalid instruction operands
vptestnmd k5,zmm15,ZMMWORD PTR [rdx-2040h]
simple.asm(198) : Error A2049: Invalid instruction operands
vptestnmd k5,zmm15,DWORD PTR [rdx+1fch]{1to16}
simple.asm(199) : Error A2049: Invalid instruction operands
vptestnmd k5,zmm15,DWORD PTR [rdx+200h]{1to16}
simple.asm(200) : Error A2049: Invalid instruction operands
vptestnmd k5,zmm15,DWORD PTR [rdx-200h]{1to16}
simple.asm(201) : Error A2049: Invalid instruction operands
vptestnmd k5,zmm15,DWORD PTR [rdx-204h]{1to16}
simple.asm(202) : Error A2049: Invalid instruction operands
vptestnmq k5,zmm15,zmm6
simple.asm(203) : Error A2049: Invalid instruction operands
vptestnmq k5{k7},zmm15,zmm6
simple.asm(204) : Error A2049: Invalid instruction operands
vptestnmq k5,zmm15,ZMMWORD PTR [rcx]
simple.asm(205) : Error A2049: Invalid instruction operands
vptestnmq k5,zmm15,ZMMWORD PTR [rax+r14*8+123h]
simple.asm(206) : Error A2049: Invalid instruction operands
vptestnmq k5,zmm15,QWORD PTR [rcx]{1to8}
simple.asm(207) : Error A2049: Invalid instruction operands
vptestnmq k5,zmm15,ZMMWORD PTR [rdx+1fc0h]
simple.asm(208) : Error A2049: Invalid instruction operands
vptestnmq k5,zmm15,ZMMWORD PTR [rdx+200h]
simple.asm(209) : Error A2049: Invalid instruction operands
vptestnmq k5,zmm15,ZMMWORD PTR [rdx-200h]
simple.asm(210) : Error A2049: Invalid instruction operands
vptestnmq k5,zmm15,ZMMWORD PTR [rdx-2040h]
simple.asm(211) : Error A2049: Invalid instruction operands
vptestnmq k5,zmm15,QWORD PTR [rdx+3f8h]{1to8}
simple.asm(212) : Error A2049: Invalid instruction operands
vptestnmq k5,zmm15,QWORD PTR [rdx+400h]{1to8}
simple.asm(213) : Error A2049: Invalid instruction operands
vptestnmq k5,zmm15,QWORD PTR [rdx-400h]{1to8}
simple.asm(214) : Error A2049: Invalid instruction operands
vptestnmq k5,zmm15,QWORD PTR [rdx-408h]{1to8}
simple.asm(215) : Error A2049: Invalid instruction operands
VPMULLQ   xmm1 {k1}{z}, xmm2,xmm3
simple.asm(217) : Error A2049: Invalid instruction operands
VPMADD52HUQ xmm1 {k1}{z},xmm2,xmm3
simple.asm(276) : Error A2049: Invalid instruction operands
VPMADD52HUQ xmm1 {k1}{z},xmm2,[rcx]
simple.asm(277) : Error A2049: Invalid instruction operands
VPMADD52HUQ ymm1 {k1}{z},ymm2,ymm3
simple.asm(278) : Error A2049: Invalid instruction operands
VPMADD52HUQ ymm1 {k1}{z},ymm2,[rcx]
simple.asm(279) : Error A2049: Invalid instruction operands
VPMADD52HUQ zmm1 {k1}{z},zmm2,zmm3
simple.asm(280) : Error A2049: Invalid instruction operands
VPMADD52HUQ zmm1 {k1}{z},zmm2,[rcx]
simple.asm(281) : Error A2049: Invalid instruction operands
VPMADD52LUQ xmm1 {k1}{z},xmm2,xmm3
simple.asm(283) : Error A2049: Invalid instruction operands
VPMADD52LUQ xmm1 {k1}{z},xmm2,[rcx]
simple.asm(284) : Error A2049: Invalid instruction operands
VPMADD52LUQ ymm1 {k1}{z},ymm2,ymm3
simple.asm(285) : Error A2049: Invalid instruction operands
VPMADD52LUQ ymm1 {k1}{z},ymm2,[rcx]
simple.asm(286) : Error A2049: Invalid instruction operands
VPMADD52LUQ zmm1 {k1}{z},zmm2,zmm3
simple.asm(287) : Error A2049: Invalid instruction operands
VPMADD52LUQ zmm1 {k1}{z},zmm2,[rcx]
simple.asm(288) : Error A2049: Invalid instruction operands
simple.asm(288) : Fatal error A1113: Too many errors


Assembling (with debug build) without -dr switch gives the same errors

Out of interest .. did you add -win64 and -Zp8 as a switch when assembling? (I think... it might only work with that flag set)

GoneFishing

Quote from: habran on January 29, 2016, 09:30:40 PM
It looks like GCC doesn't build properly
I tried to build with Code:Blocks and didn't work properly
VS doesn't have any problems to build binaries and exe is running flawlessly
I just tested it one hour ago with the newest sources from GIt
Did you try to assemble simple.asm with DEBUG BUILD  of HJWasm?

[EDIT] You're right , something is wrong with debug GCC build . Debug OW build assembles simple.asm just fine.

Quote from: johnsa on January 29, 2016, 09:35:00 PM
...
Out of interest .. did you add -win64 and -Zp8 as a switch when assembling? (I think... it might only work with that flag set)
No, I didn't use those switches  . Tried them now - errors remain the same .  Of course it's up to you to decide is it an interesting error  or not .

habran

Glad that you confirmed that :t
We appreciate you cooperation and your efforts mate 8) 
Cod-Father