URL
https://opencores.org/ocsvn/openrisc_2011-10-31/openrisc_2011-10-31/trunk
Go to most recent revision |
Only display areas with differences |
Details |
Blame |
View Log
Rev 304 |
Rev 384 |
-- { dg-do run }
|
-- { dg-do run }
|
|
|
with Ada.Text_IO; use Ada.Text_IO;
|
with Ada.Text_IO; use Ada.Text_IO;
|
with System.Storage_Elements; use System.Storage_Elements;
|
with System.Storage_Elements; use System.Storage_Elements;
|
|
|
procedure Task_Stack_Align is
|
procedure Task_Stack_Align is
|
|
|
type Align_Me is record
|
type Align_Me is record
|
Value : Integer;
|
Value : Integer;
|
end record;
|
end record;
|
for Align_Me'Alignment use Standard'Maximum_Alignment;
|
for Align_Me'Alignment use Standard'Maximum_Alignment;
|
|
|
procedure Check_Local_Alignment_From (Context : String) is
|
procedure Check_Local_Alignment_From (Context : String) is
|
Object : Align_Me;
|
Object : Align_Me;
|
begin
|
begin
|
if To_Integer (Object'Address) mod Object'Alignment /= 0 then
|
if To_Integer (Object'Address) mod Object'Alignment /= 0 then
|
Put_Line ("alignment check failed in " & Context);
|
Put_Line ("alignment check failed in " & Context);
|
end if;
|
end if;
|
end;
|
end;
|
|
|
task type T;
|
task type T;
|
|
|
task body T is
|
task body T is
|
begin
|
begin
|
Check_Local_Alignment_From ("task T");
|
Check_Local_Alignment_From ("task T");
|
end;
|
end;
|
|
|
Tasks : array (1 .. 50) of T;
|
Tasks : array (1 .. 50) of T;
|
begin
|
begin
|
Check_Local_Alignment_From ("environment");
|
Check_Local_Alignment_From ("environment");
|
end;
|
end;
|
|
|
© copyright 1999-2024
OpenCores.org, equivalent to Oliscience, all rights reserved. OpenCores®, registered trademark.