The MASM Forum

64 bit assembler => UASM Assembler Development => Topic started by: aw27 on July 31, 2017, 09:43:11 PM

Title: VUCOMISS is AVX
Post by: aw27 on July 31, 2017, 09:43:11 PM

1) Why are you using Avx instructions in your real number comparisons without the user setting Avx in Options:

.if(xmm0 < FP4(1.5))
.endif

;vucomiss xmm0,dword ptr [extdef64+0x3000 (00000001`3f9b3000)]

2) Why it does not work in 32-bit mode?

.if(xmm0 < FP4(1.5))
.endif

; Error A2272: real or BCD number not allowed
Title: Re: VUCOMISS is AVX
Post by: johnsa on August 01, 2017, 12:07:36 AM
OPTION ARCH:AVX is the default, if you want UCOMISS then set OPTION ARCH:SSE

I'll have a look now at the 32bit version.
Title: Re: VUCOMISS is AVX
Post by: aw27 on August 01, 2017, 01:08:40 AM
Quote from: johnsa on August 01, 2017, 12:07:36 AM
OPTION ARCH:AVX is the default, if you want UCOMISS then set OPTION ARCH:SSE

I'll have a look now at the 32bit version.
All right, I always thought the default should be SSE but I can handle that.
Title: Re: VUCOMISS is AVX
Post by: habran on August 01, 2017, 08:21:49 AM
Thanks aw27 :t
Another good find ;)
32bit macros were not initialising because CPU is dumb and can not follow our line of thoughts, no imagination that poor thing :icon_rolleyes:
Johnsa will upload fixed version as soon as he wakes up :biggrin:
Title: Re: VUCOMISS is AVX
Post by: johnsa on August 01, 2017, 06:44:37 PM
Fixed and packages/repository updated.

There was a bug in the 32bit MEMALLOC macro which is fixed as well as the wrong macrolib init running as Habran mentioned which was causing FP4 to not be evaluated inside the .if ( ) expansion in 32bit.