Commit a3fb360e authored by jdelange's avatar jdelange

* Adapt the generated code so that it is now compliant with

   compcert



git-svn-id: https://tecsw.estec.esa.int/svn/taste/trunk/ocarina@2653 129961e7-ef38-4bb5-a8f7-c9a525a55882
parent c5be2d80
......@@ -6,7 +6,7 @@
-- --
-- B o d y --
-- --
-- Copyright (C) 2008-2009, GET-Telecom Paris. --
-- Copyright (C) 2008-2011, European Space Agency (ESA). --
-- --
-- Ocarina is free software; you can redistribute it and/or modify --
-- it under terms of the GNU General Public License as published by the --
......@@ -663,6 +663,7 @@ package body Ocarina.Backends.C_Tree.Generator is
-- If we got there, then L is not empty.
if Is_Empty (L) then
Write (Tok_Left_Paren);
Write_Str ("void");
Write (Tok_Right_Paren);
return;
end if;
......
......@@ -157,6 +157,9 @@ package body Ocarina.Backends.PO_HI_C is
when Platform_Native | Platform_None =>
Write_Str ("native");
when Platform_Native_Compcert =>
Write_Str ("compcert");
when Platform_LEON_RTEMS =>
Write_Str ("leon.rtems");
......
......@@ -301,10 +301,11 @@ package body Ocarina.Backends.Properties is
Size_Giga_Byte_Name : Name_Id;
Size_Tera_Byte_Name : Name_Id;
Platform_Native_Name : Name_Id;
Platform_LINUX32_Name : Name_Id;
Platform_LINUX32_Xenomai_Native_Name : Name_Id;
Platform_LINUX32_Xenomai_Posix_Name : Name_Id;
Platform_Native_Name : Name_Id;
Platform_Native_Compcert_Name : Name_Id;
Platform_LINUX32_Name : Name_Id;
Platform_LINUX32_Xenomai_Native_Name : Name_Id;
Platform_LINUX32_Xenomai_Posix_Name : Name_Id;
Platform_LINUX64_Name : Name_Id;
Platform_LEON_RTEMS_Name : Name_Id;
Platform_X86_LINUXTASTE_Name : Name_Id;
......@@ -2609,6 +2610,8 @@ package body Ocarina.Backends.Properties is
if P_Name = Platform_Native_Name then
return Platform_Native;
elsif P_Name = Platform_Native_Compcert_Name then
return Platform_Native_Compcert;
elsif P_Name = Platform_LEON_RTEMS_Name then
return Platform_LEON_RTEMS;
elsif P_Name = Platform_X86_LINUXTASTE_Name then
......@@ -2644,7 +2647,6 @@ package body Ocarina.Backends.Properties is
else
Display_Located_Error
(AIN.Loc (P), "Unknown execution platform", Fatal => True);
return Platform_None;
end if;
else
......@@ -3154,6 +3156,8 @@ package body Ocarina.Backends.Properties is
Time_Hr_Name := Get_String_Name ("hr");
Platform_Native_Name := Get_String_Name ("native");
Platform_Native_Compcert_Name
:= Get_String_Name ("native_compcert");
Platform_X86_RTEMS_Name := Get_String_Name ("x86_rtems");
Platform_LINUX32_Name := Get_String_Name ("linux32");
Platform_LINUX32_Xenomai_Native_Name
......
......@@ -570,6 +570,7 @@ package Ocarina.Backends.Properties is
type Supported_Execution_Platform is
(Platform_Native,
Platform_Native_Compcert,
Platform_LEON_RTEMS,
Platform_X86_RTEMS,
Platform_X86_LINUXTASTE,
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment