Merge remote branch 'origin/sparc-dev'
[akaros.git] / kern / arch / sparc / trap.h
index 1e6b700..5f583f1 100644 (file)
@@ -6,11 +6,11 @@
 
 #ifndef __ASSEMBLER__
 
-#include <arch/types.h>
+#include <ros/common.h>
 
 typedef struct
 {
-       uint32_t gpr[32];
+       uint32_t gpr[32] __attribute__((aligned (8)));
        uint32_t psr;
        uint32_t pc;
        uint32_t npc;
@@ -22,24 +22,21 @@ typedef struct
        uint64_t timestamp;
 } trapframe_t;
 
-typedef void (*amr_t)(trapframe_t* tf, uint32_t srcid, uint32_t a0, uint32_t a1, uint32_t a2);
-
-typedef struct
-{
-       uint32_t srcid;
-       amr_t pc;
-       uint32_t arg0;
-       uint32_t arg1;
-       uint32_t arg2;
-       uint32_t pad;
-} active_message_t;
-
 typedef struct
 {
-       uint32_t fpr[32];
+       uint32_t fpr[32] __attribute__((aligned (8)));
        uint32_t fsr;
 } ancillary_state_t;
 
+void access_exception(trapframe_t* state);
+void real_fp_exception(trapframe_t* state, ancillary_state_t* astate);
+void address_unaligned(trapframe_t* state);
+void illegal_instruction(trapframe_t* state);
+
+void save_fp_state(ancillary_state_t* silly);
+void restore_fp_state(ancillary_state_t* silly);
+void emulate_fpu(trapframe_t* state, ancillary_state_t* astate);
+
 #endif /* !__ASSEMBLER__ */
 
 #endif /* !ROS_INC_ARCH_TRAP_H */