-- {MAR>} -------------------------------------------------------------------
with System.Machine_Code; use System.Machine_Code;
with Ada.Unchecked_Conversion;
-with Hardware_Interface;
+with Marte.Hal;
package body Non_Local_Jump is
- use Basic_Integer_Types;
+ use Marte.Integer_Types;
use System;
pragma Optimize (Off);
Asm ("1: popl %%ebp;",
No_Output_Operands,
No_Input_Operands, "", True);
- Hardware_Interface.Interrupts_Enabled;
+ Marte.Hal.Enable_Interrupts;
end Save_Context;
------------------
--
-- {MAR>} -------------------------------------------------------------------
with System;
-with Basic_Integer_Types;
+with Marte.Integer_Types;
package Non_Local_Jump is
pragma Optimize (Off);
-- returning from 'Save_Context' due to a call to 'Restore_Context',
-- 'After_Jump' shall return 1 (True).
function After_Jump (Context : access Jmp_Context)
- return Basic_Integer_Types.Unsigned_32;
+ return Marte.Integer_Types.Unsigned_32;
pragma Export (C, After_Jump, "marte_nonlocaljmp_afterjmp");
---------------------
private
type Save_Context_Stack is array (1 .. 29) of -- 17->2005, 29->2007
- Basic_Integer_Types.Unsigned_32;
+ Marte.Integer_Types.Unsigned_32;
type Save_Context_Stack_Ac is access Save_Context_Stack;
-- Stack of 'Save_Context' funcion. The frame created by 'Save_Context' is
-- 16/28 integers long when no optimization is used for this function. The
-- this instruction from the 'ret' instruction in
-- 'Processor_Registers.Context_Switch'.
- Ebx : Basic_Integer_Types.Unsigned_32;
- Ecx : Basic_Integer_Types.Unsigned_32;
- Edx : Basic_Integer_Types.Unsigned_32;
- Esi : Basic_Integer_Types.Unsigned_32;
- Edi : Basic_Integer_Types.Unsigned_32;
- Ebp : Basic_Integer_Types.Unsigned_32;
- Eax : Basic_Integer_Types.Unsigned_32;
+ Ebx : Marte.Integer_Types.Unsigned_32;
+ Ecx : Marte.Integer_Types.Unsigned_32;
+ Edx : Marte.Integer_Types.Unsigned_32;
+ Esi : Marte.Integer_Types.Unsigned_32;
+ Edi : Marte.Integer_Types.Unsigned_32;
+ Ebp : Marte.Integer_Types.Unsigned_32;
+ Eax : Marte.Integer_Types.Unsigned_32;
- Esp : Basic_Integer_Types.Unsigned_32; -- top of stack
+ Esp : Marte.Integer_Types.Unsigned_32; -- top of stack
- After_Jmp : Basic_Integer_Types.Unsigned_32;
+ After_Jmp : Marte.Integer_Types.Unsigned_32;
-- 0 (False) after a direct invocation to 'Save_Context'. 1 (True) if
-- 'Restore_Context' has been invoked.
type Preempted_Task_Restore_Context_Stack is record
Return_Address : System.Address;
- Ebp : Basic_Integer_Types.Unsigned_32;
+ Ebp : Marte.Integer_Types.Unsigned_32;
Context_Stack : Save_Context_Stack;
end record;
type Preempted_Task_Restore_Context_Stack_Ac is