[MODERN FEATURES] SSE

This commit is contained in:
thomas committed 2017-03-27 23:09:08 +02:00
1 parent 253cd84a1f
commit 0b27ddca2c
7 files changed
+69 -2

No files matched your search

+8
View File
@@ -1,8 +1,16 @@
#pragma once
#ifndef __ASSEMBLER__
void load_idt(void *);
uint64_t read_cr0();
uint64_t read_cr2();
uint64_t read_cr3();
void write_cr3(uint64_t);
uint64_t read_cr4();
#endif
#define CR0_MP (1<<1)
#define CR0_EM (1<<2)
#define CR4_OSFXSR (1<<9)
#define CR4_OSXMMEXCPT (1<<10)
+6
View File
@@ -0,0 +1,6 @@
#pragma once
void sse_init();
void sse_save(uint8_t *addr);
void sse_restore(uint8_t *addr);
+1
View File
@@ -11,6 +11,7 @@ typedef struct thread_st
uint64_t stack_pointer; // Top of the kernel stack for thread
uint64_t tid;
uint64_t state;
uint8_t sse_registers[512];
process_t *process;
LIST(struct thread_st, process_threads);
LIST(struct thread_st, ready_queue);