Skip to content

Commit

Permalink
Add LoongArch cpu support.
Browse files Browse the repository at this point in the history
  • Loading branch information
zangruochen committed May 30, 2023
1 parent 49435aa commit 3e961b6
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions src/c4/cpu.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -135,6 +135,16 @@
# define C4_BYTE_ORDER _C4EL
# define C4_WORDSIZE 4

#elif defined(__loongarch__)
# if defined(__loongarch64)
# define C4_CPU_LOONGARCH64
# define C4_WORDSIZE 8
# else
# define C4_CPU_LOONGARCH
# define C4_WORDSIZE 4
# endif
# define C4_BYTE_ORDER _C4EL

#elif defined(SWIG)
# error "please define CPU architecture macros when compiling with swig"

Expand Down

0 comments on commit 3e961b6

Please sign in to comment.