News:

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

Main Menu

UASM 2.35 Relase

Started by johnsa, June 03, 2017, 03:31:49 AM

Previous topic - Next topic

jj2007

Quote from: aw27 on June 03, 2017, 02:32:15 PM
It is not right to complain, movups = Move Unaligned Packed Single-Precision Floating-Point Values
It expects 4 floating point values.  :P

Right :t

Intel and AMD are to blame here, as they created a lot of confusion with the equivalent movups, movdqu, lddqu etc instructions. Like many other people, I use movups to load integers, e.g. GUIDs, or FILETIMEs with movlps. Timings are identical, size is shorter 8)

Quote from: johnsa on June 03, 2017, 05:17:12 PMOWORD = 16byte, so that would be declaring (effectively) an array of 4 16byte(OWORD) values, for which a single float initializer isn't going to make any sense hence it just producing zero.
ML and UASM will both allow you to declare this, but the result is garbage in both cases.

I take the point of 16byte float initialiser not making sense, but it should trigger at least a warning then.

johnsa

Ok, right something for you all to try out:

www.terraspace.co.uk/uasm.zip (Windows UASM32, UASM64 2.36pre)

Size based checking for SIMD is in and I had another idea which i've put in too, automatic checking of alignment.

If you use movaps, movapd, movdqa, vmovaps, vmovapd, vmovdqa in conjunction with a variable, it will automatically warn you if the variable is not aligned to 16/32 as per the type of register you are using it with.
IE:



.data

dummy db 1
;.align 16
myVariable dd 1.0, 2.0, 3.0, 4.0

.code

movaps xmm0,myVariable     ;emit warning about alignment



The checking with regard to size now doesn't care if you use byte,word,dword,real as long as the total size of the symbol is compatible it will allow it. Un-typed memory references will work as before.

Regards,
John

jj2007

Quote from: johnsa on June 05, 2017, 09:51:48 PM
Ok, right something for you all to try out:

www.terraspace.co.uk/uasm.zip (Windows UASM32, UASM64 2.36pre

OK for my usual tests :t

aw27

Quote from: johnsa on June 05, 2017, 09:51:48 PM
Size based checking for SIMD is in and I had another idea which i've put in too, automatic checking of alignment.
dummy db 1
;.align 16
myVariable dd 1.0, 2.0, 3.0, 4.0
movaps xmm0,myVariable     ;emit warning about alignment

I can't test today, I just wonder what will be the outcome of:
dummy db 1
.align 16
myVariable1 dd 1.0, 2.0, 3.0, 4.0
myVariable2 dd 1.0, 2.0, 3.0, 4.0
movaps xmm0,myVariable2


johnsa

Update at same url: http://www.terraspace.co.uk/uasm.zip

The outcome of that would be fine, if myVariable1 is aligned 16, and is 16 bytes myVariable2 will be aligned too. The warning for alignment is derived from the symbols calculated offset (assuming the start of the section is aligned). I'm not checking locals for alignment only items declared in .const/.data and .data? (any global).

The size checking is applied to both globals and locals instead of relying on the type.