Author Topic: UASM 2.49 Available  (Read 1377 times)

johnsa

  • Member
  • ****
  • Posts: 791
    • Uasm
UASM 2.49 Available
« on: June 22, 2019, 04:12:37 AM »
Source on Github, Packages on the site.  :thumbsup:

jj2007

  • Member
  • *****
  • Posts: 9804
  • Assembler is fun ;-)
    • MasmBasic
Re: UASM 2.49 Available
« Reply #1 on: June 22, 2019, 05:07:27 AM »
Tested OK with my major sources :thumbsup:

AW

  • Member
  • *****
  • Posts: 2442
  • Let's Make ASM Great Again!
Re: UASM 2.49 Available
« Reply #2 on: June 22, 2019, 05:33:16 AM »
You don't mention any fix for the USE directive errors.  :sad:

johnsa

  • Member
  • ****
  • Posts: 791
    • Uasm
Re: UASM 2.49 Available
« Reply #3 on: June 22, 2019, 09:24:32 AM »
I made a modification about the uninitialised data warning when applied to to option flat:1
Still considering other options, but I'd never really planned for using flat for anything other than plain bin.

AW

  • Member
  • *****
  • Posts: 2442
  • Let's Make ASM Great Again!
Re: UASM 2.49 Available
« Reply #4 on: June 22, 2019, 01:54:22 PM »
I made a modification about the uninitialised data warning when applied to to option flat:1
Still considering other options, but I'd never really planned for using flat for anything other than plain bin.
I know, it was pure serendipty  :thumbsup: . I was not expecting that as well.  :biggrin:

TimoVJL

  • Member
  • ***
  • Posts: 476
Re: UASM 2.49 Available
« Reply #5 on: June 22, 2019, 06:17:43 PM »
Quote
UASM is written in C. The source is portable and has successfully been tested with Open Watcom, MS VC, GCC and more.
Strange things in tokenize.c
like <<<<<<< HEAD and '\[' ...

msvc 2003 fails
clang fails
... fails

EDIT: examples:
Windows clang 9
Code: [Select]
..\UASM-master\codegenv2.c(1170,5): error: conflicting types for 'BuildMemoryEncoding'
int BuildMemoryEncoding(unsigned char* pmodRM, unsigned char* pSIB, unsigned char* pREX, bool* needModRM, bool* needSIB,
    ^
..\UASM-master\H/codegenv2.h(391,15): note: previous declaration is here
int           BuildMemoryEncoding(unsigned char* pmodRM, unsigned char* pSIB, unsigned char* pREX, bool* needRM, bool* needSIB,

...

..\UASM-master\codegenv2.c(1655,55): error: too many arguments to function call, expected 3, have 4
                        rexByte |= BuildREX(rexByte, matchedInstr, opExpr, FALSE);                                                                                      /* Modify the REX prefix for non-memory operands/sizing */
                                   ~~~~~~~~                                ^~~~~
...
..\UASM-master\invoke.c(2126,12): error: conflicting types for 'sysv_reg'
static int sysv_reg(struct dsym const* proc, unsigned int reg )
           ^
..\UASM-master\invoke.c(173,14): note: previous declaration is here
        static  int sysv_reg          ( unsigned int );
                    ^
..\UASM-master\invoke.c(2419,25): error: too many arguments to function call, expected 1, have 2
                        reg = sysv_reg(proc, reg);
                              ~~~~~~~~       ^~~

« Last Edit: June 23, 2019, 07:48:31 PM by TimoVJL »
May the source be with you

Biterider

  • Member
  • ***
  • Posts: 393
  • ObjAsm32 + ObjAsm64 = ObjAsm
    • ObjAsm
Re: UASM 2.49 Available
« Reply #6 on: June 22, 2019, 06:49:50 PM »
Hi johnsa
I was able to compile my sources without problems :thup:
Biterider

rsala

  • Member
  • ***
  • Posts: 296
    • Easy Code
Re: UASM 2.49 Available
« Reply #7 on: June 22, 2019, 09:06:49 PM »
Hi Johnsa,

Easy Code 64-bit compiles and works fine!  :thup:
EC coder

habran

  • Member
  • *****
  • Posts: 1210
    • uasm
Re: UASM 2.49 Available
« Reply #8 on: June 23, 2019, 05:23:47 AM »
Hi TimoVJL

you can remove '\' in those cases:  '\['  '\]' '\{' '\}'  "\{   and \}"
It will work than with your tools

It is only in tokenize.c

we will also remove it in the next release

there was reason why I was using that, b4 I found why was that needed, now it is not necessary any more

MSVC 2019 had no problem with it



Cod-Father

johnsa

  • Member
  • ****
  • Posts: 791
    • Uasm
Re: UASM 2.49 Available
« Reply #9 on: June 23, 2019, 07:15:58 PM »

I will be doing some more C compatibility fixes over time, as eventually I am aiming to get it compiling with VBCC. However in the meantime I have no problems compiling it on OSX and Linux using Clang and GCC.

TimoVJL

  • Member
  • ***
  • Posts: 476
Re: UASM 2.49 Available
« Reply #10 on: June 23, 2019, 08:00:01 PM »

I will be doing some more C compatibility fixes over time, as eventually I am aiming to get it compiling with VBCC.
vbcc ?
vbcc
Amiga-Dev

However in the meantime I have no problems compiling it on OSX and Linux using Clang and GCC.
Windows version of clang 8/9 fails too, but msvc/gcc/clang are just hybrid C/C++ compilers.
clang is a good reference compiler.

EDIT:
vbcc:
don't support anonymous unions in structs
needs linefeed end of included file
« Last Edit: June 23, 2019, 11:20:14 PM by TimoVJL »
May the source be with you

johnsa

  • Member
  • ****
  • Posts: 791
    • Uasm
Re: UASM 2.49 Available
« Reply #11 on: June 24, 2019, 12:21:26 AM »
Yes.. you might have guessed.. I'd like to be able to run Uasm on my Amiga :)

Once it runs there, I will be looking at building a new set of tokenizer/parser and codegen support for 68k but based on the full UASM code-base.
Devpac is a pretty decent assembler on Amiga, vasm even better with modern support. However they all pale in comparison to a modern x86 Assembly in terms of macros, HLL and features.
Especially interested in adding support for 080/AMMX for the Vampire range of next-gen Amiga accelerators.

AW

  • Member
  • *****
  • Posts: 2442
  • Let's Make ASM Great Again!
Re: UASM 2.49 Available
« Reply #12 on: June 25, 2019, 11:16:42 PM »
I think the movq bug is still there at least when building for 32-bit.
I have also noticed that in 32-bit, C-Style Calling does not appear to support assignment of return values (or may be I am missing something).
« Last Edit: June 26, 2019, 02:59:02 AM by AW »

habran

  • Member
  • *****
  • Posts: 1210
    • uasm
Re: UASM 2.49 Available
« Reply #13 on: June 26, 2019, 10:29:33 AM »
Hi AW,
this is what I get using uasm32 or uasm64
Code: [Select]
movq r11, xmm1
66 49 0F 7E CB       movq        r11,xmm1
give us some example code for this and for C-Style Calling
Cod-Father

AW

  • Member
  • *****
  • Posts: 2442
  • Let's Make ASM Great Again!
Re: UASM 2.49 Available
« Reply #14 on: June 26, 2019, 04:58:17 PM »
Hi Habran,

I attach the case for C-like in 32 bit, which comes out of this thread . For example, if you uncomment lines 69 or 77 it produces errors.
Now, I am not able to reproduce the movq bug, I will be back if I do.