Skip to content

Commit

Permalink
Auto merge of #2765 - zhaixiaojuan:master, r=Amanieu
Browse files Browse the repository at this point in the history
Add loongarch64 support

The LoongArch architecture (LoongArch) is an Instruction Set
Architecture (ISA) that has a Reduced Instruction Set Computer (RISC)
style.
The documents are on:
https://loongson.github.io/LoongArch-Documentation/README-EN.html
https://loongson.github.io/LoongArch-Documentation/LoongArch-ELF-ABI-EN.html
  • Loading branch information
bors committed Apr 28, 2022
2 parents d31cbb1 + 467c34c commit d747e7d
Show file tree
Hide file tree
Showing 6 changed files with 901 additions and 3 deletions.
6 changes: 4 additions & 2 deletions src/unix/linux_like/linux/align.rs
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,8 @@ macro_rules! expand_align {
target_arch = "sparc64",
target_arch = "aarch64",
target_arch = "riscv64",
target_arch = "riscv32"),
target_arch = "riscv32",
target_arch = "loongarch64"),
repr(align(4)))]
#[cfg_attr(not(any(target_pointer_width = "32",
target_arch = "x86_64",
Expand All @@ -19,7 +20,8 @@ macro_rules! expand_align {
target_arch = "sparc64",
target_arch = "aarch64",
target_arch = "riscv64",
target_arch = "riscv32")),
target_arch = "riscv32",
target_arch = "loongarch64")),
repr(align(8)))]
pub struct pthread_mutexattr_t {
#[doc(hidden)]
Expand Down
7 changes: 7 additions & 0 deletions src/unix/linux_like/linux/gnu/b64/loongarch64/align.rs
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
s_no_extra_traits! {
#[allow(missing_debug_implementations)]
#[repr(align(16))]
pub struct max_align_t {
priv_: [f64; 4]
}
}
Loading

0 comments on commit d747e7d

Please sign in to comment.