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.56 is available

Started by johnsa, October 26, 2022, 07:21:22 AM

Previous topic - Next topic

johnsa

Hi all,

Packages are on the site, as always the latest code+tests are in Github, v2.56 branch.

jj2007

For 32-bit code, all is fine, tested with over 2MB of sources :thumbsup:

learn64bit

Now github also have binaries. Are  they the same? (both sites did not have sha1sum)

mabdelouahab


Biterider

Hi
Epic version number  :cool:
Tested here and all is fine.  :thumbsup:

Biterider

johnsa

the binaries on Github are the same release as the website packages.

Vortex


rsala

Hi John,

Thanks for your good work!  :thumbsup:
Easy Code compiles and works fine with this last version of UASM. :eusa_clap:
EC coder

lucho

Thank you for all your good work and for releasing version 2.56!

When I downloaded https://github.com/Terraspace/UASM/archive/refs/tags/v2.56.tar.gz , it turned out that all file dates are 16 March 2022 and _UASM_VERSION_STR_ and _UASM_VERSION_INT_ in H/globals.h are 2.53 and 253, respectively. I wondered why this is so, but changed them to 2.56 and 256 and managed to build macOS and FreeBSD versions using the patch below. But it turned out that the ELF ABI generated by the FreeBSD version is still GNU/Linux, as it was in the older versions. Didn't you pack version 2.53 instead of 2.56 in that archive by mistake?

--- H/globals.h- 2022-03-16 19:54:47.000000000 +0200
+++ H/globals.h 2022-10-27 13:37:01.000000000 +0300
@@ -202,11 +202,11 @@

/* Uasm version info */
#ifdef _WIN64
-#define _UASM_VERSION_STR_ "2.53"
+#define _UASM_VERSION_STR_ "2.56"
#else
-#define _UASM_VERSION_STR_ "2.53"
+#define _UASM_VERSION_STR_ "2.56"
#endif
-#define _UASM_VERSION_INT_ 253
+#define _UASM_VERSION_INT_ 256
#define _UASM_VERSION_SUFFIX_ "pre"
#define _UASM_VERSION_ _UASM_VERSION_STR_ //_UASM_VERSION_SUFFIX_

--- dbgcv.c- 2022-03-16 19:54:47.000000000 +0200
+++ dbgcv.c 2022-10-27 13:03:08.000000000 +0300
@@ -17,7 +17,14 @@
#include <fixup.h>
#include <dbgcv.h>
#include <linnum.h>
-#include <direct.h>
+#ifdef _WIN32
+ #include <direct.h>
+#else
+ #include <unistd.h>
+ #define _MAX_PATH 256
+ #define _getcwd getcwd
+ #define _pgmptr "uasm"
+#endif
#include <picohash.h>

#define SIZE_CV_SEGBUF ( MAX_LINE_LEN * 4 )
@@ -1575,12 +1582,12 @@
len = strlen(p) + 1;
s = strcpy(s, p) + len;
*s++ = '\0';
- EnvBlock->reclen = (unsigned short)(s - cv.ps - 2);
+ EnvBlock->reclen = (unsigned short)(s - (char *)cv.ps - 2);
cv.ps = s;

/* length needs to be added for each symbol */

- cv.section->length += (s - start);
+ cv.section->length += (s - (char *)start);

}
else {
--- gccLinux64.mak- 2022-03-16 19:54:47.000000000 +0200
+++ gccLinux64.mak 2022-10-27 13:32:05.000000000 +0300
@@ -1,5 +1,5 @@

-# This makefile creates the UASM Elf binary for Linux/FreeBSD.
+# This makefile creates the UASM binary for Linux/FreeBSD/macOS.

TARGET1=uasm

@@ -19,7 +19,13 @@
OUTD=GccUnixD
endif

-c_flags =-D __UNIX__ $(extra_c_flags)
+c_flags =-D __UNIX__ $(extra_c_flags) -fcommon
+
+ifeq ($(MAKE_VERSION), 3.81) # macOS
+ MAPFLAG=-map
+else
+ MAPFLAG=-Map
+endif

CC = gcc

@@ -40,9 +46,9 @@

$(OUTD)/$(TARGET1) : $(OUTD)/main.o $(proj_obj)
ifeq ($(DEBUG),0)
- $(CC) -D __UNIX__ $(CFLAGS) $(OUTD)/main.o $(proj_obj) -s -o $@ -Wl,-Map,$(OUTD)/$(TARGET1).map $(LDFLAGS)
+ $(CC) -D __UNIX__ $(CFLAGS) $(OUTD)/main.o $(proj_obj) -s -o $@ -Wl,$(MAPFLAG),$(OUTD)/$(TARGET1).map $(LDFLAGS)
else
- $(CC) -D __UNIX__ $(CFLAGS) $(OUTD)/main.o $(proj_obj) -o $@ -Wl,-Map,$(OUTD)/$(TARGET1).map $(LDFLAGS)
+ $(CC) -D __UNIX__ $(CFLAGS) $(OUTD)/main.o $(proj_obj) -o $@ -Wl,$(MAPFLAG),$(OUTD)/$(TARGET1).map $(LDFLAGS)
endif

$(OUTD)/msgtext.o: msgtext.c H/msgdef.h
@@ -54,6 +60,6 @@
######

clean:
- rm $(OUTD)/$(TARGET1)
- rm $(OUTD)/*.o
- rm $(OUTD)/*.map
+ rm -f $(OUTD)/$(TARGET1)
+ rm -f $(OUTD)/*.o
+ rm -f $(OUTD)/*.map

johnsa

Nope, I have no idea wtf Github is doing. I created the 2.56 release and attached the binary packages for 2.56, it then somehow went ahead and made it's own tag which seems to be pointing at the wrong version :( Will trying and sort it out, if needs be, just download the archive directly from the v2.56 branch.

johnsa

The tags/releases on Github should be correct now.
I've also updated all the packages, repo code+releases to solve a bug that JJ discovered (spotting award to him!).
Latest releases dated today 27th Oct.

Regards,
John

lucho

#11
Ah, this time it's OK! Thank you very much! Then here's what has left from my patch:

--- gccLinux64.mak-     2022-10-27 20:25:27.000000000 +0300
+++ gccLinux64.mak      2022-10-28 09:27:33.664379007 +0300
@@ -1,5 +1,5 @@

-# This makefile creates the UASM Elf binary for Linux/FreeBSD.
+# This makefile creates the UASM binary for Linux/FreeBSD/macOS/Solaris.

TARGET1=uasm

@@ -19,8 +19,16 @@
OUTD=GccUnixD
endif

-c_flags =-D __UNIX__ $(extra_c_flags)
+c_flags =-D __UNIX__ $(extra_c_flags) -fcommon

+ifeq ($(MAKE_VERSION), 3.81)   # macOS
+ MAPFLAG=-map,
+else ifeq ($(MAKE_HOST), x86_64-pc-solaris2.11)
+ MAPFLAG=-m>
+else
+ MAPFLAG=-Map,
+endif
+
#From CLANG 11+, default has changed from allowing global variables to be defined in the headers (-fcommon) to not allowing it (-fno-common)."   USE: make CC="clang -fcommon" -f gccLinux64.mak
CC = gcc

@@ -41,9 +49,9 @@

$(OUTD)/$(TARGET1) : $(OUTD)/main.o $(proj_obj)
ifeq ($(DEBUG),0)
-       $(CC) -D __UNIX__ $(CFLAGS) $(OUTD)/main.o $(proj_obj) -s -o $@ -Wl,-Map,$(OUTD)/$(TARGET1).map $(LDFLAGS)
+       $(CC) -D __UNIX__ $(CFLAGS) $(OUTD)/main.o $(proj_obj) -s -o $@ -Wl,$(MAPFLAG)$(OUTD)/$(TARGET1).map $(LDFLAGS)
else
-       $(CC) -D __UNIX__ $(CFLAGS) $(OUTD)/main.o $(proj_obj) -o $@ -Wl,-Map,$(OUTD)/$(TARGET1).map $(LDFLAGS)
+       $(CC) -D __UNIX__ $(CFLAGS) $(OUTD)/main.o $(proj_obj) -o $@ -Wl,$(MAPFLAG)$(OUTD)/$(TARGET1).map $(LDFLAGS)
endif

$(OUTD)/msgtext.o: msgtext.c H/msgdef.h
@@ -55,6 +63,6 @@
######

clean:
-       rm $(OUTD)/$(TARGET1)
-       rm $(OUTD)/*.o
-       rm $(OUTD)/*.map
+       rm -f $(OUTD)/$(TARGET1)
+       rm -f $(OUTD)/*.o
+       rm -f $(OUTD)/*.map


If needed, I could upload here (as a ZIP attachment) the FreeBSD, macOS and Solaris binaries built using GCC after applying this patch. (For macOS, GCC is available after installing "gfortran", which can be found at https://github.com/fxcoudert/gfortran-for-macOS/releases .) Let me know if that would be helpful...

johnsa

That would be great, I can add them to the site (I no longer have access to build MacOS versions, and I sort of lost interest when I learnt of their plans to move to ARM.. blegh)

daydreamer

my none asm creations
https://masm32.com/board/index.php?topic=6937.msg74303#msg74303
I am an Invoker
"An Invoker is a mage who specializes in the manipulation of raw and elemental energies."
Like SIMD coding

lucho

Quote from: johnsa on October 28, 2022, 06:45:52 AM
That would be great, I can add them to the site (I no longer have access to build MacOS versions, and I sort of lost interest when I learnt of their plans to move to ARM.. blegh)
OK, see the attached ZIP files in my next messages. (For Solaris, I had to modify the makefile again, so I updated the patch in my previous message today.)

As far as I know, Mac Pros still have an x86-64 CPUs, including the Mac Pro Server. As long as this is true, Hackintoshes will still be created...  :biggrin:
BTW, it'd be interesting to port UASM to generate ARM and/or ARM64 code, but that would be a so big effort that hardly anybody would ever make it.