Skip to content

Commit

Permalink
Merge pull request #12392 from monstermunchkin/imports/loongarch64
Browse files Browse the repository at this point in the history
shared/osarch: Add loongarch64
  • Loading branch information
tomponline authored Oct 17, 2023
2 parents ed6e5c4 + cc559cf commit 5185258
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions shared/osarch/architectures.go
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@ const (
ARCH_64BIT_RISCV_LITTLE_ENDIAN = 12
ARCH_32BIT_ARMV6_LITTLE_ENDIAN = 13
ARCH_32BIT_ARMV8_LITTLE_ENDIAN = 14
ARCH_64BIT_LOONGARCH = 15
)

var architectureNames = map[int]string{
Expand All @@ -37,6 +38,7 @@ var architectureNames = map[int]string{
ARCH_64BIT_MIPS: "mips64",
ARCH_32BIT_RISCV_LITTLE_ENDIAN: "riscv32",
ARCH_64BIT_RISCV_LITTLE_ENDIAN: "riscv64",
ARCH_64BIT_LOONGARCH: "loongarch64",
}

var architectureAliases = map[int][]string{
Expand All @@ -53,6 +55,7 @@ var architectureAliases = map[int][]string{
ARCH_64BIT_MIPS: {"mips64el", "mips64le"},
ARCH_32BIT_RISCV_LITTLE_ENDIAN: {},
ARCH_64BIT_RISCV_LITTLE_ENDIAN: {},
ARCH_64BIT_LOONGARCH: {"loong64"},
}

var architecturePersonalities = map[int]string{
Expand All @@ -70,6 +73,7 @@ var architecturePersonalities = map[int]string{
ARCH_64BIT_MIPS: "linux64",
ARCH_32BIT_RISCV_LITTLE_ENDIAN: "linux32",
ARCH_64BIT_RISCV_LITTLE_ENDIAN: "linux64",
ARCH_64BIT_LOONGARCH: "linux64",
}

var architectureSupportedPersonalities = map[int][]int{
Expand All @@ -87,6 +91,7 @@ var architectureSupportedPersonalities = map[int][]int{
ARCH_64BIT_MIPS: {ARCH_32BIT_MIPS},
ARCH_32BIT_RISCV_LITTLE_ENDIAN: {},
ARCH_64BIT_RISCV_LITTLE_ENDIAN: {},
ARCH_64BIT_LOONGARCH: {},
}

const ArchitectureDefault = "x86_64"
Expand Down

0 comments on commit 5185258

Please sign in to comment.