hppa: Revise REG+D address support to allow long displacements before reload
[official-gcc.git] / gcc / ada / exp_sel.ads
blob5c6408aa986da68a4748a1517f5917d1b60ddfd5
1 ------------------------------------------------------------------------------
2 -- --
3 -- GNAT COMPILER COMPONENTS --
4 -- --
5 -- E X P _ S E L --
6 -- --
7 -- S p e c --
8 -- --
9 -- Copyright (C) 1992-2023, Free Software Foundation, Inc. --
10 -- --
11 -- GNAT is free software; you can redistribute it and/or modify it under --
12 -- terms of the GNU General Public License as published by the Free Soft- --
13 -- ware Foundation; either version 3, or (at your option) any later ver- --
14 -- sion. GNAT is distributed in the hope that it will be useful, but WITH- --
15 -- OUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY --
16 -- or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License --
17 -- for more details. You should have received a copy of the GNU General --
18 -- Public License distributed with GNAT; see file COPYING3. If not, go to --
19 -- http://www.gnu.org/licenses for a complete copy of the license. --
20 -- --
21 -- GNAT was originally developed by the GNAT team at New York University. --
22 -- Extensive contributions were provided by Ada Core Technologies Inc. --
23 -- --
24 ------------------------------------------------------------------------------
26 -- Routines used in Chapter 9 for the expansion of dispatching triggers in
27 -- select statements (Ada 2005: AI-345)
29 with Types; use Types;
31 package Exp_Sel is
33 function Build_Abort_Block
34 (Loc : Source_Ptr;
35 Abr_Blk_Ent : Entity_Id;
36 Cln_Blk_Ent : Entity_Id;
37 Blk : Node_Id) return Node_Id;
38 -- Generate:
39 -- begin
40 -- Blk
41 -- exception
42 -- when Abort_Signal => null;
43 -- end;
44 -- Abr_Blk_Ent is the name of the generated block, Cln_Blk_Ent is the name
45 -- of the encapsulated cleanup block, Blk is the actual block name.
46 -- The exception handler code is built by Build_Abort_Block_Handler.
48 function Build_Abort_Block_Handler (Loc : Source_Ptr) return Node_Id;
49 -- Generate:
50 -- when others =>
51 -- null;
52 -- This is an exception handler to stop propagation of aborts, without
53 -- modifying the deferral level.
55 function Build_B
56 (Loc : Source_Ptr;
57 Decls : List_Id) return Entity_Id;
58 -- Generate:
59 -- B : Boolean := False;
60 -- Append the object declaration to the list and return its defining
61 -- identifier.
63 function Build_C
64 (Loc : Source_Ptr;
65 Decls : List_Id) return Entity_Id;
66 -- Generate:
67 -- C : Ada.Tags.Prim_Op_Kind;
68 -- Append the object declaration to the list and return its defining
69 -- identifier.
71 function Build_Cleanup_Block
72 (Loc : Source_Ptr;
73 Blk_Ent : Entity_Id;
74 Stmts : List_Id;
75 Clean_Ent : Entity_Id) return Node_Id;
76 -- Generate:
77 -- declare
78 -- procedure _clean is
79 -- begin
80 -- ...
81 -- end _clean;
82 -- begin
83 -- Stmts
84 -- at end
85 -- _clean;
86 -- end;
87 -- Blk_Ent is the name of the generated block, Stmts is the list of
88 -- encapsulated statements and Clean_Ent is the parameter to the
89 -- _clean procedure.
91 function Build_K
92 (Loc : Source_Ptr;
93 Decls : List_Id;
94 Obj : Entity_Id) return Entity_Id;
95 -- Generate
96 -- K : Ada.Tags.Tagged_Kind :=
97 -- Ada.Tags.Get_Tagged_Kind (Ada.Tags.Tag (Obj));
98 -- where Obj is the pointer to a secondary table. Append the object
99 -- declaration to the list and return its defining identifier.
101 function Build_S
102 (Loc : Source_Ptr;
103 Decls : List_Id) return Entity_Id;
104 -- Generate:
105 -- S : Integer;
106 -- Append the object declaration to the list and return its defining
107 -- identifier.
109 function Build_S_Assignment
110 (Loc : Source_Ptr;
111 S : Entity_Id;
112 Obj : Entity_Id;
113 Call_Ent : Entity_Id) return Node_Id;
114 -- Generate:
115 -- S := Ada.Tags.Get_Offset_Index (
116 -- Ada.Tags.Tag (Obj), DT_Position (Call_Ent));
117 -- where Obj is the pointer to a secondary table, Call_Ent is the entity
118 -- of the dispatching call name. Return the generated assignment.
120 end Exp_Sel;