Skip to content

Commit

Permalink
kernel/hal/ia32: Fix invalid endianess in FPU context
Browse files Browse the repository at this point in the history
Low 16 bits of FPU control word, status word, tag word and
Data Pointer Selector are incorrectly placed in the `fpu_context_t`
structure.

JIRA: RTOS-842
  • Loading branch information
astalke authored and Darchiv committed Jun 4, 2024
1 parent 828df3f commit 7634e1e
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions hal/ia32/arch/cpu.h
Original file line number Diff line number Diff line change
Expand Up @@ -196,13 +196,13 @@
#pragma pack(push, 1)

typedef struct {
u16 _controlWord, controlWord;
u16 _statusWord, statusWord;
u16 _tagWord, tagWord;
u16 controlWord, _controlWord;
u16 statusWord, _statusWord;
u16 tagWord, _tagWord;
u32 fip;
u32 fips;
u32 fdp;
u16 _fds, fds;
u16 fds, _fds;
ld80 fpuContext[8];
} fpu_context_t;

Expand Down

0 comments on commit 7634e1e

Please sign in to comment.