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

johnsa

I wonder what the gcc debug build could be doing, which gcc version is it again?

GoneFishing

Quote from: johnsa on January 29, 2016, 10:03:14 PM
I wonder what the gcc debug build could be doing, which gcc version is it again?
JOHNSA, GCC 4.8.4
I ran GCC debug build with trace switch , all debug output is in attachment .

Quote from: habran on January 29, 2016, 10:01:13 PM
Glad that you confirmed that :t
We appreciate you cooperation and your efforts mate 8) 
Thanks, HABRAN .
I'm glad to be a little bit helpful. 

habran

You are doing a great job GoneFishing :bgrin:
Cod-Father

habran

jj2007,
opax -DWORD PTR[rbx]; << << assembles fine with MASM
It shouldn't because it is wrong
JWasm  see that '-' as error because it does better job than MASM
If you were an assembler and come to such a statement wouldn't you complain ;)
I know for sure that you would screem :biggrin:
Cod-Father

TouEnMasm

Quote
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,

That's clear in the post,it's the compiled test of simple.asm posted by habran.
He miss some options.
http://masm32.com/board/index.php?topic=5035.msg54623#msg54623
Fa is a musical note to play with CL

johnsa

Ok,

I have GCC chain + mingw x64 building HJWasm on Windows.
I get the same warnings as mentioned.

I believe the issue with the build (and why it won't assemble) are those warnings about truncation happening to the instruction definitions:


H/instruct.h:1846:120: warning: large integer implicitly truncated to unsigned t
ype [-Woverflow]
insn(VPMASKMOVD,1,            OpCls( XMM_M128, XMM,      NONE ), F_660F38,0,  n
o_WDS, 0x8C,    0x00,      P_686|P_AVX, DSIZE )           //AVX2

                                        ^


DSIZE is an enum member, value = 0x40 .. so it's definitely not overflowing.. some more non C99 issues I believe...


TWell

#186
With Pellesc x64 broken exe.\H\instruct.h(165): warning #2110: Initializer exceeds bit-field width.
insn(CMPSD, 2,                  OpCls( XMM,      XMM_M64,    I8_U ), F_F20F, 1,  no_WDS, 0xC2,     0x00,       P_686|P_SSE2,W1|QSIZE|T1S)
.\H\instruct.h(187): warning #2110: Initializer exceeds bit-field width.
insn(MOVSD, 2,                  OpCls( XMM,      XMM_M64,    NONE ), F_F20F, 1,  no_WDS, 0x10,     0x00,       P_686|P_SSE2,W1|QSIZE|T1S)
.\H\instruct.h(188): warning #2110: Initializer exceeds bit-field width.
insn(MOVSD, 3,                  OpCls( M64,      XMM,        NONE ), F_F20F, 0,  no_WDS, 0x11,     0x00,       P_686|P_SSE2,W1|QSIZE|T1S)
.\H\instruct.h(745): warning #2110: Initializer exceeds bit-field width.
arfl( ADD,  add,  0x58 )
arfl( DIV,  div,  0x5E )
arfl( MAX,  max,  0x5F )
arfl( MIN,  min,  0x5D )
arfl( MUL,  mul,  0x59 )
arfl( SQRT, sqrt, 0x51 )
arfl( SUB,  sub,  0x5C )
...
HJWasm v2.13, Jan 29 2016, Masm-compatible assembler.
Portions Copyright (c) 1992-2002 Sybase, Inc. All Rights Reserved.
Source code is available under the Sybase Open Watcom Public License.

simple.asm(1203) : Error A2168: General Failure
*** Process returned 1 ***
Press any key to continue...
With MSVC14 cl + link and WDDK libs\HJWasm\MSVC14>hjwasm -win64 ..\..\simple.asm
HJWasm v2.13, Jan 29 2016, Masm-compatible assembler.
Portions Copyright (c) 1992-2002 Sybase, Inc. All Rights Reserved.
Source code is available under the Sybase Open Watcom Public License.

..\..\simple.asm: 9442 lines, 2 passes, 150 ms, 0 warnings, 0 errors

\HJWasm\MSVC14>hjwasm64 -win64 ..\..\simple.asm
HJWasm v2.13, Jan 29 2016, Masm-compatible assembler.
Portions Copyright (c) 1992-2002 Sybase, Inc. All Rights Reserved.
Source code is available under the Sybase Open Watcom Public License.

..\..\simple.asm: 9442 lines, 3 passes, 114 ms, 0 warnings, 0 errors
Error A2168: General Failure

nidud

#187
deleted

TouEnMasm

>>>>>>>>>>>>>>> codegen.c comprdsp isn't initialised <<<<<<<<<<<<<<<<<<<<<<<<<<

int_8 comprdsp = 0;  <<<<<<<<<<<<<<<<<<<<< modif   

result on simple.asm ;habran source avx512 with
        .686P         
      .XMM
      .MMX
;
   .x64                ; -pe requires to set cpu, model & language
option casemap : none
option win64 : 11
option frame : auto
option STACKBASE : RSP

;**************************************************************************************
HJWasm v2.13, Jan 29 2016, Masm-compatible assembler.
Portions Copyright (c) 1992-2002 Sybase, Inc. All Rights Reserved.
Source code is available under the Sybase Open Watcom Public License.

simple.asm: 9448 lines, 2 passes, 183 ms, 0 warnings, 0 errors
56 items in symbol table, expected 56
max items in a line=1, lines with 0/1/<=5/<=10 items=7953/56/0/0,
2049 items in resw table, max items/line=7 [0=662 1=688 376 114 42 11 5 2]
invokation CATSTR=0 SUBSTR=0 SIZESTR=0 INSTR=0 EQU(text)=2
lines read(files)/processed in pass one: 9447 / 9448
invokations: PreprocessLine=9502/9338/9333, Tokenize=18739/0
memory used: 1174 kB

There has been an error while assembling this project.

Appuyez sur une touche pour continuer...
;*************************************************************************************
Fa is a musical note to play with CL

nidud

#189
deleted

Vortex

Hello johnsa and habran,

First of all, many thanks for your nice work. Any plan later to add import libraries to your website terraspace.co.uk?

habran

You are welcome Vortex :biggrin:
Johnsa will be able to answer that question about import libraries.

nidud, I was having the same thoughts as you, so I tested it with your code and works fine, so we will replace existing
code with yours
  Thanks :t
Cod-Father

HSE

I read last days posts with phone. Now, back to civilization I download the source.

HJWAsm32 compiled apparently perfect with Mingw32-gcc.

Testing my main Masm32-ObjAsm32-SimplMath project there is a problem in k1-4:

        neqqu equ 56
       
        DefineVariable k1 ,  REAL8 , neqqu dup (0.0);
DefineVariable k2 ,  REAL8 , neqqu dup (0.0);
DefineVariable k3 ,  REAL8 , neqqu dup (0.0);
DefineVariable k4 ,  REAL8 , neqqu dup (0.0);


Are k1, etc reserved words now?

Thanks. HSE

I found in special.h, they are some AVX things. I'm going to change my test code.

Test compilation is perfect now. I don't see any problem (remember I'm using max line len 1600, max id len 1580 and  max macros nesting 120).
Equations in Assembly: SmplMath

johnsa

Quote from: HSE on January 30, 2016, 10:11:09 AM
I read last days posts with phone. Now, back to civilization I download the source.

HJWAsm32 compiled apparently perfect with Mingw32-gcc.

Testing my main Masm32-ObjAsm32-SimplMath project there is a problem in k1-4:

        neqqu equ 56
       
        DefineVariable k1 ,  REAL8 , neqqu dup (0.0);
DefineVariable k2 ,  REAL8 , neqqu dup (0.0);
DefineVariable k3 ,  REAL8 , neqqu dup (0.0);
DefineVariable k4 ,  REAL8 , neqqu dup (0.0);


Are k1, etc reserved words now?

Thanks. HSE

I found in special.h, they are some AVX things. I'm going to change my test code.

Test compilation is perfect now. I don't see any problem (remember I'm using max line len 1600, max id len 1580 and  max macros nesting 120).

Hi,

k1 etc.. would be reserved now as registers for AVX512F, so you are correct.

johnsa

Quote from: nidud on January 30, 2016, 06:10:31 AM
Quote
warning #2110: Initializer exceeds bit-field width.

You may try this in parser.h:

#define W1       0x8000

struct instr_item {
    unsigned char opclsidx; /* v2.06: index for opnd_clstab */
    unsigned char byte1_info; /* flags for 1st byte */
#if 1
    unsigned short allowed_prefix; /* allowed prefix */
    unsigned char first; /* 1=opcode's first entry */
    unsigned char rm_info; /* info on r/m byte */
    unsigned char opnd_dir; /* operand direction */
#else
    unsigned char
allowed_prefix : 3, /* allowed prefix */
first : 1, /* 1=opcode's first entry */
rm_info : 3, /* info on r/m byte */
opnd_dir : 1; /* operand direction */
#endif
    unsigned short prefix; /* used for EVEX */
    unsigned short cpu;
    unsigned char opcode; /* opcode byte */
    unsigned char rm_byte; /* mod_rm_byte */
};


W1 is used as .prefix but a copy is stored in .allowed_prefix.

Hi,

This change is in (with Habrans verification too) and is in github.
I can from my side now report a completely successful build using both Visual C and GCC (I no longer have warnings about truncation.
I've included an initial value for comprdsp (to see if that helps with ToutEnMasm issue.

That being said, using the GCC built version I still get a general failure assembling simple.asm, which works fine with the Visual C build.
The line causing it:


simple.asm (1125):
vgatherdpd zmm15{k1}, [r14+ymm31*8+7bh]                          ;// 62 02 FD 41 92 B4 FE 7B 00 00 00


My other projects (not using any avx512f) seem to assemble and work perfectly with both.