-
Notifications
You must be signed in to change notification settings - Fork 1k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Fix loongarch64 bindings #3246
Merged
Merged
Fix loongarch64 bindings #3246
Changes from all commits
Commits
Show all changes
2 commits
Select commit
Hold shift + click to select a range
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
PTRACE_GETFPREGS | ||
PTRACE_SETFPREGS | ||
PTRACE_GETFPXREGS | ||
PTRACE_SETFPXREGS | ||
PTRACE_GETREGS | ||
PTRACE_SETREGS |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,136 @@ | ||
B2500000 | ||
B3000000 | ||
B3500000 | ||
B4000000 | ||
BPF_ABS | ||
BPF_ADD | ||
BPF_ALU | ||
BPF_B | ||
BPF_DIV | ||
BPF_H | ||
BPF_IMM | ||
BPF_IND | ||
BPF_JA | ||
BPF_JEQ | ||
BPF_JGE | ||
BPF_JGT | ||
BPF_JMP | ||
BPF_JUMP | ||
BPF_K | ||
BPF_LD | ||
BPF_LDX | ||
BPF_LEN | ||
BPF_LL_OFF | ||
BPF_MEM | ||
BPF_MISC | ||
BPF_MISCOP | ||
BPF_MOD | ||
BPF_MSH | ||
BPF_NEG | ||
BPF_NET_OFF | ||
BPF_RET | ||
BPF_RVAL | ||
BPF_ST | ||
BPF_STMT | ||
BPF_STX | ||
BPF_SUB | ||
BPF_W | ||
BPF_X | ||
BPF_XOR | ||
CIBAUD | ||
FICLONE | ||
FICLONERANGE | ||
flock64 | ||
KEYCTL_CAPABILITIES | ||
KEYCTL_CAPS0_BIG_KEY | ||
KEYCTL_CAPS0_CAPABILITIES | ||
KEYCTL_CAPS0_DIFFIE_HELLMAN | ||
KEYCTL_CAPS0_INVALIDATE | ||
KEYCTL_CAPS0_MOVE | ||
KEYCTL_CAPS0_PERSISTENT_KEYRINGS | ||
KEYCTL_CAPS0_PUBLIC_KEY | ||
KEYCTL_CAPS0_RESTRICT_KEYRING | ||
KEYCTL_CAPS1_NS_KEYRING_NAME | ||
KEYCTL_CAPS1_NS_KEY_TAG | ||
KEYCTL_MOVE | ||
MADV_SOFT_OFFLINE | ||
MAP_SYNC | ||
NFT_MSG_DELOBJ | ||
NFT_MSG_GETOBJ | ||
NFT_MSG_GETOBJ_RESET | ||
NFT_MSG_NEWOBJ | ||
PTRACE_SYSEMU | ||
PTRACE_SYSEMU_SINGLESTEP | ||
SCM_TIMESTAMPNS | ||
SCM_WIFI_STATUS | ||
SIGSTKFLT | ||
SIGUNUSED | ||
SKF_AD_ALU_XOR_X | ||
SKF_AD_CPU | ||
SKF_AD_HATYPE | ||
SKF_AD_MARK | ||
SKF_AD_MAX | ||
SKF_AD_NLATTR | ||
SKF_AD_NLATTR_NEST | ||
SKF_AD_OFF | ||
SKF_AD_PAY_OFFSET | ||
SKF_AD_PKTTYPE | ||
SKF_AD_PROTOCOL | ||
SKF_AD_QUEUE | ||
SKF_AD_RANDOM | ||
SKF_AD_RXHASH | ||
SKF_AD_VLAN_TAG | ||
SKF_AD_VLAN_TAG_PRESENT | ||
SKF_AD_VLAN_TPID | ||
SKF_LL_OFF | ||
SKF_NET_OFF | ||
SO_ATTACH_BPF | ||
SO_ATTACH_FILTER | ||
SO_BPF_EXTENSIONS | ||
SO_BSDCOMPAT | ||
SO_DETACH_BPF | ||
SO_DETACH_FILTER | ||
SO_GET_FILTER | ||
SO_INCOMING_CPU | ||
SO_LOCK_FILTER | ||
SO_MAX_PACING_RATE | ||
SO_NO_CHECK | ||
SO_NOFCS | ||
SO_PEERNAME | ||
SO_PRIORITY | ||
SO_PROTOCOL | ||
SO_SECURITY_AUTHENTICATION | ||
SO_SECURITY_ENCRYPTION_NETWORK | ||
SO_SECURITY_ENCRYPTION_TRANSPORT | ||
SO_SELECT_ERR_QUEUE | ||
SO_TIMESTAMPNS | ||
SO_WIFI_STATUS | ||
SYS_accept | ||
SYS_msgctl | ||
SYS_msgget | ||
SYS_msgrcv | ||
SYS_msgsnd | ||
SYS_pkey_alloc | ||
SYS_pkey_free | ||
SYS_pkey_mprotect | ||
SYS_semctl | ||
SYS_semget | ||
SYS_semop | ||
SYS_semtimedop | ||
SYS_sendfile | ||
SYS_shmat | ||
SYS_shmctl | ||
SYS_shmdt | ||
SYS_shmget | ||
SYS_sync_file_range | ||
termios2 | ||
TIOCCBRK | ||
TIOCGRS485 | ||
TIOCSBRK | ||
TIOCSRS485 | ||
XCASE | ||
max_align_t | ||
mcontext_t | ||
ucontext_t | ||
user_regs_struct | ||
user_fp_struct |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -189,6 +189,21 @@ s! { | |
__unused4: ::c_ulong, | ||
__unused5: ::c_ulong | ||
} | ||
|
||
pub struct user_regs_struct { | ||
pub regs: [u64; 32], | ||
pub orig_a0: u64, | ||
pub csr_era: u64, | ||
pub csr_badv: u64, | ||
pub reserved: [u64; 10], | ||
|
||
} | ||
|
||
pub struct user_fp_struct { | ||
pub fpr: [u64; 32], | ||
pub fcc: u64, | ||
pub fcsr: u32, | ||
} | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. struct user_regs_struct
{
/* Saved main processor registers. */
uint64_t regs[32];
/* Saved special registers. */
uint64_t orig_a0;
uint64_t csr_era;
uint64_t csr_badv;
uint64_t reserved[10];
};
struct user_fp_struct {
uint64_t fpr[32];
uint64_t fcc;
uint32_t fcsr;
}; |
||
} | ||
|
||
pub const __SIZEOF_PTHREAD_CONDATTR_T: usize = 4; | ||
|
@@ -549,7 +564,7 @@ pub const SYS_landlock_add_rule: ::c_long = 445; | |
pub const SYS_landlock_restrict_self: ::c_long = 446; | ||
pub const SYS_process_mrelease: ::c_long = 448; | ||
pub const SYS_futex_waitv: ::c_long = 449; | ||
//pub const SYS_set_mempolicy_home_node: ::c_long = 450; | ||
pub const SYS_set_mempolicy_home_node: ::c_long = 450; | ||
|
||
pub const POSIX_FADV_DONTNEED: ::c_int = 4; | ||
pub const POSIX_FADV_NOREUSE: ::c_int = 5; | ||
|
@@ -684,6 +699,8 @@ pub const ENOTRECOVERABLE: ::c_int = 131; | |
pub const ERFKILL: ::c_int = 132; | ||
pub const EHWPOISON: ::c_int = 133; | ||
|
||
pub const MADV_SOFT_OFFLINE: ::c_int = 101; | ||
|
||
pub const MAP_NORESERVE: ::c_int = 0x4000; | ||
pub const MAP_ANONYMOUS: ::c_int = 0x0020; | ||
pub const MAP_ANON: ::c_int = 0x0020; | ||
|
@@ -695,6 +712,7 @@ pub const MAP_POPULATE: ::c_int = 0x8000; | |
pub const MAP_NONBLOCK: ::c_int = 0x10000; | ||
pub const MAP_STACK: ::c_int = 0x20000; | ||
pub const MAP_HUGETLB: ::c_int = 0x40000; | ||
pub const MAP_SYNC: ::c_int = 0x080000; | ||
pub const MCL_CURRENT: ::c_int = 0x0001; | ||
pub const MCL_FUTURE: ::c_int = 0x0002; | ||
pub const MCL_ONFAULT: ::c_int = 0x0004; | ||
|
@@ -746,6 +764,8 @@ pub const PTRACE_GETFPXREGS: ::c_uint = 18; | |
pub const PTRACE_SETFPXREGS: ::c_uint = 19; | ||
pub const PTRACE_GETREGS: ::c_uint = 12; | ||
pub const PTRACE_SETREGS: ::c_uint = 13; | ||
pub const PTRACE_SYSEMU: ::c_uint = 31; | ||
pub const PTRACE_SYSEMU_SINGLESTEP: ::c_uint = 32; | ||
|
||
pub const RTLD_DEEPBIND: ::c_int = 0x8; | ||
pub const RTLD_GLOBAL: ::c_int = 0x100; | ||
|
@@ -846,6 +866,7 @@ pub const ECHOPRT: ::tcflag_t = 0x00000400; | |
pub const ECHOCTL: ::tcflag_t = 0x00000200; | ||
pub const ISIG: ::tcflag_t = 0x00000001; | ||
pub const ICANON: ::tcflag_t = 0x00000002; | ||
pub const XCASE: ::tcflag_t = 0x00000004; | ||
pub const PENDIN: ::tcflag_t = 0x00004000; | ||
pub const NOFLSH: ::tcflag_t = 0x00000080; | ||
|
||
|
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
https://github.com/bminor/glibc/blob/d6c72f976c61d3c1465699f2bcad77e62bafe61d/sysdeps/unix/sysv/linux/loongarch/sys/ucontext.h#L46-L52