Skip to content

Commit

Permalink
Add loongarch64 support
Browse files Browse the repository at this point in the history
  • Loading branch information
zhaixiaojuan committed Apr 24, 2022
1 parent 40d529f commit faf158e
Show file tree
Hide file tree
Showing 7 changed files with 958 additions and 3 deletions.
1 change: 1 addition & 0 deletions ci/build.sh
Expand Up @@ -140,6 +140,7 @@ aarch64-fuchsia \
armv5te-unknown-linux-gnueabi \
armv5te-unknown-linux-musleabi \
i686-pc-windows-gnu \
loongarch64-unknown-linux-gnu \
riscv64gc-unknown-linux-gnu \
wasm32-wasi \
x86_64-fortanix-unknown-sgx \
Expand Down
6 changes: 4 additions & 2 deletions src/unix/linux_like/linux/align.rs
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
@@ -0,0 +1,7 @@
s_no_extra_traits! {
#[allow(missing_debug_implementations)]
#[repr(align(16))]
pub struct max_align_t {
priv_: [f64; 4]
}
}

0 comments on commit faf158e

Please sign in to comment.