# Ports LoongArch



## dbhrscom (Mar 13, 2022)

Hello！

*About LoongArch Brief introduction*

LoongArch is the RISC instruction set launched by loongson in 2021. The details are as follows:

LoongArch Reference Manual
​It works on the loongsong 3a5000 processor.

I have two computers with this processors，Prepare to do some basic ports on FreeBSD

So I want to consult

Have you considered or started porting loongarch to BSD system?

And what exactly I need to do.

Thanks!!!


----------



## oOiOo (Mar 13, 2022)

Hello,
To my knowledge, Loongsong architecture is based on MIPS. Unfortunately, even though MIPS is present in FreeBSD 13's source code , it's support has been removed on  2022/01/01 . Howether, NetBSD support Loongsong devices : http://wiki.netbsd.org/ports/evbmips/loongson/.
Regards


----------



## Lamia (Mar 13, 2022)

Like ARMv7 (Cortex A8) became unsupported from FBSD 12.2.


----------



## dbhrscom (Mar 13, 2022)

oOiOo said:


> Hello,
> To my knowledge, Loongsong architecture is based on MIPS. Unfortunately, even though MIPS is present in FreeBSD 13's source code , it's support has been removed on  2022/01/01 . Howether, NetBSD support Loongsong devices : http://wiki.netbsd.org/ports/evbmips/loongson/.
> Regards



In 2021, the 3a5000 processor released by Godson no longer uses the MIPS instruction set, but uses LoongArch, a new instruction set.


----------



## Crivens (Mar 13, 2022)

In that case we are talking about a complete new port. Step #1 would be llvm support. Is that done?


----------



## covacat (Mar 13, 2022)

> The ISA has been referred to as "a fork of MIPS64r6" due to a perceived lack of changes judging from instruction listings.[30][31] In August 2021, Linux maintainers complained that submitted LoongArch code is "...a blind copy of the MIPS code...", however "only with a different name".[32]


----------



## dbhrscom (Mar 14, 2022)

LoongArch is a RISC instruction set, which can be used for reference. However, when running Linux, LoongArch and MIPs are not compatible.


----------



## dbhrscom (Mar 14, 2022)

Crivens said:


> In that case we are talking about a complete new port. Step #1 would be llvm support. Is that done?


Please refer to


			https://github.com/llvm/llvm-project/commits?author=SixWeining
		









						GitHub - loongson/llvm-project: The LLVM Project is a collection of modular and reusable compiler and toolchain technologies. Note: the repository does not accept github pull requests at this moment. Please submit your patches at http://reviews.llvm.
					

The LLVM Project is a collection of modular and reusable compiler and toolchain technologies. Note: the repository does not accept github pull requests at this moment. Please submit your patches at...




					github.com


----------

