flat assembler
Message board for the users of flat assembler.

Index > Non-x86 architectures > [fasmg] RISC-V support? Worth to port fasmg to RISC-V?

Author
Thread Post new topic Reply to topic
sylware



Joined: 23 Oct 2020
Posts: 80
Location: Marseille/France
sylware
It seems RISC-V is gaining serious momentum.
RISC-V cross-assembly includes for fasmg?
Is fasmg, in its current state, worth a RISC-V (64bits) port?
Post 29 Jul 2021, 16:25
View user's profile Send private message Reply with quote
revolution
When all else fails, read the source


Joined: 24 Aug 2004
Posts: 18220
Location: In your JS exploiting you and your system
revolution
fasmg runs on x86 CPUs. Are you suggesting that the core code should be rewritten to run natively on RISC-V CPUs?

If you just want to compile code for other CPUs then you can make a macro set to do that without needing to alter fasmg in any way. The only catch is that you still need an x86 system to run fasmg. Or perhaps the RISC-V systems have an x86 emulator?
Post 29 Jul 2021, 16:31
View user's profile Send private message Visit poster's website Reply with quote
sylware



Joined: 23 Oct 2020
Posts: 80
Location: Marseille/France
sylware
you read well: a risc-v assembly implementation of fasmg macro language. It means the macro language would be rigorously defined in order to allow implementation in other assembly languages.
Post 29 Jul 2021, 22:34
View user's profile Send private message Reply with quote
revolution
When all else fails, read the source


Joined: 24 Aug 2004
Posts: 18220
Location: In your JS exploiting you and your system
revolution
Are you starting a project to rewrite fasmg?
Post 29 Jul 2021, 23:04
View user's profile Send private message Visit poster's website Reply with quote
sylware



Joined: 23 Oct 2020
Posts: 80
Location: Marseille/France
sylware
That would not be a rewrite, more likely a "port" of fasmg macro language.
But, as I said, the macro language "specs" would have to be extremely rigorously defined and relatively stable (it is already assembly friendly by definition, this is why fasmg is "special").
I am personally working on other projects already and don't have brain and energy time for this unfortunately (like when I wanted to add x86_64 ELF64 TLS support to fasmg... and realize how nasty TLS is... and actually dropping it).

This thread is more to bring attention to this matter than anything else.

But once we can buy risc-v mini computers at affordable prices on amazon (which works with noscript/basic (x)html browsers), things may "explode".
Post 31 Jul 2021, 11:52
View user's profile Send private message Reply with quote
bitRAKE



Joined: 21 Jul 2003
Posts: 3307
Location: vpcmipstrm
bitRAKE
RISCV support is already in UEFI. I haven't really looked at the ISA, tbh. But I remember hearing that it was very modular and the spec is defined in a computer readable form. What would be awesome is a tool that translates the spec into fasmg macros - to capture future extensions or specializations.
Post 31 Jul 2021, 16:17
View user's profile Send private message Visit poster's website Reply with quote
sylware



Joined: 23 Oct 2020
Posts: 80
Location: Marseille/France
sylware
until this tool is written itself in assembly, it should be fine but... there is not enough variance in time of risc-v specs to justify such a generator. Actually, most, if not all, similar generators (even in other projects) end up kludging SDKs more than anything else.
Post 01 Aug 2021, 13:54
View user's profile Send private message Reply with quote
bitRAKE



Joined: 21 Jul 2003
Posts: 3307
Location: vpcmipstrm
bitRAKE
Yeah, I can see your point. I was just hoping RISCV might be different - I know they were debugging simulations before there was hardware and I imagined such a system might really be exact. Might be totally wrong though - maybe it was a patchwork of Band-Aids and bubblegum. Maybe that research isn't public? Such a system might be able to get 80-90% of the way and then require auditing.
Post 02 Aug 2021, 03:43
View user's profile Send private message Visit poster's website Reply with quote
Display posts from previous:
Post new topic Reply to topic

Jump to:  


< Last Thread | Next Thread >
Forum Rules:
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You cannot attach files in this forum
You can download files in this forum


Copyright © 1999-2020, Tomasz Grysztar. Also on GitHub, YouTube, Twitter.

Website powered by rwasa.