Skip to content

Commit

Permalink
Auto merge of #2911 - devnexen:netbsd_reg_constants, r=JohnTitor
Browse files Browse the repository at this point in the history
netbsd mcontext x86_64 constants.
  • Loading branch information
bors committed Sep 17, 2022
2 parents 1afccf7 + ffad7fd commit 9cdd42e
Showing 1 changed file with 27 additions and 0 deletions.
27 changes: 27 additions & 0 deletions src/unix/bsd/netbsdlike/netbsd/mod.rs
Expand Up @@ -2271,6 +2271,33 @@ pub const LSZOMB: ::c_int = 5;
pub const LSONPROC: ::c_int = 7;
pub const LSSUSPENDED: ::c_int = 8;

pub const _REG_RDI: ::c_int = 0;
pub const _REG_RSI: ::c_int = 1;
pub const _REG_RDX: ::c_int = 2;
pub const _REG_RCX: ::c_int = 3;
pub const _REG_R8: ::c_int = 4;
pub const _REG_R9: ::c_int = 5;
pub const _REG_R10: ::c_int = 6;
pub const _REG_R11: ::c_int = 7;
pub const _REG_R12: ::c_int = 8;
pub const _REG_R13: ::c_int = 9;
pub const _REG_R14: ::c_int = 10;
pub const _REG_R15: ::c_int = 11;
pub const _REG_RBP: ::c_int = 12;
pub const _REG_RBX: ::c_int = 13;
pub const _REG_RAX: ::c_int = 14;
pub const _REG_GS: ::c_int = 15;
pub const _REG_FS: ::c_int = 16;
pub const _REG_ES: ::c_int = 17;
pub const _REG_DS: ::c_int = 18;
pub const _REG_TRAPNO: ::c_int = 19;
pub const _REG_ERR: ::c_int = 20;
pub const _REG_RIP: ::c_int = 21;
pub const _REG_CS: ::c_int = 22;
pub const _REG_RFLAGS: ::c_int = 23;
pub const _REG_RSP: ::c_int = 24;
pub const _REG_SS: ::c_int = 25;

const_fn! {
{const} fn _ALIGN(p: usize) -> usize {
(p + _ALIGNBYTES) & !_ALIGNBYTES
Expand Down

0 comments on commit 9cdd42e

Please sign in to comment.