RodrigoDornelles / 3bc-lang

Low-level language, tiny virtual machine, minimal runtime, intermediate representation, embeddable, easy for beginners. (Friendly Punched cards)
https://3bc-lang.org
GNU General Public License v3.0
232 stars 25 forks source link

add support to sparc architeture? #365

Open RodrigoDornelles opened 1 year ago

RodrigoDornelles commented 1 year ago

Please Describe The Problem To Be Solved

An important architecture to implement, used by banks, mainframes and supercomputers.

Suggest A Solution

dropping dependencies from the <stdio.h> library will help keep the language cleaner and help support sparc and other architectures. #296

compilation attempt

$ zig cc programs/interpreter.c -lm --target=sparc-linux-gnu

output errors

In file included from programs/interpreter.c:1:
In file included from programs/../src/3bc.h:68:
In file included from /home/rodrigo/rodrigo/zig-linux-x86_64-0.9.1/lib/libc/include/generic-glibc/stdio.h:893:
/home/rodrigo/rodrigo/zig-linux-x86_64-0.9.1/lib/libc/include/generic-glibc/bits/stdio-ldbl.h:26:20: error: cannot apply asm label to function after its first use
__LDBL_REDIR_DECL (vfprintf)
~~~~~~~~~~~~~~~~~~~^~~~~~~~~
/home/rodrigo/rodrigo/zig-linux-x86_64-0.9.1/lib/libc/include/generic-glibc/sys/cdefs.h:547:26: note: expanded from macro '__LDBL_REDIR_DECL'
  extern __typeof (name) name __asm (__ASMNAME ("__nldbl_" #name));
                         ^           ~~~~~~~~~~~~~~~~~~~~~~~~~~~~
In file included from programs/interpreter.c:1:
kassane commented 11 months ago