Terraspace / UASM

UASM - Macro Assembler
http://www.terraspace.co.uk/uasm.html
Other
220 stars 49 forks source link

Oodles of "Error A2014: invalid combination of opcode and operands" using 2.16 #36

Closed gwoltman closed 7 years ago

gwoltman commented 7 years ago

If I assemble mult.asm with these command line arguments (/c -Fl -Sf -Sa -Sg -coff), I get no errors. See file mult.no_errors.lst.

If I assemble mult.asm with these command line arguments (/c -Fl -coff), I get 3 errors. See mult.errors.lst.

mov ecx, [esp+4] ; Address of data struct to return info Error A2014: invalid combination of opcode and operands mov eax, OFFSET xjmptable ; SSE2 mersenne mod FFTs Error A2014: invalid combination of opcode and operands ret Error A2014: invalid combination of opcode and operands

As always, MASM has no problems. The next source file to assemble (mult1.asm) has even more problems. Here is a link to the entire MASM code base: https://www.dropbox.com/s/rpkstsv1m1kj4bc/gwnum.zip?dl=0

C.bat starts the assembly process using a makefile called "compile". C64.bat does the same thing for 64-bit assembly. Enjoy, it will be a good test case!

john-terraspace commented 7 years ago

Hi,

I think we may have a fix for this already, I’ve grabbed your package from dropbox and am trying to get it to compile but running into the following:

D:\gw>c

D:\gw>setlocal

D:\gw>if exist "c:\program files (x86)" goto x64

D:\gw>REM if exist "c:\program files (x86)\microsoft visual studio 10.0" goto x64_10

D:\gw>if exist "c:\program files (x86)\microsoft visual studio 8" goto x64_8

D:\gw>call "c:\program files (x86)\microsoft visual studio 9.0\vc\bin\vcvars32"

D:\gw>"C:\Program Files (x86)\Microsoft Visual Studio 9.0\Common7\Tools\vsvars32.bat"

Setting environment for using Microsoft Visual Studio 2008 x86 tools.

D:\gw>goto makeit

D:\gw>nmake /f compile

Microsoft (R) Program Maintenance Utility Version 9.00.30729.01

Copyright (C) Microsoft Corporation. All rights reserved.

    cl /GF /W3 /MT /D_CRT_SECURE_NO_DEPRECATE /DGDEBUG /Z7 /c /Fodebug\cpuid.obj cpuid.c

Microsoft (R) 32-bit C/C++ Optimizing Compiler Version 15.00.30729.01 for 80x86

Copyright (C) Microsoft Corporation. All rights reserved.

cpuid.c

D:\gw\cpuid.c : fatal error C1083: Cannot open compiler generated file: 'debug\cpuid.obj': No such file or directory

NMAKE : fatal error U1077: '"C:\Program Files (x86)\Microsoft Visual Studio 9.0\VC\BIN\cl.EXE"' : return code '0x1'

Stop.

D:\gw>endlocal

D:\gw>

Any ideas on this?

From: gwoltman [mailto:notifications@github.com] Sent: 10 November 2016 01:58 AM To: Terraspace/HJWasm HJWasm@noreply.github.com Subject: [Terraspace/HJWasm] Oodles of "Error A2014: invalid combination of opcode and operands" using 2.16 (#36)

If I assemble mult.asm with these command line arguments (/c -Fl -Sf -Sa -Sg -coff), I get no errors. See file mult.no_errors.lst.

If I assemble mult.asm with these command line arguments (/c -Fl -coff), I get 3 errors. See mult.errors.lst.

mov ecx, [esp+4] ; Address of data struct to return info Error A2014: invalid combination of opcode and operands mov eax, OFFSET xjmptable ; SSE2 mersenne mod FFTs Error A2014: invalid combination of opcode and operands ret Error A2014: invalid combination of opcode and operands

As always, MASM has no problems. The next source file to assemble (mult1.asm) has even more problems. Here is a link to the entire MASM code base: https://www.dropbox.com/s/rpkstsv1m1kj4bc/gwnum.zip?dl=0

C.bat starts the assembly process using a makefile called "compile". C64.bat does the same thing for 64-bit assembly. Enjoy, it will be a good test case!

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/Terraspace/HJWasm/issues/36 , or mute the thread https://github.com/notifications/unsubscribe-auth/AQGQVKT4lfWsmT7Gpb3XCw-qyUna2_Awks5q8noggaJpZM4KuMqt .

john-terraspace commented 7 years ago

I’ve quickly tested just the assembly of mult.asm on it’s own using the fix (which is now updated on the site as a new package 2.16 dated 10th of November).

Hjwasm32 and hjwasm64 seem to have no issues assembling mult.asm with both set of command line options.

Let me know if this works for you now.

Thanks!

John

From: gwoltman [mailto:notifications@github.com] Sent: 10 November 2016 01:58 AM To: Terraspace/HJWasm HJWasm@noreply.github.com Subject: [Terraspace/HJWasm] Oodles of "Error A2014: invalid combination of opcode and operands" using 2.16 (#36)

If I assemble mult.asm with these command line arguments (/c -Fl -Sf -Sa -Sg -coff), I get no errors. See file mult.no_errors.lst.

If I assemble mult.asm with these command line arguments (/c -Fl -coff), I get 3 errors. See mult.errors.lst.

mov ecx, [esp+4] ; Address of data struct to return info Error A2014: invalid combination of opcode and operands mov eax, OFFSET xjmptable ; SSE2 mersenne mod FFTs Error A2014: invalid combination of opcode and operands ret Error A2014: invalid combination of opcode and operands

As always, MASM has no problems. The next source file to assemble (mult1.asm) has even more problems. Here is a link to the entire MASM code base: https://www.dropbox.com/s/rpkstsv1m1kj4bc/gwnum.zip?dl=0

C.bat starts the assembly process using a makefile called "compile". C64.bat does the same thing for 64-bit assembly. Enjoy, it will be a good test case!

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/Terraspace/HJWasm/issues/36 , or mute the thread https://github.com/notifications/unsubscribe-auth/AQGQVKT4lfWsmT7Gpb3XCw-qyUna2_Awks5q8noggaJpZM4KuMqt .

john-terraspace commented 7 years ago

D:\gw>c:\jwasm\hjwasm64 /c -Fl -Sf -Sa -Sg -coff mult.asm

HJWasm v2.16, Nov 10 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.

mult.asm: 5250 lines, 2 passes, 478 ms, 0 warnings, 0 errors

D:\gw>c:\jwasm\hjwasm32 /c -Fl -Sf -Sa -Sg -coff mult.asm

HJWasm v2.16, Nov 10 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.

mult.asm: 5250 lines, 2 passes, 448 ms, 0 warnings, 0 errors

D:\gw>c:\jwasm\hjwasm32 /c -Fl -coff mult.asm

HJWasm v2.16, Nov 10 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.

mult.asm: 5250 lines, 2 passes, 322 ms, 0 warnings, 0 errors

D:\gw>c:\jwasm\hjwasm64 /c -Fl -coff mult.asm

HJWasm v2.16, Nov 10 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.

mult.asm: 5250 lines, 2 passes, 331 ms, 0 warnings, 0 errors

From: gwoltman [mailto:notifications@github.com] Sent: 10 November 2016 01:58 AM To: Terraspace/HJWasm HJWasm@noreply.github.com Subject: [Terraspace/HJWasm] Oodles of "Error A2014: invalid combination of opcode and operands" using 2.16 (#36)

If I assemble mult.asm with these command line arguments (/c -Fl -Sf -Sa -Sg -coff), I get no errors. See file mult.no_errors.lst.

If I assemble mult.asm with these command line arguments (/c -Fl -coff), I get 3 errors. See mult.errors.lst.

mov ecx, [esp+4] ; Address of data struct to return info Error A2014: invalid combination of opcode and operands mov eax, OFFSET xjmptable ; SSE2 mersenne mod FFTs Error A2014: invalid combination of opcode and operands ret Error A2014: invalid combination of opcode and operands

As always, MASM has no problems. The next source file to assemble (mult1.asm) has even more problems. Here is a link to the entire MASM code base: https://www.dropbox.com/s/rpkstsv1m1kj4bc/gwnum.zip?dl=0

C.bat starts the assembly process using a makefile called "compile". C64.bat does the same thing for 64-bit assembly. Enjoy, it will be a good test case!

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/Terraspace/HJWasm/issues/36 , or mute the thread https://github.com/notifications/unsubscribe-auth/AQGQVKT4lfWsmT7Gpb3XCw-qyUna2_Awks5q8noggaJpZM4KuMqt .

gwoltman commented 7 years ago

Hi John,

Thanks for the quick turnaround. We're better, but not there yet. From that big zip file, try assembling ymult1ax.asm and you'll get several errors like this:

0001A6EB 2 vmovapd ymm2,YMMWORD PTR [r11+48*SZPTR+576+16*SZPTR+24*8] Error A2014: invalid combination of opcode and operands

As you figured out, you can simply delete the .c files from the makefile - they are not of interest to you. The above file fails to compile using either the c.bat macro which generates 32-bit object files and c64.bat which generates 64-bit object files.

Regards, George

john-terraspace commented 7 years ago

It appears to be fine with hjwasm64, but not hjwasm32 is that correct?

From: gwoltman [mailto:notifications@github.com] Sent: 10 November 2016 11:47 PM To: Terraspace/HJWasm HJWasm@noreply.github.com Cc: John Hankinson john@terraspace.co.uk; Comment comment@noreply.github.com Subject: Re: [Terraspace/HJWasm] Oodles of "Error A2014: invalid combination of opcode and operands" using 2.16 (#36)

Hi John,

Thanks for the quick turnaround. We're better, but not there yet. From that big zip file, try assembling ymult1ax.asm and you'll get several errors like this:

0001A6EB 2 vmovapd ymm2,YMMWORD PTR [r11+48_SZPTR+576+16_SZPTR+24*8] Error A2014: invalid combination of opcode and operands

As you figured out, you can simply delete the .c files from the makefile - they are not of interest to you. The above file fails to compile using either the c.bat macro which generates 32-bit object files and c64.bat which generates 64-bit object files.

Regards, George

— You are receiving this because you commented. Reply to this email directly, view it on GitHub https://github.com/Terraspace/HJWasm/issues/36#issuecomment-259841818 , or mute the thread https://github.com/notifications/unsubscribe-auth/AQGQVHccy8-DOIrYKnQd3qyQft2NZiunks5q86zrgaJpZM4KuMqt .

john-terraspace commented 7 years ago

The error I’m getting under hjwasm32 appears to be coming from the exec macro,

For example:

ymult1ax.asm(1769) : Error A2014: invalid combination of opcode and operands

exec(1)[unravel.mac]: Macro called from

inorm(9)[ymult1ax.asm]: Macro called from

ymult1ax.asm(1769): Main line code

it’s triggered from zpnorm, inorm etc.. and it appears in all cases to be the line:

base2 vmovapd ymm2, YMM_BIGVAL

I’ve tried some combinations like:

YMM_BIGVAL REAL8 0.0, 0.0, 0.0, 0.0

SZPTR equ 4

.code

_start:

            vmovapd ymm2,YMMWORD PTR [r11+48*SZPTR+576+16*SZPTR+24*8]

            vmovapd             ymm2, YMM_BIGVAL

And these all work under hjwasm32 and 64, so I can only assume it’s the base2 macro, what and where can I find that I had a look through the various mac files (ynormal, ybasic, etc) but couldn’t see it.

From: gwoltman [mailto:notifications@github.com] Sent: 10 November 2016 11:47 PM To: Terraspace/HJWasm HJWasm@noreply.github.com Cc: John Hankinson john@terraspace.co.uk; Comment comment@noreply.github.com Subject: Re: [Terraspace/HJWasm] Oodles of "Error A2014: invalid combination of opcode and operands" using 2.16 (#36)

Hi John,

Thanks for the quick turnaround. We're better, but not there yet. From that big zip file, try assembling ymult1ax.asm and you'll get several errors like this:

0001A6EB 2 vmovapd ymm2,YMMWORD PTR [r11+48_SZPTR+576+16_SZPTR+24*8]

Error A2014: invalid combination of opcode and operands

As you figured out, you can simply delete the .c files from the makefile - they are not of interest to you. The above file fails to compile using either the c.bat macro which generates 32-bit object files and c64.bat which generates 64-bit object files.

Regards, George

— You are receiving this because you commented. Reply to this email directly, view it on GitHub https://github.com/Terraspace/HJWasm/issues/36#issuecomment-259841818 , or mute the thread https://github.com/notifications/unsubscribe-auth/AQGQVHccy8-DOIrYKnQd3qyQft2NZiunks5q86zrgaJpZM4KuMqt .

gwoltman commented 7 years ago

Hi John,

YMM_BIGVAL is defined in extrn.mac as YMM_BIGVAL EQU YPTR [UNION_BASE+16_SZPTR+24_8] where UNION_BASE is UNION_BASE EQU AD_BASE+48*SZPTR+576 and AD_BASE is one of two possibilities: IFNDEF X86_64 AD_BASE EQU <rsp+push_amt> ELSE AD_BASE EQU ENDIF

base2 is an argument to inorm and zpnorm. The argument will be either "exec" or "noexec" which are defined in unravel.mac:

exec MACRO ops:vararg &ops ENDM noexec MACRO ops:vararg ENDM

SZPTR is defined in unravel.mac as either 4 or 8:

IFNDEF X86_64 DP EQU DD SZPTR EQU 4 ELSE DP EQU DQ SZPTR EQU 8 ENDIF

On Fri, Nov 11, 2016 at 8:39 AM, John Hankinson notifications@github.com wrote:

The error I’m getting under hjwasm32 appears to be coming from the exec macro,

For example:

ymult1ax.asm(1769) : Error A2014: invalid combination of opcode and operands

exec(1)[unravel.mac]: Macro called from

inorm(9)[ymult1ax.asm]: Macro called from

ymult1ax.asm(1769): Main line code

it’s triggered from zpnorm, inorm etc.. and it appears in all cases to be the line:

base2 vmovapd ymm2, YMM_BIGVAL

I’ve tried some combinations like:

YMM_BIGVAL REAL8 0.0, 0.0, 0.0, 0.0

SZPTR equ 4

.code

_start:

vmovapd ymm2,YMMWORD PTR [r11+48_SZPTR+576+16_SZPTR+24*8]

vmovapd ymm2, YMM_BIGVAL

And these all work under hjwasm32 and 64, so I can only assume it’s the base2 macro, what and where can I find that I had a look through the various mac files (ynormal, ybasic, etc) but couldn’t see it.

From: gwoltman [mailto:notifications@github.com] Sent: 10 November 2016 11:47 PM To: Terraspace/HJWasm HJWasm@noreply.github.com Cc: John Hankinson john@terraspace.co.uk; Comment < comment@noreply.github.com> Subject: Re: [Terraspace/HJWasm] Oodles of "Error A2014: invalid combination of opcode and operands" using 2.16 (#36)

Hi John,

Thanks for the quick turnaround. We're better, but not there yet. From that big zip file, try assembling ymult1ax.asm and you'll get several errors like this:

0001A6EB 2 vmovapd ymm2,YMMWORD PTR [r11+48_SZPTR+576+16_SZPTR+24*8]

Error A2014: invalid combination of opcode and operands

As you figured out, you can simply delete the .c files from the makefile - they are not of interest to you. The above file fails to compile using either the c.bat macro which generates 32-bit object files and c64.bat which generates 64-bit object files.

Regards, George

— You are receiving this because you commented. Reply to this email directly, view it on GitHub https://github.com/ Terraspace/HJWasm/issues/36#issuecomment-259841818 , or mute the thread < https://github.com/notifications/unsubscribe-auth/AQGQVHccy8- DOIrYKnQd3qyQft2NZiunks5q86zrgaJpZM4KuMqt> .

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/Terraspace/HJWasm/issues/36#issuecomment-259959128, or mute the thread https://github.com/notifications/unsubscribe-auth/AVPFM3BfAPo3Im0u0EINvjIbq79ewYIjks5q9HAtgaJpZM4KuMqt .

john-terraspace commented 7 years ago

Hi,

Thanks for the info. I assume YPTR equ YMMWORD PTR ?

I’ve created a test piece trying to use these various items and I don’t seem to have been able to reproduce the error we’re experiencing with your source as yet.. here is my test-piece to try help narrow it down:

            .686p     

            .model flat

            .mmx

            .xmm

            ;.x64

            option casemap:none

            ;option win64:11

            ;option frame:auto

            ;option STACKBASE:RSP

includelib <kernel32.lib>

includelib <user32.lib>

.data

IFNDEF X86_64

DP EQU DD

SZPTR EQU 4

ELSE

DP EQU DQ

SZPTR EQU 8

ENDIF

IFNDEF X86_64

AD_BASE EQU <esp+16>

ELSE

AD_BASE EQU

ENDIF

UNION_BASE EQU AD_BASE+48*SZPTR+576

YPTR EQU YMMWORD

YMM_BIGVAL EQU YPTR [UNION_BASE+16_SZPTR+24_8]

;base2 is an argument to inorm and zpnorm. The argument will be either

;"exec" or "noexec" which are defined in unravel.mac:

exec MACRO ops:vararg

&ops

ENDM

noexec MACRO ops:vararg

ENDM

.code

_start:

            vmovapd ymm2,YMMWORD PTR [ebx+48*SZPTR+576+16*SZPTR+24*8]

            exec vmovapd  ymm2, YMM_BIGVAL

            vxorpd  ymm2, ymm2, ymm2

            vmovapd             ymm1, YMM_BIGVAL                    ;; Load comparison valueno base2 

            vxorpd  ymm1, ymm1, ymm1                     ;; Create comparison value          

            vcmppd                ymm0, ymm2, ymm1, 0Ch                           ;; Are any carries non-zero           

            vmovmskpd eax, ymm0                                                ;; Extract 4 comparison bitsbase2              

            vxorpd  ymm1, ymm1, ymm1                     ;; High carry words are always compared to zero               

            vcmppd                ymm0, ymm3, ymm1, 0Ch                           ;; Are any carries non-zero           

            vmovmskpd ecx, ymm0                                                ;; Extract 4 comparison bits          

            or            eax, ecx

            movzx   eax, BYTE PTR [edi]                         ;; Load big vs. little flags 

            vmovapd             ymm0, [esi]                                        ;; Load values1ttp            

            vmulpd ymm0, ymm0, [ebp]                       ;; Mul values1 by two-to-minus-phittp   

            vmulpd ymm0, ymm0, YMM_BIGVAL;; Mul by FFTLEN/2               

            vaddpd ymm0, ymm0, ymm2                     ;; x1 = values1 + carry     split_upper_carry_zpad_word ttp, base2, ymm3, ymm1, ymm2, rax*2no const vmulpd      ymm2, ymm3, YMM_K_LO                          ;; low bits of high FFT carry * k_loconst            

            vmulpd ymm2, ymm3, YMM_BIGVAL ;; low bits of high_FFT_carry * k_lo              

            vaddpd ymm0, ymm0, ymm2                     ;; x1 = x1 + low bits of high_FFT_carry * k_lono const 

            vmulpd ymm3, ymm3, YMM_BIGVAL                     ;; low bits of high FFT carry * k_hiconst  vmulpd ymm3, ymm3, YMM_K_TIMES_MULCONST_HI ;; low bits of high FFT carry * k_hittp      

            vmulpd ymm3, ymm3, YMM_BIGVAL[eax*2] ;; shift low bits of high FFT carry * k_hino ttp           vmulpd                ymm3, ymm3, YMM_LIMIT_INVERSE[0] ;; shift low bits of high FFT carry * k_hi  

            vroundpd ymm3, ymm3, 0                                           ;; WASTEFUL.  Round (k_hi * limit_inverse) should be precomputed    rounding ttp, base2, noexec, ymm0, ymm2, ymm4, rax*2            

            vaddpd ymm2, ymm2, ymm3                     ;; Carry += shifted low bits of high_FFT_carry * k_hittp   

            vmulpd ymm0, ymm0, [ebp+32]                               ;; new value1 = val * two-to-phi                ystore   [rsi], ymm0                                                ;; Save new value1          

            vmovapd             ymm3, ymm1                                    ;; Next high FFT carry = high bits of current high FFT carryttp                bump    rdi, 1                                                      ;; Advance pointers         bump    rsi, 64ttp              bump    rbp, 64  sub                rdx, 1                                                     ;; Test counter   jnz          section_loop                                      ;; More cache lines in section, add carry in        ;; Section ended.  Rotate carries again and add the new next section carry values              ;; into the previously calculated next section carry values           rotate_carries base2, ymm2, ymm4, ymm0, ymm1                rotate_carries noexec, ymm3, ymm5, ymm0, ymm1base2           vsubpd ymm4, ymm4, YMM_BIGVAL                vaddpd ymm4, ymm4, YMM_TMP1         vaddpd ymm5, ymm5, YMM_TMP2         jmp        section_start

            ret

end _start

Assembled with:

c:\jwasm\hjwasm32 -c -Fl -Sf -Sa -Sg -coff vcall2.asm

Perhaps Habran has some ideas

From: gwoltman [mailto:notifications@github.com] Sent: 11 November 2016 02:25 PM To: Terraspace/HJWasm HJWasm@noreply.github.com Cc: John Hankinson john@terraspace.co.uk; Comment comment@noreply.github.com Subject: Re: [Terraspace/HJWasm] Oodles of "Error A2014: invalid combination of opcode and operands" using 2.16 (#36)

Hi John,

YMM_BIGVAL is defined in extrn.mac as YMM_BIGVAL EQU YPTR [UNION_BASE+16_SZPTR+24_8] where UNION_BASE is UNION_BASE EQU AD_BASE+48*SZPTR+576 and AD_BASE is one of two possibilities: IFNDEF X86_64 AD_BASE EQU <rsp+push_amt> ELSE AD_BASE EQU ENDIF

base2 is an argument to inorm and zpnorm. The argument will be either "exec" or "noexec" which are defined in unravel.mac:

exec MACRO ops:vararg &ops ENDM noexec MACRO ops:vararg ENDM

SZPTR is defined in unravel.mac as either 4 or 8:

IFNDEF X86_64 DP EQU DD SZPTR EQU 4 ELSE DP EQU DQ SZPTR EQU 8 ENDIF

On Fri, Nov 11, 2016 at 8:39 AM, John Hankinson notifications@github.com wrote:

The error I’m getting under hjwasm32 appears to be coming from the exec macro,

For example:

ymult1ax.asm(1769) : Error A2014: invalid combination of opcode and operands

exec(1)[unravel.mac]: Macro called from

inorm(9)[ymult1ax.asm]: Macro called from

ymult1ax.asm(1769): Main line code

it’s triggered from zpnorm, inorm etc.. and it appears in all cases to be the line:

base2 vmovapd ymm2, YMM_BIGVAL

I’ve tried some combinations like:

YMM_BIGVAL REAL8 0.0, 0.0, 0.0, 0.0

SZPTR equ 4

.code

_start:

vmovapd ymm2,YMMWORD PTR [r11+48_SZPTR+576+16_SZPTR+24*8]

vmovapd ymm2, YMM_BIGVAL

And these all work under hjwasm32 and 64, so I can only assume it’s the base2 macro, what and where can I find that I had a look through the various mac files (ynormal, ybasic, etc) but couldn’t see it.

From: gwoltman [mailto:notifications@github.com] Sent: 10 November 2016 11:47 PM To: Terraspace/HJWasm HJWasm@noreply.github.com Cc: John Hankinson john@terraspace.co.uk; Comment < comment@noreply.github.com> Subject: Re: [Terraspace/HJWasm] Oodles of "Error A2014: invalid combination of opcode and operands" using 2.16 (#36)

Hi John,

Thanks for the quick turnaround. We're better, but not there yet. From that big zip file, try assembling ymult1ax.asm and you'll get several errors like this:

0001A6EB 2 vmovapd ymm2,YMMWORD PTR [r11+48_SZPTR+576+16_SZPTR+24*8]

Error A2014: invalid combination of opcode and operands

As you figured out, you can simply delete the .c files from the makefile - they are not of interest to you. The above file fails to compile using either the c.bat macro which generates 32-bit object files and c64.bat which generates 64-bit object files.

Regards, George

— You are receiving this because you commented. Reply to this email directly, view it on GitHub https://github.com/ Terraspace/HJWasm/issues/36#issuecomment-259841818 , or mute the thread < https://github.com/notifications/unsubscribe-auth/AQGQVHccy8- DOIrYKnQd3qyQft2NZiunks5q86zrgaJpZM4KuMqt> .

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/Terraspace/HJWasm/issues/36#issuecomment-259959128, or mute the thread https://github.com/notifications/unsubscribe-auth/AVPFM3BfAPo3Im0u0EINvjIbq79ewYIjks5q9HAtgaJpZM4KuMqt .

— You are receiving this because you commented. Reply to this email directly, view it on GitHub https://github.com/Terraspace/HJWasm/issues/36#issuecomment-259967568 , or mute the thread https://github.com/notifications/unsubscribe-auth/AQGQVOJV9qDNat8ygWnu_0BxisukbNRMks5q9HqfgaJpZM4KuMqt .

john-terraspace commented 7 years ago

Just to give you an update, very strangely when I compile HJWasm32 inside Visual studio and assemble your project it’s fine, no errors. The second I build it for release using a different compiler then we get the errors. So we’re getting closer.. it seems to be a C compiler setup issue rather than something in the actual code.

From: gwoltman [mailto:notifications@github.com] Sent: 11 November 2016 02:25 PM To: Terraspace/HJWasm HJWasm@noreply.github.com Cc: John Hankinson john@terraspace.co.uk; Comment comment@noreply.github.com Subject: Re: [Terraspace/HJWasm] Oodles of "Error A2014: invalid combination of opcode and operands" using 2.16 (#36)

Hi John,

YMM_BIGVAL is defined in extrn.mac as YMM_BIGVAL EQU YPTR [UNION_BASE+16_SZPTR+24_8] where UNION_BASE is UNION_BASE EQU AD_BASE+48*SZPTR+576 and AD_BASE is one of two possibilities: IFNDEF X86_64 AD_BASE EQU <rsp+push_amt> ELSE AD_BASE EQU ENDIF

base2 is an argument to inorm and zpnorm. The argument will be either "exec" or "noexec" which are defined in unravel.mac:

exec MACRO ops:vararg &ops ENDM noexec MACRO ops:vararg ENDM

SZPTR is defined in unravel.mac as either 4 or 8:

IFNDEF X86_64 DP EQU DD SZPTR EQU 4 ELSE DP EQU DQ SZPTR EQU 8 ENDIF

On Fri, Nov 11, 2016 at 8:39 AM, John Hankinson notifications@github.com wrote:

The error I’m getting under hjwasm32 appears to be coming from the exec macro,

For example:

ymult1ax.asm(1769) : Error A2014: invalid combination of opcode and operands

exec(1)[unravel.mac]: Macro called from

inorm(9)[ymult1ax.asm]: Macro called from

ymult1ax.asm(1769): Main line code

it’s triggered from zpnorm, inorm etc.. and it appears in all cases to be the line:

base2 vmovapd ymm2, YMM_BIGVAL

I’ve tried some combinations like:

YMM_BIGVAL REAL8 0.0, 0.0, 0.0, 0.0

SZPTR equ 4

.code

_start:

vmovapd ymm2,YMMWORD PTR [r11+48_SZPTR+576+16_SZPTR+24*8]

vmovapd ymm2, YMM_BIGVAL

And these all work under hjwasm32 and 64, so I can only assume it’s the base2 macro, what and where can I find that I had a look through the various mac files (ynormal, ybasic, etc) but couldn’t see it.

From: gwoltman [mailto:notifications@github.com] Sent: 10 November 2016 11:47 PM To: Terraspace/HJWasm HJWasm@noreply.github.com Cc: John Hankinson john@terraspace.co.uk; Comment < comment@noreply.github.com> Subject: Re: [Terraspace/HJWasm] Oodles of "Error A2014: invalid combination of opcode and operands" using 2.16 (#36)

Hi John,

Thanks for the quick turnaround. We're better, but not there yet. From that big zip file, try assembling ymult1ax.asm and you'll get several errors like this:

0001A6EB 2 vmovapd ymm2,YMMWORD PTR [r11+48_SZPTR+576+16_SZPTR+24*8]

Error A2014: invalid combination of opcode and operands

As you figured out, you can simply delete the .c files from the makefile - they are not of interest to you. The above file fails to compile using either the c.bat macro which generates 32-bit object files and c64.bat which generates 64-bit object files.

Regards, George

— You are receiving this because you commented. Reply to this email directly, view it on GitHub https://github.com/ Terraspace/HJWasm/issues/36#issuecomment-259841818 , or mute the thread < https://github.com/notifications/unsubscribe-auth/AQGQVHccy8- DOIrYKnQd3qyQft2NZiunks5q86zrgaJpZM4KuMqt> .

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/Terraspace/HJWasm/issues/36#issuecomment-259959128, or mute the thread https://github.com/notifications/unsubscribe-auth/AVPFM3BfAPo3Im0u0EINvjIbq79ewYIjks5q9HAtgaJpZM4KuMqt .

— You are receiving this because you commented. Reply to this email directly, view it on GitHub https://github.com/Terraspace/HJWasm/issues/36#issuecomment-259967568 , or mute the thread https://github.com/notifications/unsubscribe-auth/AQGQVOJV9qDNat8ygWnu_0BxisukbNRMks5q9HqfgaJpZM4KuMqt .

john-terraspace commented 7 years ago

Hi,

I believe I have fixed the compiler settings that were causing it when building hjwasm32.exe

I’ve updated both hjwasm32 and hjwasm64 packages and they’re on the site now dated 11th Nov.

Please test again!

Thanks

John

From: gwoltman [mailto:notifications@github.com] Sent: 11 November 2016 02:25 PM To: Terraspace/HJWasm HJWasm@noreply.github.com Cc: John Hankinson john@terraspace.co.uk; Comment comment@noreply.github.com Subject: Re: [Terraspace/HJWasm] Oodles of "Error A2014: invalid combination of opcode and operands" using 2.16 (#36)

Hi John,

YMM_BIGVAL is defined in extrn.mac as YMM_BIGVAL EQU YPTR [UNION_BASE+16_SZPTR+24_8] where UNION_BASE is UNION_BASE EQU AD_BASE+48*SZPTR+576 and AD_BASE is one of two possibilities: IFNDEF X86_64 AD_BASE EQU <rsp+push_amt> ELSE AD_BASE EQU ENDIF

base2 is an argument to inorm and zpnorm. The argument will be either "exec" or "noexec" which are defined in unravel.mac:

exec MACRO ops:vararg &ops ENDM noexec MACRO ops:vararg ENDM

SZPTR is defined in unravel.mac as either 4 or 8:

IFNDEF X86_64 DP EQU DD SZPTR EQU 4 ELSE DP EQU DQ SZPTR EQU 8 ENDIF

On Fri, Nov 11, 2016 at 8:39 AM, John Hankinson notifications@github.com wrote:

The error I’m getting under hjwasm32 appears to be coming from the exec macro,

For example:

ymult1ax.asm(1769) : Error A2014: invalid combination of opcode and operands

exec(1)[unravel.mac]: Macro called from

inorm(9)[ymult1ax.asm]: Macro called from

ymult1ax.asm(1769): Main line code

it’s triggered from zpnorm, inorm etc.. and it appears in all cases to be the line:

base2 vmovapd ymm2, YMM_BIGVAL

I’ve tried some combinations like:

YMM_BIGVAL REAL8 0.0, 0.0, 0.0, 0.0

SZPTR equ 4

.code

_start:

vmovapd ymm2,YMMWORD PTR [r11+48_SZPTR+576+16_SZPTR+24*8]

vmovapd ymm2, YMM_BIGVAL

And these all work under hjwasm32 and 64, so I can only assume it’s the base2 macro, what and where can I find that I had a look through the various mac files (ynormal, ybasic, etc) but couldn’t see it.

From: gwoltman [mailto:notifications@github.com] Sent: 10 November 2016 11:47 PM To: Terraspace/HJWasm HJWasm@noreply.github.com Cc: John Hankinson john@terraspace.co.uk; Comment < comment@noreply.github.com> Subject: Re: [Terraspace/HJWasm] Oodles of "Error A2014: invalid combination of opcode and operands" using 2.16 (#36)

Hi John,

Thanks for the quick turnaround. We're better, but not there yet. From that big zip file, try assembling ymult1ax.asm and you'll get several errors like this:

0001A6EB 2 vmovapd ymm2,YMMWORD PTR [r11+48_SZPTR+576+16_SZPTR+24*8]

Error A2014: invalid combination of opcode and operands

As you figured out, you can simply delete the .c files from the makefile - they are not of interest to you. The above file fails to compile using either the c.bat macro which generates 32-bit object files and c64.bat which generates 64-bit object files.

Regards, George

— You are receiving this because you commented. Reply to this email directly, view it on GitHub https://github.com/ Terraspace/HJWasm/issues/36#issuecomment-259841818 , or mute the thread < https://github.com/notifications/unsubscribe-auth/AQGQVHccy8- DOIrYKnQd3qyQft2NZiunks5q86zrgaJpZM4KuMqt> .

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/Terraspace/HJWasm/issues/36#issuecomment-259959128, or mute the thread https://github.com/notifications/unsubscribe-auth/AVPFM3BfAPo3Im0u0EINvjIbq79ewYIjks5q9HAtgaJpZM4KuMqt .

— You are receiving this because you commented. Reply to this email directly, view it on GitHub https://github.com/Terraspace/HJWasm/issues/36#issuecomment-259967568 , or mute the thread https://github.com/notifications/unsubscribe-auth/AQGQVOJV9qDNat8ygWnu_0BxisukbNRMks5q9HqfgaJpZM4KuMqt .

gwoltman commented 7 years ago

Everything assembled without error!!

Thanks again!