Changeset View
Changeset View
Standalone View
Standalone View
sys/x86/linux/linux_x86_sigframe.h
Show All 29 Lines | |||||
* THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. | * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. | ||||
* | * | ||||
* $FreeBSD$ | * $FreeBSD$ | ||||
*/ | */ | ||||
#ifndef _X86_LINUX_SIGFRAME_H_ | #ifndef _X86_LINUX_SIGFRAME_H_ | ||||
#define _X86_LINUX_SIGFRAME_H_ | #define _X86_LINUX_SIGFRAME_H_ | ||||
#define LINUX_UC_FP_XSTATE 0x1 | |||||
#define LINUX_FP_XSTATE_MAGIC1 0x46505853U | |||||
#define LINUX_FP_XSTATE_MAGIC2 0x46505845U | |||||
#define LINUX_FP_XSTATE_MAGIC2_SIZE sizeof(uint32_t) | |||||
kib: This is somewhat weird way to use sizeof(). Usually we apply it to either type of storage, not… | |||||
Done Inline ActionsDue to U suffix of LINUX_FP_XSTATE_MAGIC2 it's unsigned int. dchagin: Due to U suffix of LINUX_FP_XSTATE_MAGIC2 it's unsigned int.
It really modeled like a Linux… | |||||
Not Done Inline ActionsNo, it is unsigned int due to suffix + the fact that it fits into unsigned. This is why was triggered by the expression. Of course, size_t is problematic, but uint32_t should be not. I ask you to change the expression to sizeof(uint32_t), please. kib: No, it is unsigned int due to suffix + the fact that it fits into unsigned. This is why was… | |||||
struct l_fpx_sw_bytes { | |||||
uint32_t magic1; | |||||
uint32_t extended_size; | |||||
uint64_t xfeatures; | |||||
uint32_t xstate_size; | |||||
uint32_t padding[7]; | |||||
}; | |||||
#if defined(__i386__) || (defined(__amd64__) && defined(COMPAT_LINUX32)) | #if defined(__i386__) || (defined(__amd64__) && defined(COMPAT_LINUX32)) | ||||
/* The Linux sigcontext, pretty much a standard 386 trapframe. */ | /* The Linux sigcontext, pretty much a standard 386 trapframe. */ | ||||
struct l_sigcontext { | struct l_sigcontext { | ||||
l_uint sc_gs; | l_uint sc_gs; | ||||
l_uint sc_fs; | l_uint sc_fs; | ||||
l_uint sc_es; | l_uint sc_es; | ||||
l_uint sc_ds; | l_uint sc_ds; | ||||
▲ Show 20 Lines • Show All 89 Lines • ▼ Show 20 Lines | struct l_fpstate { | ||||
u_int16_t twd; | u_int16_t twd; | ||||
u_int16_t fop; | u_int16_t fop; | ||||
u_int64_t rip; | u_int64_t rip; | ||||
u_int64_t rdp; | u_int64_t rdp; | ||||
u_int32_t mxcsr; | u_int32_t mxcsr; | ||||
u_int32_t mxcsr_mask; | u_int32_t mxcsr_mask; | ||||
u_int8_t st[8][16]; | u_int8_t st[8][16]; | ||||
u_int8_t xmm[16][16]; | u_int8_t xmm[16][16]; | ||||
u_int32_t reserved2[24]; | u_int32_t reserved2[12]; | ||||
union { | |||||
u_int32_t reserved3[12]; | |||||
struct l_fpx_sw_bytes sw_reserved; | |||||
}; | |||||
} __aligned(16); | } __aligned(16); | ||||
struct l_sigcontext { | struct l_sigcontext { | ||||
l_ulong sc_r8; | l_ulong sc_r8; | ||||
l_ulong sc_r9; | l_ulong sc_r9; | ||||
l_ulong sc_r10; | l_ulong sc_r10; | ||||
l_ulong sc_r11; | l_ulong sc_r11; | ||||
l_ulong sc_r12; | l_ulong sc_r12; | ||||
▲ Show 20 Lines • Show All 51 Lines • Show Last 20 Lines |
This is somewhat weird way to use sizeof(). Usually we apply it to either type of storage, not an expression, for the purpose of defining the ABI. Is it really sizeof(uint32_t)?