Debian Codegraph @

third_party/rust/minidump-writer/src/minidump_cpu.rs

raw
1 cfg_if::cfg_if! {
2 if #[cfg(target_arch = "x86_64")] {
3 pub type RawContextCPU = minidump_common::format::CONTEXT_AMD64;
4 pub type FloatStateCPU = minidump_common::format::XMM_SAVE_AREA32;
5 } else if #[cfg(target_arch = "x86")] {
6 pub type RawContextCPU = minidump_common::format::CONTEXT_X86;
7 pub type FloatStateCPU = minidump_common::format::FLOATING_SAVE_AREA_X86;
8 } else if #[cfg(target_arch = "arm")] {
9 pub type RawContextCPU = minidump_common::format::CONTEXT_ARM;
10 pub type FloatStateCPU = minidump_common::format::FLOATING_SAVE_AREA_ARM;
11 } else if #[cfg(target_arch = "aarch64")] {
12 /// This is the number of general purpose registers _not_ counting
13 /// the stack pointer
14 #[cfg(any(target_os = "linux", target_os = "android"))]
15 pub(crate) const GP_REG_COUNT: usize = 31;
16 /// The number of floating point registers in the floating point save area
17 #[cfg(any(target_os = "linux", target_os = "android"))]
18 pub(crate) const FP_REG_COUNT: usize = 32;
19
20 pub type RawContextCPU = minidump_common::format::CONTEXT_ARM64_OLD;
21 } else if #[cfg(target_arch = "mips")] {
22 compile_error!("flesh me out");
23 } else {
24 compile_error!("unsupported target architecture");
25 }
26 }