Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add support for loongarch #6

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
17 changes: 17 additions & 0 deletions include/private/gcconfig.h
Original file line number Diff line number Diff line change
Expand Up @@ -483,6 +483,10 @@
# define RISCV
# define mach_type_known
# endif
# if defined(__loongarch__)
# define LOONGARCH
# define mach_type_known
# endif

/* Feel free to add more clauses here */

Expand Down Expand Up @@ -1336,6 +1340,19 @@
# endif
# endif /* RISCV */

# ifdef LOONGARCH
# define MACH_TYPE "LOONGARCH64"
# define CPP_WORDSZ __loongarch_grlen /* 32 or 64 */
# define ALIGNMENT (CPP_WORDSZ/8)
# ifdef LINUX
# define OS_TYPE "LINUX"
extern int __data_start[];
# define DATASTART ((ptr_t)__data_start)
# define LINUX_STACKBOTTOM
# define DYNAMIC_LOADING
# endif
# endif /* LOONGARCH */

# ifdef NS32K
# define MACH_TYPE "NS32K"
# define ALIGNMENT 4
Expand Down