News:

Masm32 SDK description, downloads and other helpful links
Message to All Guests

Main Menu

UASM 2.51

Started by johnsa, March 01, 2021, 01:14:16 AM

Previous topic - Next topic

nidud

#30
deleted

nidud

#31
deleted

KradMoonRa

#32
UASM 2.51.2

* regcall implementation for 64bits win/linux/mach, it follows the same principe off the base OS system convention. Now fixed the segfault using language convention with proto for linux/mac 64bits.
* regcall atempt implementation for 32bits win/linux. Now fixed the segfault using language convention with proto for all 32bits system's
* thiscal for 32 bits win.
* syscall linux kernel parameters, only the 6 arguments are implemented, the UASM user must be aware of the return address and system call number etc...
* Fix VPTESTMW VPTESTMM VPTESTNMW VPTESTMB.
* Fix dbgcv.c (_getcwd) to portable code.
* Fix dbgcv.c (_pgmptr) to portable code.
* Add getexec.c with code for get current executable directory path, heart of portable code for getExecutablePath().
* Striped macrolib to *.inc files, for better contribution without the need to recompile UASM, now executable low as 700kb win / 800kb linux.
* and added new macro lib utilities.
* Added Setup Project for windows, using the free version of Advanced Installer.
* Added ubuntu/debian package manager project.
* Small fix for elf64_relocations now using R_X86_64_GOTPCREL64 = 28, /* G + GOT - P + A */
* added option frame:none for linux/mac 64bits only and for manual procedure optimization.
* all code now is aligned for 64bits builds to 16 bytes, but the packed 1 byte code stays the same.
* Pull request Terraspace#138 define alloca only if not defined and not the proposed pointer casting changes it will break uasm.
* Pull request Terraspace#141 strlen() moved from the body for cycle.
* Pull request Terraspace#137 Allow overriding the SWITCHCHAR option by passing -DSWITCHCHAR=0/1 when building.
* Fix by @nidud dbgcv.c corrupted debug info.
* Updated debian package manager distribution for multiple build release and debug files.

Check setup installer for.

Windows Setup, add the necessary path environment variables, and MSBuild BuildCustomizations for VS2019.

Windows setup also installs uasmd debug version and also has 32 bits binaries.

windows:
Win Setup
or
Win binaries files

linux:
Linux 64 bits binaries

Linux installs to /usr/bin/uasm and inc files to /usr/include/uasm

ubuntu apt package manager:
Instructions:
add the sign key to your trusted keys
sudo apt-key adv --keyserver keyserver.ubuntu.com --recv-key 10649EA8D069C51D
or
curl -fsSL https://apt.navegos.net/pub.key | sudo apt-key add -
Source Links:
add package as sudo
sudo add-apt-repository "deb [arch=amd64] https://apt.navegos.net/ubuntu/uasm/ $(lsb_release -cs) main main/debug"
or
echo "deb [arch=amd64] https://apt.navegos.net/ubuntu/uasm/ focal main main/debug" | sudo tee /etc/apt/sources.list.d/uasm.list
clean, update and install
sudo apt-get update && sudo apt-get purge uasm && sudo apt-get install uasm uasmd

now you have both uasm release and debug versions, if you need debug symbols can be installed with sudo apt-get install uasmd-dbgsym

Source:
2.51.2.zip
2.51.2.tar.gz
The uasmlib

jj2007

Win7-64: fails for shlx eax, eax, edx: "illegal instruction"

Btw the msi installation takes ages...

KradMoonRa

Quote from: jj2007 on March 21, 2021, 10:56:31 AM
Win7-64: fails for shlx eax, eax, edx: "illegal instruction"

Btw the msi installation takes ages...

tested and shlx eax, eax, edx works in windows and linux assembling

try this:

linux way:

;.x64p
.sysv64
option casemap:none
option stackbase:rbp ;Default and the only possible for SYSV64
;option language:systemv ;Default we have regcall also
option frame:auto ;Default and now possible frame none, check below
option sysv64:7 ;The max possible for SYSV64
;option literals:on
;option vtable:on
;option framepreserveflags:on

.xmm
option arch:avx
option evex:1

include macrolib.inc

.code



windows way:

;.x64p
.win64
option casemap:none
option stackbase:rsp ;
;option language:vectorcall ; we have regcall also
option frame:auto ;Default
option win64:15 ;
;option literals:on
;option vtable:on
;option framepreserveflags:on

.xmm
option arch:avx
option evex:1

include macrolib.inc

.code


command line: change -Fo and .asm file for your needs.

linux enviroment
assemble linux object
uasm -c -Cp -archAVX -W0 -Gy -zf4 -mf -elf64 -pie -I /usr/include/uasm -Fo testlinux.o testlinux.asm

assemble windows object
uasm -c -Cp -archAVX -W0 -Gv -zf3 -mf -win64 -I /usr/include/uasm -Fo testwindows.obj testwindows.asm

windows enviroment
assemble linux object
command prompt
uasm -c -Cp -archAVX -W0 -Gy -zf4 -mf -elf64 -pie -I %UASM_INC_DIR% -Fo testlinux.o testlinux.asm
bash
uasm -c -Cp -archAVX -W0 -Gy -zf4 -mf -elf64 -pie -I $UASM_INC_DIR -Fo testlinux.o testlinux.asm

assemble windows object
command prompt
uasm -c -Cp -archAVX -W0 -Gv -zf3 -mf -win64 -I %UASM_INC_DIR% -Fo testwindows.obj testwindows.asm
bash
uasm -c -Cp -archAVX -W0 -Gv -zf3 -mf -win64 -I $UASM_INC_DIR -Fo testwindows.obj testwindows.asm


msi file do checks for current environments PATHS, yep slow with earlier version of windows

zip file also added above. Win binaries files
The uasmlib

jj2007

Quote from: KradMoonRa on March 21, 2021, 11:20:17 AMtested and shlx eax, eax, edx works in windows and linux assembling

Sorry, misunderstanding: not my code crashes, but yours: UAsm itself crashes because my very, very old Core i5 doesn't understand shlx :cool:

KradMoonRa

QuoteSorry, misunderstanding: not my code crashes, but yours: UAsm itself crashes because my very, very old Core i5 doesn't understand shlx :cool:

RIP i5  :rofl:
The uasmlib

jj2007

No problem, version v2.51 of Feb 27 works perfectly on my stone age hardware :tongue:
Intel(R) Core(TM) i5-2450M CPU @ 2.50GHz (MMX, SSE, SSE2, SSE3, SSSE3, SSE4.1, SSE4.2, AVX)

TimoVJL

Is this branch v2.51.2 in Git too ?

Windows 7:
UASM Assembler has stopped working
May the source be with you

KradMoonRa

Sorry guys, not everyone has AVX2, my mistake  :biggrin:

Rebuild defaults no AVX or higher.

windows:
Win Setup Uninstall and Install again.
or
Win binaries files Copy hover.

Source:
2.51.2.zip
2.51.2.tar.gz
The uasmlib

TimoVJL

Thanks, we will test it :thumbsup:

Speedtest
17.546s       uasm-2.51.2.exe
9.390s        uasm64.exe
5.335s        asmc.exe   2.30.35
May the source be with you

jj2007

Some glitches to resolve... attached example works fine with MASM 6.14 and others.

LiaoMi

Hi John,

I managed to identify a bug that was not present in the previous version 2.50. The bug occurs on large projects when there are too many include files. An error and an unexpected stop always occur in a different place. I have attached a test case, I can consistently repeat this error.



UASM v2.51, Feb 27 2021, Masm-compatible assembler.
Portions Copyright (c) 1992-2002 Sybase, Inc. All Rights Reserved.
Source code is available under the Sybase Open Watcom Public License.


***********
ASCII build
***********

C:\masm32\include\winspool.inc(597) : Fatal error A1105: Out of Memory
Microsoft (R) Incremental Linker Version 14.28.29337.0
Copyright (C) Microsoft Corporation.  All rights reserved.

LINK : fatal error LNK1181: cannot open input file 'Test_x86.obj'
Press any key to continue . . .

or
UASM v2.51, Feb 27 2021, Masm-compatible assembler.
Portions Copyright (c) 1992-2002 Sybase, Inc. All Rights Reserved.
Source code is available under the Sybase Open Watcom Public License.


***********
ASCII build
***********

C:\masm32\include\winspool.inc(574) : Fatal error A1105: Out of Memory
Microsoft (R) Incremental Linker Version 14.28.29337.0
Copyright (C) Microsoft Corporation.  All rights reserved.

LINK : fatal error LNK1181: cannot open input file 'Test_x86.obj'
Press any key to continue . . .



LiaoMi

Quote from: TimoVJL on March 21, 2021, 08:35:50 PM
Thanks, we will test it :thumbsup:

Speedtest
17.546s       uasm-2.51.2.exe
9.390s        uasm64.exe
5.335s        asmc.exe   2.30.35

Why is there a big difference in timing ?!  :dazzled:

LiaoMi

Quote from: KradMoonRa on March 21, 2021, 07:56:22 PM
Sorry guys, not everyone has AVX2, my mistake  :biggrin:

Rebuild defaults no AVX or higher.

windows:
Win Setup Uninstall and Install again.
or
Win binaries files Copy hover.

Source:
2.51.2.zip
2.51.2.tar.gz

Hi KradMoonRa,

could You please add a version for AVX2 to the releases folder? It can be separately marked as AVX2. What options are required in Visual Studio for AVX2, to compile with optimization?