Skip to content

Commit 5c03b9c

Browse files
committed
Auto merge of #2417 - devnexen:user_regs_struct_arm64, r=JohnTitor
linux/android aarch64 add user_regs_struct and user_fpsimd_struct
2 parents 40cfd1b + d55d6c6 commit 5c03b9c

File tree

6 files changed

+45
-0
lines changed

6 files changed

+45
-0
lines changed

libc-test/build.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1518,6 +1518,7 @@ fn test_android(target: &str) {
15181518
"sys/ucontext.h",
15191519
"sys/uio.h",
15201520
"sys/un.h",
1521+
"sys/user.h",
15211522
"sys/utsname.h",
15221523
"sys/vfs.h",
15231524
"sys/xattr.h",

libc-test/semver/android-aarch64.txt

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,3 +11,5 @@ SYS_arch_specific_syscall
1111
SYS_syscalls
1212
SYS_fcntl
1313
__system_property_wait
14+
user_fpsimd_struct
15+
user_regs_struct

libc-test/semver/linux-aarch64.txt

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -37,3 +37,5 @@ ip_mreqn
3737
max_align_t
3838
mcontext_t
3939
ucontext_t
40+
user_fpsimd_struct
41+
user_regs_struct

src/unix/linux_like/android/b64/aarch64/mod.rs

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -48,6 +48,20 @@ s! {
4848
__unused4: ::c_uint,
4949
__unused5: ::c_uint,
5050
}
51+
52+
pub struct user_regs_struct {
53+
pub regs: [u64; 31],
54+
pub sp: u64,
55+
pub pc: u64,
56+
pub pstate: u64,
57+
}
58+
59+
pub struct user_fpsimd_struct {
60+
pub vregs: [[i128; 16]; 2],
61+
pub fpsr: u32,
62+
pub fpcr: u32,
63+
}
64+
5165
}
5266

5367
pub const O_DIRECT: ::c_int = 0x10000;

src/unix/linux_like/linux/gnu/b64/aarch64/mod.rs

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -142,6 +142,19 @@ s! {
142142
__size: [usize; 8]
143143
}
144144

145+
pub struct user_regs_struct {
146+
pub regs: [::c_ulonglong; 31],
147+
pub sp: ::c_ulonglong,
148+
pub pc: ::c_ulonglong,
149+
pub pstate: ::c_ulonglong,
150+
}
151+
152+
pub struct user_fpsimd_struct {
153+
pub vregs: [[i64; 2]; 16],
154+
pub fpsr: ::c_uint,
155+
pub fpcr: ::c_uint,
156+
}
157+
145158
pub struct ipc_perm {
146159
pub __key: ::key_t,
147160
pub uid: ::uid_t,

src/unix/linux_like/linux/musl/b64/aarch64/mod.rs

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -49,6 +49,19 @@ s! {
4949
__unused: [::c_uint; 2],
5050
}
5151

52+
pub struct user_regs_struct {
53+
pub regs: [::c_ulonglong; 31],
54+
pub sp: ::c_ulonglong,
55+
pub pc: ::c_ulonglong,
56+
pub pstate: ::c_ulonglong,
57+
}
58+
59+
pub struct user_fpsimd_struct {
60+
pub vregs: [[i64; 2]; 16],
61+
pub fpsr: ::c_uint,
62+
pub fpcr: ::c_uint,
63+
}
64+
5265
pub struct ipc_perm {
5366
pub __ipc_perm_key: ::key_t,
5467
pub uid: ::uid_t,

0 commit comments

Comments
 (0)