max_stars_repo_path
stringlengths
4
261
max_stars_repo_name
stringlengths
6
106
max_stars_count
int64
0
38.8k
id
stringlengths
1
6
text
stringlengths
7
1.05M
source/amf/dd/amf-internals-tables-di_metamodel-objects.adb
svn2github/matreshka
24
24295
------------------------------------------------------------------------------ -- -- -- Matreshka Project -- -- -- -- Ada Modeling Framework -- -- -- -- Runtime Library Component -- -- -- ------------------------------------------------------------------------------ -- -- -- Copyright © 2012, <NAME> <<EMAIL>> -- -- All rights reserved. -- -- -- -- Redistribution and use in source and binary forms, with or without -- -- modification, are permitted provided that the following conditions -- -- are met: -- -- -- -- * Redistributions of source code must retain the above copyright -- -- notice, this list of conditions and the following disclaimer. -- -- -- -- * Redistributions in binary form must reproduce the above copyright -- -- notice, this list of conditions and the following disclaimer in the -- -- documentation and/or other materials provided with the distribution. -- -- -- -- * Neither the name of the Vadim Godunko, IE nor the names of its -- -- contributors may be used to endorse or promote products derived from -- -- this software without specific prior written permission. -- -- -- -- THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -- -- "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -- -- LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -- -- A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -- -- HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -- -- SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED -- -- TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR -- -- PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF -- -- LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING -- -- NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS -- -- SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -- -- -- ------------------------------------------------------------------------------ -- $Revision$ $Date$ ------------------------------------------------------------------------------ -- This file is generated, don't edit it. ------------------------------------------------------------------------------ with AMF.Internals.Extents; with AMF.Internals.Tables.CMOF_Constructors; with AMF.Internals.Tables.CMOF_Element_Table; with AMF.Internals.Tables.DI_String_Data_00; package body AMF.Internals.Tables.DI_Metamodel.Objects is ---------------- -- Initialize -- ---------------- procedure Initialize is Extent : constant AMF.Internals.AMF_Extent := AMF.Internals.Extents.Allocate_Extent (AMF.Internals.Tables.DI_String_Data_00.MS_0012'Access); begin Base := AMF.Internals.Tables.CMOF_Element_Table.Last; Initialize_1 (Extent); Initialize_2 (Extent); Initialize_3 (Extent); Initialize_4 (Extent); Initialize_5 (Extent); Initialize_6 (Extent); Initialize_7 (Extent); Initialize_8 (Extent); Initialize_9 (Extent); Initialize_10 (Extent); Initialize_11 (Extent); Initialize_12 (Extent); Initialize_13 (Extent); Initialize_14 (Extent); Initialize_15 (Extent); Initialize_16 (Extent); Initialize_17 (Extent); Initialize_18 (Extent); Initialize_19 (Extent); Initialize_20 (Extent); Initialize_21 (Extent); Initialize_22 (Extent); Initialize_23 (Extent); Initialize_24 (Extent); Initialize_25 (Extent); Initialize_26 (Extent); Initialize_27 (Extent); Initialize_28 (Extent); Initialize_29 (Extent); Initialize_30 (Extent); Initialize_31 (Extent); Initialize_32 (Extent); Initialize_33 (Extent); Initialize_34 (Extent); Initialize_35 (Extent); Initialize_36 (Extent); Initialize_37 (Extent); Initialize_38 (Extent); Initialize_39 (Extent); Initialize_40 (Extent); Initialize_41 (Extent); Initialize_42 (Extent); Initialize_43 (Extent); Initialize_44 (Extent); Initialize_45 (Extent); Initialize_46 (Extent); Initialize_47 (Extent); Initialize_48 (Extent); Initialize_49 (Extent); Initialize_50 (Extent); Initialize_51 (Extent); Initialize_52 (Extent); Initialize_53 (Extent); end Initialize; ------------------ -- Initialize_1 -- ------------------ procedure Initialize_1 (Extent : AMF.Internals.AMF_Extent) is Aux : AMF.Internals.CMOF_Element; begin Aux := AMF.Internals.Tables.CMOF_Constructors.Create_CMOF_Class; AMF.Internals.Extents.Internal_Append (Extent, Aux); end Initialize_1; ------------------ -- Initialize_2 -- ------------------ procedure Initialize_2 (Extent : AMF.Internals.AMF_Extent) is Aux : AMF.Internals.CMOF_Element; begin Aux := AMF.Internals.Tables.CMOF_Constructors.Create_CMOF_Class; AMF.Internals.Extents.Internal_Append (Extent, Aux); end Initialize_2; ------------------ -- Initialize_3 -- ------------------ procedure Initialize_3 (Extent : AMF.Internals.AMF_Extent) is Aux : AMF.Internals.CMOF_Element; begin Aux := AMF.Internals.Tables.CMOF_Constructors.Create_CMOF_Class; AMF.Internals.Extents.Internal_Append (Extent, Aux); end Initialize_3; ------------------ -- Initialize_4 -- ------------------ procedure Initialize_4 (Extent : AMF.Internals.AMF_Extent) is Aux : AMF.Internals.CMOF_Element; begin Aux := AMF.Internals.Tables.CMOF_Constructors.Create_CMOF_Class; AMF.Internals.Extents.Internal_Append (Extent, Aux); end Initialize_4; ------------------ -- Initialize_5 -- ------------------ procedure Initialize_5 (Extent : AMF.Internals.AMF_Extent) is Aux : AMF.Internals.CMOF_Element; begin Aux := AMF.Internals.Tables.CMOF_Constructors.Create_CMOF_Class; AMF.Internals.Extents.Internal_Append (Extent, Aux); end Initialize_5; ------------------ -- Initialize_6 -- ------------------ procedure Initialize_6 (Extent : AMF.Internals.AMF_Extent) is Aux : AMF.Internals.CMOF_Element; begin Aux := AMF.Internals.Tables.CMOF_Constructors.Create_CMOF_Property; AMF.Internals.Extents.Internal_Append (Extent, Aux); end Initialize_6; ------------------ -- Initialize_7 -- ------------------ procedure Initialize_7 (Extent : AMF.Internals.AMF_Extent) is Aux : AMF.Internals.CMOF_Element; begin Aux := AMF.Internals.Tables.CMOF_Constructors.Create_CMOF_Property; AMF.Internals.Extents.Internal_Append (Extent, Aux); end Initialize_7; ------------------ -- Initialize_8 -- ------------------ procedure Initialize_8 (Extent : AMF.Internals.AMF_Extent) is Aux : AMF.Internals.CMOF_Element; begin Aux := AMF.Internals.Tables.CMOF_Constructors.Create_CMOF_Property; AMF.Internals.Extents.Internal_Append (Extent, Aux); end Initialize_8; ------------------ -- Initialize_9 -- ------------------ procedure Initialize_9 (Extent : AMF.Internals.AMF_Extent) is Aux : AMF.Internals.CMOF_Element; begin Aux := AMF.Internals.Tables.CMOF_Constructors.Create_CMOF_Property; AMF.Internals.Extents.Internal_Append (Extent, Aux); end Initialize_9; ------------------- -- Initialize_10 -- ------------------- procedure Initialize_10 (Extent : AMF.Internals.AMF_Extent) is Aux : AMF.Internals.CMOF_Element; begin Aux := AMF.Internals.Tables.CMOF_Constructors.Create_CMOF_Property; AMF.Internals.Extents.Internal_Append (Extent, Aux); end Initialize_10; ------------------- -- Initialize_11 -- ------------------- procedure Initialize_11 (Extent : AMF.Internals.AMF_Extent) is Aux : AMF.Internals.CMOF_Element; begin Aux := AMF.Internals.Tables.CMOF_Constructors.Create_CMOF_Property; AMF.Internals.Extents.Internal_Append (Extent, Aux); end Initialize_11; ------------------- -- Initialize_12 -- ------------------- procedure Initialize_12 (Extent : AMF.Internals.AMF_Extent) is Aux : AMF.Internals.CMOF_Element; begin Aux := AMF.Internals.Tables.CMOF_Constructors.Create_CMOF_Property; AMF.Internals.Extents.Internal_Append (Extent, Aux); end Initialize_12; ------------------- -- Initialize_13 -- ------------------- procedure Initialize_13 (Extent : AMF.Internals.AMF_Extent) is Aux : AMF.Internals.CMOF_Element; begin Aux := AMF.Internals.Tables.CMOF_Constructors.Create_CMOF_Property; AMF.Internals.Extents.Internal_Append (Extent, Aux); end Initialize_13; ------------------- -- Initialize_14 -- ------------------- procedure Initialize_14 (Extent : AMF.Internals.AMF_Extent) is Aux : AMF.Internals.CMOF_Element; begin Aux := AMF.Internals.Tables.CMOF_Constructors.Create_CMOF_Property; AMF.Internals.Extents.Internal_Append (Extent, Aux); end Initialize_14; ------------------- -- Initialize_15 -- ------------------- procedure Initialize_15 (Extent : AMF.Internals.AMF_Extent) is Aux : AMF.Internals.CMOF_Element; begin Aux := AMF.Internals.Tables.CMOF_Constructors.Create_CMOF_Property; AMF.Internals.Extents.Internal_Append (Extent, Aux); end Initialize_15; ------------------- -- Initialize_16 -- ------------------- procedure Initialize_16 (Extent : AMF.Internals.AMF_Extent) is Aux : AMF.Internals.CMOF_Element; begin Aux := AMF.Internals.Tables.CMOF_Constructors.Create_CMOF_Property; AMF.Internals.Extents.Internal_Append (Extent, Aux); end Initialize_16; ------------------- -- Initialize_17 -- ------------------- procedure Initialize_17 (Extent : AMF.Internals.AMF_Extent) is Aux : AMF.Internals.CMOF_Element; begin Aux := AMF.Internals.Tables.CMOF_Constructors.Create_CMOF_Property; AMF.Internals.Extents.Internal_Append (Extent, Aux); end Initialize_17; ------------------- -- Initialize_18 -- ------------------- procedure Initialize_18 (Extent : AMF.Internals.AMF_Extent) is Aux : AMF.Internals.CMOF_Element; begin Aux := AMF.Internals.Tables.CMOF_Constructors.Create_CMOF_Association; AMF.Internals.Extents.Internal_Append (Extent, Aux); end Initialize_18; ------------------- -- Initialize_19 -- ------------------- procedure Initialize_19 (Extent : AMF.Internals.AMF_Extent) is Aux : AMF.Internals.CMOF_Element; begin Aux := AMF.Internals.Tables.CMOF_Constructors.Create_CMOF_Association; AMF.Internals.Extents.Internal_Append (Extent, Aux); end Initialize_19; ------------------- -- Initialize_20 -- ------------------- procedure Initialize_20 (Extent : AMF.Internals.AMF_Extent) is Aux : AMF.Internals.CMOF_Element; begin Aux := AMF.Internals.Tables.CMOF_Constructors.Create_CMOF_Association; AMF.Internals.Extents.Internal_Append (Extent, Aux); end Initialize_20; ------------------- -- Initialize_21 -- ------------------- procedure Initialize_21 (Extent : AMF.Internals.AMF_Extent) is Aux : AMF.Internals.CMOF_Element; begin Aux := AMF.Internals.Tables.CMOF_Constructors.Create_CMOF_Association; AMF.Internals.Extents.Internal_Append (Extent, Aux); end Initialize_21; ------------------- -- Initialize_22 -- ------------------- procedure Initialize_22 (Extent : AMF.Internals.AMF_Extent) is Aux : AMF.Internals.CMOF_Element; begin Aux := AMF.Internals.Tables.CMOF_Constructors.Create_CMOF_Association; AMF.Internals.Extents.Internal_Append (Extent, Aux); end Initialize_22; ------------------- -- Initialize_23 -- ------------------- procedure Initialize_23 (Extent : AMF.Internals.AMF_Extent) is Aux : AMF.Internals.CMOF_Element; begin Aux := AMF.Internals.Tables.CMOF_Constructors.Create_CMOF_Association; AMF.Internals.Extents.Internal_Append (Extent, Aux); end Initialize_23; ------------------- -- Initialize_24 -- ------------------- procedure Initialize_24 (Extent : AMF.Internals.AMF_Extent) is Aux : AMF.Internals.CMOF_Element; begin Aux := AMF.Internals.Tables.CMOF_Constructors.Create_CMOF_Package; AMF.Internals.Extents.Internal_Append (Extent, Aux); end Initialize_24; ------------------- -- Initialize_25 -- ------------------- procedure Initialize_25 (Extent : AMF.Internals.AMF_Extent) is Aux : AMF.Internals.CMOF_Element; begin Aux := AMF.Internals.Tables.CMOF_Constructors.Create_CMOF_Comment; AMF.Internals.Extents.Internal_Append (Extent, Aux); end Initialize_25; ------------------- -- Initialize_26 -- ------------------- procedure Initialize_26 (Extent : AMF.Internals.AMF_Extent) is Aux : AMF.Internals.CMOF_Element; begin Aux := AMF.Internals.Tables.CMOF_Constructors.Create_CMOF_Package_Import; AMF.Internals.Extents.Internal_Append (Extent, Aux); end Initialize_26; ------------------- -- Initialize_27 -- ------------------- procedure Initialize_27 (Extent : AMF.Internals.AMF_Extent) is Aux : AMF.Internals.CMOF_Element; begin Aux := AMF.Internals.Tables.CMOF_Constructors.Create_CMOF_Package_Import; AMF.Internals.Extents.Internal_Append (Extent, Aux); end Initialize_27; ------------------- -- Initialize_28 -- ------------------- procedure Initialize_28 (Extent : AMF.Internals.AMF_Extent) is Aux : AMF.Internals.CMOF_Element; begin Aux := AMF.Internals.Tables.CMOF_Constructors.Create_CMOF_Comment; AMF.Internals.Extents.Internal_Append (Extent, Aux); end Initialize_28; ------------------- -- Initialize_29 -- ------------------- procedure Initialize_29 (Extent : AMF.Internals.AMF_Extent) is Aux : AMF.Internals.CMOF_Element; begin Aux := AMF.Internals.Tables.CMOF_Constructors.Create_CMOF_Comment; AMF.Internals.Extents.Internal_Append (Extent, Aux); end Initialize_29; ------------------- -- Initialize_30 -- ------------------- procedure Initialize_30 (Extent : AMF.Internals.AMF_Extent) is Aux : AMF.Internals.CMOF_Element; begin Aux := AMF.Internals.Tables.CMOF_Constructors.Create_CMOF_Comment; AMF.Internals.Extents.Internal_Append (Extent, Aux); end Initialize_30; ------------------- -- Initialize_31 -- ------------------- procedure Initialize_31 (Extent : AMF.Internals.AMF_Extent) is Aux : AMF.Internals.CMOF_Element; begin Aux := AMF.Internals.Tables.CMOF_Constructors.Create_CMOF_Comment; AMF.Internals.Extents.Internal_Append (Extent, Aux); end Initialize_31; ------------------- -- Initialize_32 -- ------------------- procedure Initialize_32 (Extent : AMF.Internals.AMF_Extent) is Aux : AMF.Internals.CMOF_Element; begin Aux := AMF.Internals.Tables.CMOF_Constructors.Create_CMOF_Comment; AMF.Internals.Extents.Internal_Append (Extent, Aux); end Initialize_32; ------------------- -- Initialize_33 -- ------------------- procedure Initialize_33 (Extent : AMF.Internals.AMF_Extent) is Aux : AMF.Internals.CMOF_Element; begin Aux := AMF.Internals.Tables.CMOF_Constructors.Create_CMOF_Comment; AMF.Internals.Extents.Internal_Append (Extent, Aux); end Initialize_33; ------------------- -- Initialize_34 -- ------------------- procedure Initialize_34 (Extent : AMF.Internals.AMF_Extent) is Aux : AMF.Internals.CMOF_Element; begin Aux := AMF.Internals.Tables.CMOF_Constructors.Create_CMOF_Comment; AMF.Internals.Extents.Internal_Append (Extent, Aux); end Initialize_34; ------------------- -- Initialize_35 -- ------------------- procedure Initialize_35 (Extent : AMF.Internals.AMF_Extent) is Aux : AMF.Internals.CMOF_Element; begin Aux := AMF.Internals.Tables.CMOF_Constructors.Create_CMOF_Comment; AMF.Internals.Extents.Internal_Append (Extent, Aux); end Initialize_35; ------------------- -- Initialize_36 -- ------------------- procedure Initialize_36 (Extent : AMF.Internals.AMF_Extent) is Aux : AMF.Internals.CMOF_Element; begin Aux := AMF.Internals.Tables.CMOF_Constructors.Create_CMOF_Comment; AMF.Internals.Extents.Internal_Append (Extent, Aux); end Initialize_36; ------------------- -- Initialize_37 -- ------------------- procedure Initialize_37 (Extent : AMF.Internals.AMF_Extent) is Aux : AMF.Internals.CMOF_Element; begin Aux := AMF.Internals.Tables.CMOF_Constructors.Create_CMOF_Comment; AMF.Internals.Extents.Internal_Append (Extent, Aux); end Initialize_37; ------------------- -- Initialize_38 -- ------------------- procedure Initialize_38 (Extent : AMF.Internals.AMF_Extent) is Aux : AMF.Internals.CMOF_Element; begin Aux := AMF.Internals.Tables.CMOF_Constructors.Create_CMOF_Comment; AMF.Internals.Extents.Internal_Append (Extent, Aux); end Initialize_38; ------------------- -- Initialize_39 -- ------------------- procedure Initialize_39 (Extent : AMF.Internals.AMF_Extent) is Aux : AMF.Internals.CMOF_Element; begin Aux := AMF.Internals.Tables.CMOF_Constructors.Create_CMOF_Comment; AMF.Internals.Extents.Internal_Append (Extent, Aux); end Initialize_39; ------------------- -- Initialize_40 -- ------------------- procedure Initialize_40 (Extent : AMF.Internals.AMF_Extent) is Aux : AMF.Internals.CMOF_Element; begin Aux := AMF.Internals.Tables.CMOF_Constructors.Create_CMOF_Comment; AMF.Internals.Extents.Internal_Append (Extent, Aux); end Initialize_40; ------------------- -- Initialize_41 -- ------------------- procedure Initialize_41 (Extent : AMF.Internals.AMF_Extent) is Aux : AMF.Internals.CMOF_Element; begin Aux := AMF.Internals.Tables.CMOF_Constructors.Create_CMOF_Comment; AMF.Internals.Extents.Internal_Append (Extent, Aux); end Initialize_41; ------------------- -- Initialize_42 -- ------------------- procedure Initialize_42 (Extent : AMF.Internals.AMF_Extent) is Aux : AMF.Internals.CMOF_Element; begin Aux := AMF.Internals.Tables.CMOF_Constructors.Create_CMOF_Comment; AMF.Internals.Extents.Internal_Append (Extent, Aux); end Initialize_42; ------------------- -- Initialize_43 -- ------------------- procedure Initialize_43 (Extent : AMF.Internals.AMF_Extent) is Aux : AMF.Internals.CMOF_Element; begin Aux := AMF.Internals.Tables.CMOF_Constructors.Create_CMOF_Comment; AMF.Internals.Extents.Internal_Append (Extent, Aux); end Initialize_43; ------------------- -- Initialize_44 -- ------------------- procedure Initialize_44 (Extent : AMF.Internals.AMF_Extent) is Aux : AMF.Internals.CMOF_Element; begin Aux := AMF.Internals.Tables.CMOF_Constructors.Create_CMOF_Comment; AMF.Internals.Extents.Internal_Append (Extent, Aux); end Initialize_44; ------------------- -- Initialize_45 -- ------------------- procedure Initialize_45 (Extent : AMF.Internals.AMF_Extent) is Aux : AMF.Internals.CMOF_Element; begin Aux := AMF.Internals.Tables.CMOF_Constructors.Create_CMOF_Property; AMF.Internals.Extents.Internal_Append (Extent, Aux); end Initialize_45; ------------------- -- Initialize_46 -- ------------------- procedure Initialize_46 (Extent : AMF.Internals.AMF_Extent) is Aux : AMF.Internals.CMOF_Element; begin Aux := AMF.Internals.Tables.CMOF_Constructors.Create_CMOF_Comment; AMF.Internals.Extents.Internal_Append (Extent, Aux); end Initialize_46; ------------------- -- Initialize_47 -- ------------------- procedure Initialize_47 (Extent : AMF.Internals.AMF_Extent) is Aux : AMF.Internals.CMOF_Element; begin Aux := AMF.Internals.Tables.CMOF_Constructors.Create_CMOF_Property; AMF.Internals.Extents.Internal_Append (Extent, Aux); end Initialize_47; ------------------- -- Initialize_48 -- ------------------- procedure Initialize_48 (Extent : AMF.Internals.AMF_Extent) is Aux : AMF.Internals.CMOF_Element; begin Aux := AMF.Internals.Tables.CMOF_Constructors.Create_CMOF_Comment; AMF.Internals.Extents.Internal_Append (Extent, Aux); end Initialize_48; ------------------- -- Initialize_49 -- ------------------- procedure Initialize_49 (Extent : AMF.Internals.AMF_Extent) is Aux : AMF.Internals.CMOF_Element; begin Aux := AMF.Internals.Tables.CMOF_Constructors.Create_CMOF_Property; AMF.Internals.Extents.Internal_Append (Extent, Aux); end Initialize_49; ------------------- -- Initialize_50 -- ------------------- procedure Initialize_50 (Extent : AMF.Internals.AMF_Extent) is Aux : AMF.Internals.CMOF_Element; begin Aux := AMF.Internals.Tables.CMOF_Constructors.Create_CMOF_Property; AMF.Internals.Extents.Internal_Append (Extent, Aux); end Initialize_50; ------------------- -- Initialize_51 -- ------------------- procedure Initialize_51 (Extent : AMF.Internals.AMF_Extent) is Aux : AMF.Internals.CMOF_Element; begin Aux := AMF.Internals.Tables.CMOF_Constructors.Create_CMOF_Property; AMF.Internals.Extents.Internal_Append (Extent, Aux); end Initialize_51; ------------------- -- Initialize_52 -- ------------------- procedure Initialize_52 (Extent : AMF.Internals.AMF_Extent) is Aux : AMF.Internals.CMOF_Element; begin Aux := AMF.Internals.Tables.CMOF_Constructors.Create_CMOF_Tag; AMF.Internals.Extents.Internal_Append (Extent, Aux); end Initialize_52; ------------------- -- Initialize_53 -- ------------------- procedure Initialize_53 (Extent : AMF.Internals.AMF_Extent) is Aux : AMF.Internals.CMOF_Element; begin Aux := AMF.Internals.Tables.CMOF_Constructors.Create_CMOF_Tag; AMF.Internals.Extents.Internal_Append (Extent, Aux); end Initialize_53; end AMF.Internals.Tables.DI_Metamodel.Objects;
ada/core/agar-init.ads
charlesdaniels/libagar
0
2200
<reponame>charlesdaniels/libagar ------------------------------------------------------------------------------ -- AGAR CORE LIBRARY -- -- A G A R . I N I T -- -- S p e c -- ------------------------------------------------------------------------------ with Interfaces.C; with Interfaces.C.Strings; package Agar.Init is package C renames Interfaces.C; package CS renames Interfaces.C.Strings; type Agar_Version is limited record Major : C.int; Minor : C.int; Patch : C.int; end record with Convention => C; type Agar_Version_Access is access all Agar_Version with Convention => C; type Atexit_Func_Access is access procedure with Convention => C; -- -- Get the Agar version number. -- procedure Get_Version (Major : out Natural; Minor : out Natural; Patch : out Natural); -- -- Initialize the Agar-Core library. -- function Init_Core (Program_Name : in String; Verbose : in Boolean := False; Create_Directory : in Boolean := False; Software_Timers : in Boolean := False) return Boolean; function Init_Core (Verbose : in Boolean := False; Create_Directory : in Boolean := False; Software_Timers : in Boolean := False) return Boolean; -- -- Set an exit callback routine. -- procedure At_Exit (Callback : Atexit_Func_Access); -- -- Release all resources and exit application. -- procedure Quit with Import, Convention => C, Link_Name => "AG_Quit"; -- -- Release all resources allocated by Agar-Core. -- procedure Destroy with Import, Convention => C, Link_Name => "AG_Destroy"; private use type C.int; use type C.unsigned; procedure AG_GetVersion (Version : Agar_Version_Access) with Import, Convention => C, Link_Name => "AG_GetVersion"; AG_VERBOSE : constant := 16#01#; -- Verbose() to console AG_CREATE_DATADIR : constant := 16#02#; -- Check and create data dir AG_SOFT_TIMERS : constant := 16#04#; -- Force software timing wheel function AG_InitCore (Progname : in CS.chars_ptr; Flags : in C.unsigned) return C.int with Import, Convention => C, Link_Name => "AG_InitCore"; procedure AG_AtExitFunc (Func : in Atexit_Func_Access) with Import, Convention => C, Link_Name => "AG_AtExitFunc"; end Agar.Init;
testData/parse/agda/records.agda
dubinsky/intellij-dtlc
30
4700
<reponame>dubinsky/intellij-dtlc<filename>testData/parse/agda/records.agda -- -- Created by Dependently-Typed Lambda Calculus on 2019-05-15 -- records -- Author: ice10 -- {-# OPTIONS --without-K --safe #-} record List (A : Set) : Set where coinductive field head : A tail : List A open List -- | Bisimulation as equality record _==_ (x : List A) (y : List A) : Set where coinductive field refl-head : head x ≡ head y refl-tail : tail x == tail y open _==_
example/src/clic_ex-commands-tty.adb
alire-project/clic
9
3108
with CLIC.TTY; use CLIC.TTY; with Ada.Text_IO; use Ada.Text_IO; package body CLIC_Ex.Commands.TTY is package TTY renames CLIC.TTY; -------------------- -- Setup_Switches -- -------------------- overriding procedure Setup_Switches (Cmd : in out Instance; Config : in out CLIC.Subcommand.Switches_Configuration) is begin CLIC.Subcommand.Define_Switch (Config, Cmd.Blink'Access, Long_Switch => "--blink"); end Setup_Switches; ------------- -- Execute -- ------------- overriding procedure Execute (Cmd : in out Instance; Args : AAA.Strings.Vector) is begin if not Args.Is_Empty then Put_Line (Cmd.Name & " takes no arguments"); GNAT.OS_Lib.OS_Exit (1); end if; Put_Line (TTY.Bold ("CLIC.TTY.Bold ()")); Put_Line (TTY.Dim ("CLIC.TTY.Dim ()")); Put_Line (TTY.Italic ("CLIC.TTY.Italic ()")); Put_Line (TTY.Underline ("CLIC.TTY.Underline ()")); Put_Line (TTY.Emph ("CLIC.TTY.Emph ()")); Put_Line (TTY.Description ("CLIC.TTY.Description ()")); Put_Line (TTY.Error ("CLIC.TTY.Error ()")); Put_Line (TTY.Warn ("CLIC.TTY.Warn ()")); Put_Line (TTY.Info ("CLIC.TTY.Info ()")); Put_Line (TTY.Success ("CLIC.TTY.Success ()")); Put_Line (TTY.Terminal ("CLIC.TTY.Terminal ()")); Put_Line (TTY.Format (Text => "CLIC.TTY.Format (""," & " Fore => ANSI.Light_Blue, Style => ANSI.Strike)", Fore => ANSI.Light_Blue, Style => ANSI.Strike)); if Cmd.Blink then Put_Line (TTY.Format (Text => "Blinky blink!", Fore => ANSI.Red, Style => ANSI.Blink)); end if; end Execute; end CLIC_Ex.Commands.TTY;
src/firmware-tests/Platform/Smps/EnableDisable/IsEnabledAfterDisabledTest.asm
pete-restall/Cluck2Sesame-Prototype
1
173190
<reponame>pete-restall/Cluck2Sesame-Prototype #include "Platform.inc" #include "FarCalls.inc" #include "Timer0.inc" #include "Smps.inc" #include "TestFixture.inc" radix decimal IsEnabledAfterDisabledTest code global testArrange testArrange: fcall initialiseTimer0 fcall initialiseSmps fcall disableSmps fcall pollSmps fcall enableSmps waitUntilSmpsIsEnabled: fcall pollSmps fcall isSmpsEnabled xorlw 0 btfsc STATUS, Z goto waitUntilSmpsIsEnabled testAct: fcall disableSmps fcall pollSmps testAssert: fcall isSmpsEnabled .aliasWForAssert _a .assert "_a == 0, 'Expected SMPS to be disabled.'" return end
src/SecondOrder/Metavariable.agda
cilinder/formaltt
21
16339
open import Agda.Primitive using (lzero; lsuc; _⊔_) import SecondOrder.Arity import SecondOrder.MContext import SecondOrder.Signature module SecondOrder.Metavariable {ℓ} {𝔸 : SecondOrder.Arity.Arity} (Σ : SecondOrder.Signature.Signature ℓ 𝔸) where open SecondOrder.Signature.Signature Σ open SecondOrder.MContext VContext sort public
terminal_batch_scripts/hello/Hello.g4
SadraGoudarzdashti/IUSTCompiler
3
1716
// Define a grammar called Hello // The same Hello world grammar inside grammars directory grammar Hello; s : 'hello' ID ; // match keyword hello followed by an identifier ID : [a-zA-Z]+ ; // match lower-case identifiers WS : [ \t\r\n]+ -> skip ; // skip spaces, tabs, newlines
audio/music/surfingpikachu.asm
adhi-thirumala/EvoYellow
16
82352
Music_SurfingPikachu_Ch1:: tempo 117 volume 7, 7 duty 3 vibrato 8, 1, 4 notetype 12, 11, 3 octave 3 E_ 6 notetype 12, 11, 2 F# 2 notetype 12, 11, 3 E_ 6 notetype 12, 11, 2 F# 16 rest 2 notetype 12, 11, 3 E_ 6 notetype 12, 11, 2 A_ 2 notetype 12, 11, 3 E_ 6 notetype 12, 11, 2 A_ 14 notetype 12, 11, 2 D# 2 C# 1 D# 1 octave 2 B_ 6 octave 3 E_ 4 E_ 4 E_ 8 G# 4 G# 4 G# 2 Music_SurfingPikachu_branch_82d1a:: notetype 12, 11, 3 octave 3 G# 4 E_ 4 F# 4 E_ 2 A_ 2 G# 2 F# 2 G# 2 F# 2 E_ 2 D# 2 E_ 2 D# 2 C# 6 F# 2 A_ 8 octave 2 B_ 6 octave 3 E_ 2 G# 8 G# 4 E_ 4 F# 4 E_ 2 A_ 2 G# 2 F# 2 G# 2 A_ 2 G# 2 F# 2 E_ 2 G# 2 F# 6 E_ 2 F# 1 rest 3 A_ 4 duty 0 notetype 12, 11, 2 G# 1 F# 1 G# 2 B_ 2 A_ 2 G# 2 F# 2 E_ 2 D# 2 F# 2 F# 2 D# 2 F# 2 B_ 2 A_ 2 G# 2 F# 2 B_ 1 A# 1 B_ 2 G# 2 E_ 2 G# 2 G_ 2 G# 2 A_ 2 octave 4 C# 2 C_ 2 C# 3 octave 3 F# 1 A_ 2 G# 2 F# 2 A_ 2 E_ 3 E_ 1 B_ 2 A_ 2 G# 6 E_ 1 F_ 1 F# 2 F# 2 D# 2 F# 2 B_ 2 A_ 2 G# 2 F# 2 B_ 1 A# 1 B_ 2 G# 2 E_ 2 G# 2 G_ 2 G# 2 A_ 2 octave 4 C# 2 C_ 2 C# 3 octave 3 F# 1 A_ 2 G# 2 A_ 2 octave 4 D# 2 E_ 2 E_ 1 D# 1 E_ 1 D# 1 E_ 1 D# 1 E_ 8 duty 3 loopchannel 0, Music_SurfingPikachu_branch_82d1a Music_SurfingPikachu_Ch2:: duty 3 vibrato 6, 1, 5 notetype 12, 12, 4 octave 3 B_ 6 notetype 12, 12, 2 octave 4 E_ 2 notetype 12, 12, 4 octave 3 B_ 6 notetype 12, 12, 2 octave 4 E_ 2 notetype 12, 11, 2 octave 3 B_ 2 octave 4 C# 2 D# 2 C# 2 octave 3 B_ 2 A_ 2 G# 2 F# 2 notetype 12, 12, 4 octave 4 C# 6 notetype 12, 12, 2 F# 2 notetype 12, 12, 4 C# 6 notetype 12, 12, 2 F# 2 notetype 12, 11, 2 C# 2 D# 2 E_ 2 D# 2 C# 2 octave 3 B_ 2 A_ 2 G# 2 notetype 12, 12, 2 E_ 6 B_ 4 B_ 4 B_ 8 B_ 4 B_ 4 B_ 2 Music_SurfingPikachu_branch_82de0:: notetype 12, 12, 6 octave 4 E_ 4 octave 3 B_ 4 A_ 4 octave 4 C# 4 octave 3 B_ 6 A_ 2 G# 8 F# 6 A_ 2 octave 4 C# 8 octave 3 E_ 6 G# 2 B_ 8 octave 4 E_ 4 octave 3 B_ 4 A_ 4 octave 4 C# 4 octave 3 B_ 6 octave 4 D# 2 E_ 8 D# 6 C# 2 D# 1 rest 3 F# 4 E_ 10 notetype 12, 12, 6 duty 2 E_ 2 D# 2 C# 2 octave 3 B_ 6 octave 4 C# 2 D# 4 octave 3 B_ 4 octave 4 E_ 6 F# 2 G# 8 A_ 6 G# 2 A_ 4 F# 4 G# 10 E_ 2 D# 2 C# 2 octave 3 B_ 6 octave 4 C# 2 D# 4 octave 3 B_ 4 octave 4 E_ 6 F# 2 G# 8 A_ 4 F# 4 D# 4 octave 5 C# 4 octave 4 B_ 8 notetype 12, 12, 2 octave 5 E_ 4 notetype 12, 12, 6 duty 3 octave 3 B_ 1 A# 1 B_ 1 octave 4 C# 1 loopchannel 0, Music_SurfingPikachu_branch_82de0 Music_SurfingPikachu_Ch3:: notetype 12, 1, 0 octave 4 B_ 6 octave 5 C# 1 rest 1 octave 4 B_ 6 octave 5 C# 1 rest 1 octave 4 B_ 1 rest 1 A_ 1 rest 1 G# 1 rest 1 A_ 1 rest 1 B_ 1 rest 1 octave 5 C# 1 rest 1 D# 1 rest 1 C# 1 rest 1 octave 4 A_ 6 octave 5 C# 1 rest 1 octave 4 A_ 6 octave 5 C# 1 rest 1 octave 4 A_ 1 rest 1 G# 1 rest 1 F# 1 rest 1 E_ 1 rest 1 F# 1 rest 1 G# 1 rest 1 A_ 1 rest 1 G# 1 rest 1 E_ 1 rest 1 B_ 1 rest 1 E_ 1 rest 1 B_ 1 rest 1 E_ 1 rest 1 B_ 1 rest 1 E_ 1 rest 1 B_ 1 rest 1 E_ 1 rest 1 B_ 1 rest 1 E_ 1 rest 1 B_ 1 rest 1 E_ 1 rest 1 octave 3 B_ 1 rest 1 octave 4 C# 1 rest 1 D# 1 rest 1 Music_SurfingPikachu_branch_82ea0:: E_ 1 rest 1 B_ 1 rest 1 E_ 1 rest 1 B_ 1 rest 1 E_ 1 rest 1 B_ 1 rest 1 E_ 1 rest 1 B_ 1 rest 1 E_ 1 rest 1 B_ 1 rest 1 E_ 1 rest 1 B_ 1 rest 1 E_ 1 rest 1 B_ 1 rest 1 E_ 1 rest 1 B_ 1 rest 1 F# 1 rest 1 A_ 1 rest 1 F# 1 rest 1 A_ 1 rest 1 F# 1 rest 1 octave 5 C# 1 C_ 1 C# 1 rest 1 octave 4 F# 1 rest 1 E_ 1 rest 1 G# 1 rest 1 E_ 1 rest 1 G# 1 rest 1 E_ 1 rest 1 octave 5 E_ 1 D# 1 E_ 1 rest 1 octave 4 D# 1 rest 1 E_ 1 rest 1 B_ 1 rest 1 E_ 1 rest 1 B_ 1 rest 1 E_ 1 rest 1 B_ 1 rest 1 E_ 1 rest 1 B_ 1 rest 1 E_ 1 rest 1 B_ 1 rest 1 E_ 1 rest 1 B_ 1 rest 1 E_ 1 rest 1 B_ 1 rest 1 E_ 1 rest 1 B_ 1 rest 1 F# 1 rest 1 A_ 1 rest 1 F# 1 rest 1 A_ 1 rest 1 B_ 1 rest 1 A_ 1 rest 1 G# 1 rest 1 F# 1 rest 1 E_ 1 rest 1 B_ 1 rest 1 E_ 1 rest 1 B_ 1 rest 1 E_ 1 rest 1 octave 3 B_ 1 rest 1 octave 4 C# 1 rest 1 D_ 1 rest 1 D# 1 rest 1 F# 1 rest 1 octave 3 B_ 1 rest 1 octave 4 F# 1 rest 1 D# 1 rest 1 F# 1 rest 1 octave 3 B_ 1 rest 1 octave 4 F# 1 rest 1 E_ 1 rest 1 G# 1 rest 1 octave 3 B_ 1 rest 1 octave 4 G# 1 rest 1 E_ 1 rest 1 G# 1 rest 1 octave 3 B_ 1 rest 1 octave 4 G# 1 rest 1 F# 1 rest 1 A_ 1 rest 1 C# 1 rest 1 A_ 1 rest 1 F# 1 rest 1 A_ 1 rest 1 C# 1 rest 1 A_ 1 rest 1 B_ 1 A# 1 B_ 1 rest 1 E_ 1 rest 1 F# 1 rest 1 G# 1 rest 1 octave 3 B_ 1 rest 1 octave 4 C# 1 rest 1 D_ 1 rest 1 D# 1 rest 1 F# 1 rest 1 octave 3 B_ 1 rest 1 octave 4 F# 1 rest 1 D# 1 rest 1 F# 1 rest 1 octave 3 B_ 1 rest 1 octave 4 F# 1 rest 1 E_ 1 rest 1 G# 1 rest 1 octave 3 B_ 1 rest 1 octave 4 G# 1 rest 1 E_ 1 rest 1 G# 1 rest 1 octave 3 B_ 1 rest 1 octave 4 G# 1 rest 1 F# 1 rest 1 A_ 1 rest 1 C# 1 rest 1 A_ 1 rest 1 F# 1 rest 1 A_ 1 rest 1 F# 1 rest 1 D# 1 rest 1 B_ 1 rest 1 B_ 1 rest 1 A_ 1 rest 1 A_ 1 rest 1 G# 1 rest 1 octave 3 B_ 1 rest 1 octave 4 C# 1 rest 1 D# 1 rest 1 loopchannel 0, Music_SurfingPikachu_branch_82ea0
src/main/antlr/net/ninjacat/omg/omql/parser/Omql.g4
uaraven/omg
2
1022
grammar Omql; @header { package net.ninjacat.omg.omql.parser; } filter : sql_stmt EOF ; sql_stmt : select ';'* ; operator : '<' | '<=' | '>' | '>=' | '=' | '!=' | '<>' | '~=' | K_IN ; list : '(' literal_value (',' literal_value)* ')' ; expr : field_name operator literal_value #condition | expr K_AND expr #andExpr | expr K_OR expr #orExpr | K_NOT expr #notExpr | '(' expr ')' # parensExpr | field_name K_IN list # inExpr | field_name K_IN '(' select ')' # matchExpr ; where : K_WHERE expr ; select_clause : K_SELECT '*' K_FROM ; match_clause : K_MATCH ; select : (select_clause | match_clause) source_name where? ; signed_number : ( '+' | '-' )? NUMERIC_LITERAL ; literal_value : signed_number | STRING_LITERAL | boolean_value | K_NULL ; column_alias : IDENTIFIER | STRING_LITERAL ; source_name : CLASS_IDENTIFIER | IDENTIFIER ; field_name : IDENTIFIER | CLASS_IDENTIFIER ; boolean_value : K_TRUE | K_FALSE ; K_AND : A N D; K_AS : A S; K_BETWEEN : B E T W E E N; K_FROM: F R O M; K_IN: I N; K_NOT: N O T; K_NULL: N U L L; K_OR: O R; K_REGEX: R E G E X; K_SELECT: S E L E C T; K_MATCH: M A T C H; K_WHERE : W H E R E; K_TRUE: T R U E; K_FALSE: F A L S E; IDENTIFIER : [a-zA-Z] [a-zA-Z_0-9$]* ; CLASS_IDENTIFIER : [a-zA-Z] [a-zA-Z_0-9$.]* ; NUMERIC_LITERAL : DIGIT+ ( '.' DIGIT* )? ( E [-+]? DIGIT+ )? | '.' DIGIT+ ( E [-+]? DIGIT+ )? ; STRING_LITERAL : '\'' ( ~'\'' | '\'\'' )* '\'' | '"' ( ~'"' | '""' )* '"' ; SINGLE_LINE_COMMENT : '--' ~[\r\n]* -> channel(HIDDEN) ; MULTILINE_COMMENT : '/*' .*? ( '*/' | EOF ) -> channel(HIDDEN) ; SPACES : [ \u000B\t\r\n] -> channel(HIDDEN) ; UNEXPECTED_CHAR : . ; fragment DIGIT : [0-9]; fragment A : [aA]; fragment B : [bB]; fragment C : [cC]; fragment D : [dD]; fragment E : [eE]; fragment F : [fF]; fragment G : [gG]; fragment H : [hH]; fragment I : [iI]; fragment J : [jJ]; fragment K : [kK]; fragment L : [lL]; fragment M : [mM]; fragment N : [nN]; fragment O : [oO]; fragment P : [pP]; fragment Q : [qQ]; fragment R : [rR]; fragment S : [sS]; fragment T : [tT]; fragment U : [uU]; fragment V : [vV]; fragment W : [wW]; fragment X : [xX]; fragment Y : [yY]; fragment Z : [zZ];
test/Fail/Issue4482.agda
shlevy/agda
1,989
3938
-- Andreas, 2020-03-20, issue #4482, reported by gallai -- Precise range for unexpected implicit argument. _ : Set → {A : Set} → {B : Set} → {C : Set} → Set _ = λ { _ {B = B} {A = A} → {!!} } -- Unexpected implicit argument -- when checking the clause left hand side -- .extendedlambda0 _ {B = B} {A = A} -- ^ highlight this
boot/efi_entry.asm
spevans/hello-swift
0
241872
<gh_stars>0 ;;; boot/efi_entry.asm ;;; ;;; Created by <NAME> on 06/02/2016. ;;; Copyright © 2016 <NAME>. All rights reserved. ;;; ;;; Entry point from the UEFI firmware. Calls boot/efi_main.c ;;; to setup the page tables and framebuffer then setups CR3 ;;; and enters kernel at its correct virtual address SECTION .text BITS 64 DEFAULT REL extern efi_main extern _binary_output_kernel_elf_start extern _binary_output_kernel_elf_end global efi_entry global kernel_elf_header global kernel_elf_end global bss_size global efi_call2 global efi_call3 global efi_call4 global efi_call5 global memcpy global memset efi_entry: jmp start ALIGN 8 ;;; Following values are fixedup by efi_patch _bss_size: DQ 0x0 ; Kernel BSS size in bytes start: sub rsp, 0x8 ; ELF requires alignment to 16bytes mov rdi, rcx mov rsi, rdx lea rdx, [pointer_table] lea rcx, [efi_entry] mov [rdx], rcx call efi_main ;; rax holds return status, 0 == EFI_SUCCESS so can process else ;; return to UEFI. ExitBootServices() will have beed called ;; if everything was setup ok test rax, rax jz enter_kernel add rsp, 0x8 ret ; return to UEFI enter_kernel: ;; copy the entry_stub into the last page as that ;; page is mapped in both the identity mapping under ;; UEFI's CR3 and in the kernel's virtual address space ;; under the new CR3 cli lea rsi, [entry_stub] mov rdi, [pointer_table.last_page] mov rbx, rdi lea rcx, [stub_end] sub rcx, rsi rep movsb jmp rbx ; entry_stub copied into last_page kernel_elf_header: lea rax, [_binary_output_kernel_elf_start] ret kernel_elf_end: lea rax, [_binary_output_kernel_elf_end] ret bss_size: mov rax, [_bss_size] ret ;;; Helper functions for efi_main.c ;;; MS Windows ABI calling convention, arguments to UEFI need to be in ;;; RCX, RDX, R8, R9 ;;; Need to reserve space on stack for 4register +8 to keep aligned ;;; to 16bytes ;;; efi_status_t efi_call2(void *func, void *this, void *data); ;;; RDI: Func to call RSI: *This RDX: Data1 efi_call2: sub rsp, 0x28 mov rcx, rsi call rdi add rsp, 0x28 ret ;;; efi_status_t efi_call3(void *func, void *this, void *data1, void *data2); ;;; RDI: func to call RSI: *This, RDX: data1, RCX: data2 ;;; rcx, rdx, r8 efi_call3: sub rsp, 0x28 mov r8, rcx mov rcx, rsi call rdi add rsp, 0x28 ret ;;; rdi, rsi, rdx, rcx, r8, ;;; rcx, rdx, r8, r9 efi_call4: sub rsp, 0x28 mov r9, r8 mov r8, rcx mov rcx, rsi call rdi add rsp, 0x28 ret ;;; rdi, rsi, rdx, rcx, r8, r9 ;;; rcx, rdx, r8, r9, sp[0] efi_call5: sub rsp, 0x28 mov [rsp+32], r9 mov r9, r8 mov r8, rcx mov rcx, rsi call rdi add rsp, 0x28 ret ;;; void *memcpy(void *dest, const void *src, size_t n) ;;; RDI: dest, RSI: src, RDX: count, returns dest memcpy: mov rcx, rdx mov rax, rdi test rdx, rdx jz .exit shr rcx, 3 rep movsq and rdx, 7 mov rcx, rdx rep movsb .exit: ret ;;; void *memset(void *dest, char c, size_t count) ;;; RDI: dest: RSI: c RDX: count memset: mov rax, rdi mov al, sil mov rcx, rdx rep stosb ret ;;; All code below must be relative since it needs to work where it is ;;; loaded by UEFI and also when it has been copied to the last BSS page ;;; of the mapped in kernel. Everything between entry_stop and stub_end ;;; is copied ALIGN 16 entry_stub: mov rax, [pointer_table.pml4] mov cr3, rax ;; Only kernel is mapped in now, no UEFI services ;; reload IDT/GDT since the kernel startup will load selector 0x18 ;; into FS so GDT needs to be valid. This IDT/GDT is only temporary lea rax, [GDT] mov [GDT.address], rax lgdt [GDT.pointer] lidt [IDT.pointer] ;; temporary stack to allow a far jmp, just needs to entries ;; overwrite the earlier code. RSP will be reset after entry ;; to the kernel lea rsp, [entry_stub + 16] ;; fake a jmp dword CODE_SEG:KERNEL_ENTRY which isnt allowed ;; directly in long mode push qword CODE_SEG push qword KERNEL_ENTRY ;; Make RDI -> Virtual address of framebuffer info in the kernel's ;; virtual address space mov r8, KERNEL_VIRTUAL_BASE lea rdi, [framebuffer] mov rsi, [pointer_table.kernel_addr] sub rdi, rsi add rdi, r8 ; Convert address to kernel's virtual mapping mov edx, edi shr rdi, 32 mov ecx, edi ; ECX:EDX => framebuffer info lea rsi, [pointer_table.efi_boot_params] sub rsi, [pointer_table.kernel_addr] ; RSI => efi_boot_params add rsi, r8 mov rdi, rsi shr rdi, 32 ; EDI:ESI => boot params db 0x48 retf IDT: ALIGN 4 .pointer: ;; NULL IDT: 0 base, 0 length dw 0 ; 16bit length dq 0 ; 32bit base address GDT: dq 0x0000000000000000 ; Null descriptor ;; Code descriptor, base=0, limit=0 Present, Ring 0, RO/EX Longmode dq 0x00209A0000000000 ;; Data descriptor, base=0, limit=0 Present, Ring 0, RW Longmode dq 0x0000920000000000 dq 0x0000000000000000 ; Null descriptor .pointer: dw ($ - GDT) - 1 ; 16bit length -1 .address: dq 0 ; 64bit base address ALIGN 8 ;;; These values are setup by efi_main.c - this layout must match ;;; struct efi_boot_params in include/mm.h pointer_table: .image_base DQ 0 .pml4: DQ 0x12345678 .last_page: DQ 0 .efi_boot_params: DQ "EFI" .size DQ 0 .kernel_addr: DQ 0xDEADBEEF .mem_map DQ 0 .mem_map_sz: DQ 0 .mem_map_desc_sz:DQ 0 framebuffer: .address: DQ 0 .size: DQ 0 .width: DD 0 .height: DD 0 .px_per_line: DD 0 .depth: DD 0 .colour_info: DB 0, 0, 0, 0, 0, 0 efi_config_table: .nr_cfg_entries:DQ 0 .config_table: DQ 0 symbol_table: .address: DQ 0 .size: DQ 0 string_table: .address: DQ 0 .size: DQ 0 ALIGN 8 stub_end:
awa/plugins/awa-storages/src/awa-storages-stores-databases.adb
fuzzysloth/ada-awa
81
12213
----------------------------------------------------------------------- -- awa-storages-stores-databases -- Database store -- Copyright (C) 2012, 2015, 2016 <NAME> -- Written by <NAME> (<EMAIL>) -- -- Licensed under the Apache License, Version 2.0 (the "License"); -- you may not use this file except in compliance with the License. -- You may obtain a copy of the License at -- -- http://www.apache.org/licenses/LICENSE-2.0 -- -- Unless required by applicable law or agreed to in writing, software -- distributed under the License is distributed on an "AS IS" BASIS, -- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -- See the License for the specific language governing permissions and -- limitations under the License. ----------------------------------------------------------------------- with Ada.Streams.Stream_IO; with Util.Log.Loggers; package body AWA.Storages.Stores.Databases is Log : constant Util.Log.Loggers.Logger := Util.Log.Loggers.Create ("AWA.Storages.Stores.Files"); -- Create a storage procedure Create (Storage : in Database_Store; Session : in out ADO.Sessions.Master_Session; From : in AWA.Storages.Models.Storage_Ref'Class; Into : in out AWA.Storages.Storage_File) is begin Storage.Tmp.Create (Session, From, Into); end Create; -- ------------------------------ -- Save the file represented by the `Path` variable into a store and associate that -- content with the storage reference represented by `Into`. -- ------------------------------ procedure Save (Storage : in Database_Store; Session : in out ADO.Sessions.Master_Session; Into : in out AWA.Storages.Models.Storage_Ref'Class; Path : in String) is pragma Unreferenced (Storage); Store : AWA.Storages.Models.Storage_Data_Ref; Blob : constant ADO.Blob_Ref := ADO.Create_Blob (Path); begin Log.Info ("Save database file {0}", Path); Store.Set_Data (Blob); Store.Save (Session); Into.Set_File_Size (Natural (Blob.Value.Len)); Into.Set_Store_Data (Store); end Save; procedure Load (Storage : in Database_Store; Session : in out ADO.Sessions.Session'Class; From : in AWA.Storages.Models.Storage_Ref'Class; Into : in out AWA.Storages.Storage_File) is Store : AWA.Storages.Models.Storage_Data_Ref'Class := From.Get_Store_Data; File : Ada.Streams.Stream_IO.File_Type; DB : ADO.Sessions.Master_Session := ADO.Sessions.Master_Session (Session); begin Storage.Tmp.Create (DB, From, Into); Log.Info ("Load database file {0} to {1}", ADO.Identifier'Image (Store.Get_Id), Get_Path (Into)); Store.Load (Session, Store.Get_Id); Ada.Streams.Stream_IO.Create (File => File, Mode => Ada.Streams.Stream_IO.Out_File, Name => Get_Path (Into)); Ada.Streams.Stream_IO.Write (File, Store.Get_Data.Value.Data); Ada.Streams.Stream_IO.Close (File); end Load; -- ------------------------------ -- Delete the content associate with the storage represented by `From`. -- ------------------------------ procedure Delete (Storage : in Database_Store; Session : in out ADO.Sessions.Master_Session; From : in out AWA.Storages.Models.Storage_Ref'Class) is pragma Unreferenced (Storage); Store : AWA.Storages.Models.Storage_Data_Ref'Class := From.Get_Store_Data; begin if not Store.Is_Null then Log.Info ("Delete file {0}", ADO.Identifier'Image (From.Get_Id)); Store.Delete (Session); end if; end Delete; end AWA.Storages.Stores.Databases;
P6/data_P6_2/cal_R_test1.asm
alxzzhou/BUAA_CO_2020
1
15360
<filename>P6/data_P6_2/cal_R_test1.asm<gh_stars>1-10 lui $1,61993 ori $1,$1,6163 lui $2,26347 ori $2,$2,17106 lui $3,22851 ori $3,$3,65334 lui $4,61794 ori $4,$4,28939 lui $5,49020 ori $5,$5,37502 lui $6,56307 ori $6,$6,25349 mthi $1 mtlo $2 sec0: nop nop nop subu $4,$6,$2 sec1: nop nop and $6,$5,$2 subu $6,$6,$2 sec2: nop nop ori $6,$5,45228 subu $6,$6,$2 sec3: nop nop mfhi $6 subu $6,$6,$2 sec4: nop nop lhu $6,12($0) subu $3,$6,$2 sec5: nop subu $6,$2,$3 nop subu $6,$6,$2 sec6: nop xor $6,$1,$2 and $6,$4,$3 subu $0,$6,$2 sec7: nop and $6,$4,$3 addiu $6,$2,-30756 subu $4,$6,$2 sec8: nop or $6,$4,$1 mflo $6 subu $2,$6,$2 sec9: nop and $6,$3,$3 lw $6,0($0) subu $3,$6,$2 sec10: nop lui $6,52262 nop subu $3,$6,$2 sec11: nop sltiu $6,$1,3130 subu $6,$1,$6 subu $1,$6,$2 sec12: nop xori $6,$3,55660 andi $6,$4,23331 subu $5,$6,$2 sec13: nop andi $6,$2,1945 mfhi $6 subu $1,$6,$2 sec14: nop addiu $6,$1,-11855 lw $6,8($0) subu $3,$6,$2 sec15: nop mfhi $6 nop subu $5,$6,$2 sec16: nop mflo $6 sltu $6,$2,$5 subu $2,$6,$2 sec17: nop mflo $6 lui $6,14980 subu $4,$6,$2 sec18: nop mfhi $6 mflo $6 subu $6,$6,$2 sec19: nop mflo $6 lh $6,14($0) subu $6,$6,$2 sec20: nop lbu $6,12($0) nop subu $2,$6,$2 sec21: nop lh $6,4($0) slt $6,$3,$3 subu $3,$6,$2 sec22: nop lb $6,14($0) xori $6,$6,23298 subu $4,$6,$2 sec23: nop lbu $6,0($0) mflo $6 subu $3,$6,$2 sec24: nop lh $6,0($0) lh $6,6($0) subu $6,$6,$2 sec25: sltu $6,$3,$2 nop nop subu $0,$6,$2 sec26: sltu $6,$2,$3 nop and $6,$4,$2 subu $2,$6,$2 sec27: subu $6,$4,$5 nop xori $6,$2,19812 subu $4,$6,$2 sec28: sltu $6,$3,$4 nop mfhi $6 subu $6,$6,$2 sec29: or $6,$3,$3 nop lh $6,14($0) subu $2,$6,$2 sec30: nor $6,$3,$1 sltu $6,$4,$2 nop subu $5,$6,$2 sec31: nor $6,$3,$4 subu $6,$0,$2 slt $6,$2,$2 subu $3,$6,$2 sec32: xor $6,$2,$4 sltu $6,$3,$5 lui $6,57611 subu $2,$6,$2 sec33: and $6,$0,$4 slt $6,$0,$1 mflo $6 subu $3,$6,$2 sec34: subu $6,$4,$3 addu $6,$3,$5 lbu $6,6($0) subu $6,$6,$2 sec35: slt $6,$3,$3 sltiu $6,$0,9276 nop subu $1,$6,$2 sec36: addu $6,$3,$4 lui $6,7318 nor $6,$4,$3 subu $5,$6,$2 sec37: slt $6,$3,$6 andi $6,$3,36796 lui $6,64461 subu $5,$6,$2 sec38: nor $6,$2,$4 addiu $6,$1,5520 mfhi $6 subu $2,$6,$2 sec39: nor $6,$2,$4 lui $6,51809 lb $6,1($0) subu $5,$6,$2 sec40: slt $6,$1,$4 mfhi $6 nop subu $4,$6,$2 sec41: or $6,$5,$4 mflo $6 and $6,$5,$4 subu $0,$6,$2 sec42: addu $6,$1,$2 mfhi $6 lui $6,50560 subu $4,$6,$2 sec43: addu $6,$4,$2 mflo $6 mfhi $6 subu $3,$6,$2 sec44: nor $6,$3,$5 mfhi $6 lhu $6,10($0) subu $6,$6,$2 sec45: subu $6,$3,$1 lbu $6,2($0) nop subu $1,$6,$2 sec46: slt $6,$3,$3 lb $6,3($0) and $6,$3,$5 subu $4,$6,$2 sec47: or $6,$3,$2 lh $6,2($0) ori $6,$6,8786 subu $4,$6,$2 sec48: nor $6,$2,$2 lb $6,7($0) mflo $6 subu $3,$6,$2 sec49: subu $6,$4,$3 lh $6,2($0) lh $6,0($0) subu $3,$6,$2 sec50: lui $6,14370 nop nop subu $1,$6,$2 sec51: andi $6,$3,30851 nop slt $6,$5,$4 subu $3,$6,$2 sec52: xori $6,$2,30448 nop lui $6,39416 subu $4,$6,$2 sec53: xori $6,$1,31458 nop mfhi $6 subu $3,$6,$2 sec54: lui $6,63201 nop lbu $6,11($0) subu $2,$6,$2 sec55: sltiu $6,$4,9236 or $6,$2,$1 nop subu $4,$6,$2 sec56: ori $6,$3,27847 and $6,$4,$2 or $6,$2,$3 subu $5,$6,$2 sec57: addiu $6,$4,-3678 subu $6,$3,$3 lui $6,49953 subu $3,$6,$2 sec58: xori $6,$4,26403 and $6,$3,$2 mflo $6 subu $0,$6,$2 sec59: andi $6,$3,36735 subu $6,$4,$3 lw $6,0($0) subu $2,$6,$2 sec60: lui $6,15705 andi $6,$3,47757 nop subu $4,$6,$2 sec61: sltiu $6,$3,5061 addiu $6,$3,29466 addu $6,$1,$2 subu $3,$6,$2 sec62: lui $6,47220 xori $6,$5,16866 slti $6,$4,-28153 subu $2,$6,$2 sec63: addiu $6,$1,-26762 andi $6,$2,51484 mflo $6 subu $2,$6,$2 sec64: addiu $6,$4,8446 sltiu $6,$4,31238 lhu $6,10($0) subu $1,$6,$2 sec65: xori $6,$1,65120 mflo $6 nop subu $4,$6,$2 sec66: xori $6,$3,5200 mflo $6 slt $6,$3,$1 subu $2,$6,$2 sec67: sltiu $6,$2,10629 mflo $6 ori $6,$4,12923 subu $6,$6,$2 sec68: xori $6,$4,7784 mflo $6 mfhi $6 subu $4,$6,$2 sec69: sltiu $6,$2,4226 mfhi $6 lb $6,4($0) subu $0,$6,$2 sec70: andi $6,$3,23258 lh $6,2($0) nop subu $4,$6,$2 sec71: ori $6,$5,20364 lh $6,10($0) nor $6,$3,$6 subu $4,$6,$2 sec72: addiu $6,$3,-1178 lh $6,12($0) addiu $6,$5,10758 subu $2,$6,$2 sec73: ori $6,$4,22079 lw $6,12($0) mflo $6 subu $4,$6,$2 sec74: slti $6,$5,29961 lw $6,12($0) lw $6,4($0) subu $2,$6,$2 sec75: mfhi $6 nop nop subu $6,$6,$2 sec76: mfhi $6 nop xor $6,$1,$3 subu $0,$6,$2 sec77: mflo $6 nop sltiu $6,$2,14958 subu $2,$6,$2 sec78: mflo $6 nop mflo $6 subu $3,$6,$2 sec79: mflo $6 nop lh $6,10($0) subu $3,$6,$2 sec80: mflo $6 and $6,$0,$1 nop subu $3,$6,$2 sec81: mflo $6 or $6,$2,$3 sltu $6,$2,$5 subu $0,$6,$2 sec82: mflo $6 nor $6,$0,$2 slti $6,$3,-17417 subu $2,$6,$2 sec83: mflo $6 slt $6,$4,$5 mfhi $6 subu $2,$6,$2 sec84: mflo $6 and $6,$4,$2 lw $6,4($0) subu $5,$6,$2 sec85: mflo $6 sltiu $6,$1,17158 nop subu $3,$6,$2 sec86: mflo $6 sltiu $6,$5,-7480 and $6,$4,$5 subu $3,$6,$2 sec87: mflo $6 ori $6,$1,9920 sltiu $6,$4,12536 subu $1,$6,$2 sec88: mfhi $6 sltiu $6,$5,-17136 mflo $6 subu $1,$6,$2 sec89: mflo $6 ori $6,$3,2608 lbu $6,16($0) subu $3,$6,$2 sec90: mfhi $6 mfhi $6 nop subu $5,$6,$2 sec91: mfhi $6 mfhi $6 or $6,$3,$2 subu $2,$6,$2 sec92: mfhi $6 mflo $6 andi $6,$4,30477 subu $2,$6,$2 sec93: mflo $6 mfhi $6 mflo $6 subu $2,$6,$2 sec94: mflo $6 mflo $6 lhu $6,2($0) subu $5,$6,$2 sec95: mflo $6 lh $6,10($0) nop subu $5,$6,$2 sec96: mflo $6 lhu $6,2($0) nor $6,$3,$5 subu $5,$6,$2 sec97: mfhi $6 lbu $6,12($0) lui $6,33369 subu $1,$6,$2 sec98: mfhi $6 lh $6,2($0) mflo $6 subu $2,$6,$2 sec99: mfhi $6 lh $6,4($0) lh $6,8($0) subu $3,$6,$2 sec100: lh $6,10($0) nop nop subu $3,$6,$2 sec101: lh $6,0($0) nop slt $6,$3,$4 subu $4,$6,$2 sec102: lw $6,8($0) nop xori $6,$5,39547 subu $5,$6,$2 sec103: lw $6,16($0) nop mflo $6 subu $3,$6,$2 sec104: lh $6,10($0) nop lb $6,16($0) subu $4,$6,$2 sec105: lw $6,16($0) subu $6,$2,$5 nop subu $1,$6,$2 sec106: lhu $6,14($0) xor $6,$1,$5 or $6,$4,$0 subu $5,$6,$2 sec107: lh $6,4($0) or $6,$4,$0 slti $6,$3,-4910 subu $1,$6,$2 sec108: lb $6,9($0) and $6,$4,$3 mfhi $6 subu $2,$6,$2 sec109: lhu $6,4($0) addu $6,$1,$4 lhu $6,6($0) subu $4,$6,$2 sec110: lw $6,16($0) slti $6,$1,-18526 nop subu $3,$6,$2 sec111: lw $6,4($0) ori $6,$1,10192 xor $6,$2,$2 subu $6,$6,$2 sec112: lbu $6,10($0) lui $6,29952 xori $6,$5,64048 subu $4,$6,$2 sec113: lh $6,8($0) ori $6,$3,11774 mfhi $6 subu $3,$6,$2 sec114: lw $6,12($0) xori $6,$4,34706 lw $6,12($0) subu $0,$6,$2 sec115: lhu $6,4($0) mfhi $6 nop subu $1,$6,$2 sec116: lw $6,16($0) mfhi $6 sltu $6,$4,$3 subu $5,$6,$2 sec117: lhu $6,2($0) mfhi $6 xori $6,$5,17436 subu $1,$6,$2 sec118: lh $6,6($0) mfhi $6 mfhi $6 subu $6,$6,$2 sec119: lb $6,16($0) mflo $6 lhu $6,2($0) subu $3,$6,$2 sec120: lhu $6,12($0) lw $6,16($0) nop subu $1,$6,$2 sec121: lbu $6,13($0) lh $6,8($0) sltu $6,$0,$1 subu $4,$6,$2 sec122: lhu $6,8($0) lh $6,2($0) lui $6,43067 subu $2,$6,$2 sec123: lw $6,16($0) lh $6,16($0) mflo $6 subu $3,$6,$2 sec124: lw $6,8($0) lw $6,0($0) lh $6,14($0) subu $5,$6,$2
tlsf/src/proof/test/util/tlsf-proof-test-util.ads
vasil-sd/ada-tlsf
3
6789
package TLSF.Proof.Test.Util with SPARK_Mode is procedure Test_Util; end TLSF.Proof.Test.Util;
BTA9.agda
luminousfennell/polybta
1
11502
<reponame>luminousfennell/polybta<gh_stars>1-10 module BTA9 where ---------------------------------------------- -- Preliminaries: Imports and List-utilities ---------------------------------------------- open import Data.Nat hiding (_<_;_⊔_;_*_;equal) open import Data.Bool hiding (_∧_;_∨_) open import Function using (_∘_) open import Data.List open import Data.Nat.Properties open import Relation.Nullary open import Relation.Binary.PropositionalEquality open import Data.Empty open import Lib --------------------------------------- -- Start of the development: --------------------------------------- -- Intro/Objective: ------------------- -- The following development defines a (verified) specializer/partial -- evaluator for a simply typed lambda calculus embedded in Agda using -- deBruijn indices. -- The residual language. ------------------------- -- The residual language is a standard simply typed λ-calculus. The -- types are integers,functions,pairs,and sums. data Type : Set where Int : Type Fun : Type → Type → Type --pair type on the residual type level _•_ : Type → Type → Type --sum type on the residual type level _⊎_ : Type → Type → Type Ctx = List Type -- The type Exp describes the typed residual expressions. Variables -- are represented by deBruijn indices that form references into the -- typing context. The constructors and typing constraints are -- standard. -- TODO: citations for ``as usual'' and ``standard'' -- what? data Exp (Γ : Ctx) : Type → Set where EVar : ∀ {τ} → τ ∈ Γ → Exp Γ τ EInt : ℕ → Exp Γ Int EAdd : Exp Γ Int → Exp Γ Int -> Exp Γ Int ELam : ∀ {τ τ'} → Exp (τ ∷ Γ) τ' → Exp Γ (Fun τ τ') EApp : ∀ {τ τ'} → Exp Γ (Fun τ τ') → Exp Γ τ → Exp Γ τ' _,_ : ∀ {τ τ'} → Exp Γ τ → Exp Γ τ' → Exp Γ (τ • τ') Tl : ∀ {τ τ'} → Exp Γ τ → Exp Γ (τ ⊎ τ') Tr : ∀ {τ τ'} → Exp Γ τ' → Exp Γ (τ ⊎ τ') EFst : ∀ {τ τ'} → Exp Γ (τ • τ') → Exp Γ τ ESnd : ∀ {τ τ'} → Exp Γ (τ • τ') → Exp Γ τ' ECase : ∀ {τ τ' τ''} → Exp Γ (τ ⊎ τ') → Exp (τ ∷ Γ) τ'' → Exp (τ' ∷ Γ) τ'' → Exp Γ τ'' -- The standard functional semantics of the residual expressions. -- TODO: citations for ``as usual'' and ``standard'' -- what? module Exp-Eval where -- interpretation of Exp types EImp : Type → Set EImp Int = ℕ EImp (Fun ty ty₁) = EImp ty → EImp ty₁ EImp (ty • ty₁) = EImp ty * EImp ty₁ EImp (ty ⊎ ty₁) = EImp ty ⨄ EImp ty₁ -- Environments containing values for free variables. An environment -- is indexed by a typing context that provides the types for the -- contained values. data Env : Ctx → Set where [] : Env [] _∷_ : ∀ {τ Γ} → EImp τ → Env Γ → Env (τ ∷ Γ) -- Lookup a value in the environment, given a reference into the -- associated typing context. lookupE : ∀ { τ Γ } → τ ∈ Γ → Env Γ → EImp τ lookupE hd (x ∷ env) = x lookupE (tl v) (x ∷ env) = lookupE v env -- Evaluation of residual terms, given a suitably typed environment. ev : ∀ {τ Γ} → Exp Γ τ → Env Γ → EImp τ ev (EVar x) env = lookupE x env ev (EInt x) env = x ev (EAdd e e₁) env = ev e env + ev e₁ env ev (ELam e) env = λ x → ev e (x ∷ env) ev (EApp e e₁) env = ev e env (ev e₁ env) ev (e , e₁) env = ev e env , (ev e₁ env) ev (Tl e) env = tl (ev e env) ev (Tr e) env = tr (ev e env) ev (EFst e) env = fst (ev e env) ev (ESnd e) env = snd (ev e env) ev (ECase e e₁ e₂) env with ev e env ev (ECase e e₁ e₂) env | tl c = (λ x → ev e₁ (x ∷ env)) c ev (ECase e e₁ e₂) env | tr c = (λ x → ev e₂ (x ∷ env)) c -- The binding-time-annotated language. --------------------------------------- -- The type of a term determines the term's binding time. The type -- constructors with an A-prefix denote statically bound integers and -- functions. Terms with dynamic binding time have a `D' type. The `D' -- type constructor simply wraps up a residual type. data AType : Set where AInt : AType AFun : AType → AType → AType D : Type → AType --pair type on the annotated type level _•_ : AType → AType → AType --sum type on the annotated type level _⊎_ : AType → AType → AType ACtx = List AType -- The mapping from annotated types to residual types is straightforward. typeof : AType → Type typeof AInt = Int typeof (AFun α₁ α₂) = Fun (typeof α₁) (typeof α₂) typeof (D x) = x typeof (α₁ • α₂) = typeof α₁ • typeof α₂ typeof (α₁ ⊎ α₂) = typeof α₁ ⊎ typeof α₂ -- The typed annotated terms: The binding times of variables is -- determined by the corresponding type-binding in the context. In the -- other cases, the A- and D-prefixes on term constructors inidicate -- the corresponding binding times for the resulting terms. ------------------------------------------------------------------------------------------------ -- Now the typed annotated terms are extended to inculde dynamic terms whose subterms are static ------------------------------------------------------------------------------------------------ --------------- --Some examples --------------- --a. first-order static value in a dynamic environment -- DAdd (DInt 1) (AAdd (AInt 2) (AInt 3)) where AAdd (AInt 2) (AInt 3) : AExp [] AInt -- DAdd (DInt 1) (AApp (ALam (Var hd)) (AInt 5)) where AApp (ALam (Var hd)) (AInt 5) : AExp [] AInt --b. higher-order static value in a dynamic environment -- DApp (ALam (Var hd)) (DInt 5) where ALam (Var hd) : AExp [] (AFun (D Int) (D Int)) -- DApp (ALam (ALam (AInt 0))) (DInt 5) where ALam (ALam (AInt 0)) : AExp [] (AFun (AFun (D Int) (D Int)) AInt) -- DApp (ALam (ALam (DInt 0))) (DInt 5) where ALam (ALam (DInt 0)) : AExp [] (AFun (AFun AInt (D Int)) (D Int)) --Clearly these terms are not well-typed and we need to modify [AExp] such that they have the right types which are --compatible with the dynamic environment,or we can "lift" their static types to dynamic types so that they can be --used as dynamic sub-terms to be filled in the right dynamic environment. This,however,brings new difficulty when --we try to partially evaluate term who contains "lifted" subterms. ---------------- --new difficulty ---------------- --Consider the evaluation of the following term --DAdd (DInt 1) (Lift (AAdd (AInt 2) (AInt 3))) : AExp [] AInt --the expected type after evaluation is, --EAdd (EInt 1) ? : Exp [] Int where ? : Exp [] Int --and one good candidate for "?" as, --EInt (pe (AAdd (AInt 2) (AInt 3)) []) : Exp [] Int --where we wrap up the partial evaluation of the static subterm so --that it fits with the rest of evaluation. --However,we can not always "wrap up" a evaluated higher-order static --value so that it has the required residual type, --ALam (Var hd) : AExp [] (AFun AInt AInt) --the required type of its lifted term as, --? : Exp [] (Fun Int Int) --which can not be constructed from [λ Γ↝Γ' x → x : []↝Γ' → ℕ → ℕ] --for the input of the static function is evaluated to be a natural --number which can not be matched with the type of the input of the --required residual term. It is then clear that we need to impose --restriction upon terms to be lifted. ------------------------- --restriction for lifting ------------------------- ------------------------------------------------------------- -- The interpretation of annotated types. Imp : Ctx → AType → Set Imp Γ (AInt) = ℕ Imp Γ (AFun α₁ α₂) = ∀ {Γ'} → Γ ↝ Γ' → (Imp Γ' α₁ → Imp Γ' α₂) Imp Γ (D σ) = Exp Γ σ Imp Γ (α₁ • α₂) = (Imp Γ α₁) * (Imp Γ α₂) Imp Γ (α₁ ⊎ α₂) = (Imp Γ α₁) ⨄ (Imp Γ α₂) elevate-var : ∀ {Γ Γ'} {τ : Type} → Γ ↝ Γ' → τ ∈ Γ → τ ∈ Γ' elevate-var ↝-refl x = x elevate-var (↝-extend Γ↝Γ') x = tl (elevate-var Γ↝Γ' x) elevate-var2 : ∀ {Γ Γ' Γ'' τ} → Γ ↝ Γ' ↝ Γ'' → τ ∈ Γ → τ ∈ Γ'' elevate-var2 (↝↝-base x) x₁ = elevate-var x x₁ elevate-var2 (↝↝-extend Γ↝Γ'↝Γ'') hd = hd elevate-var2 (↝↝-extend Γ↝Γ'↝Γ'') (tl x) = tl (elevate-var2 Γ↝Γ'↝Γ'' x) elevate : ∀ {Γ Γ' Γ'' τ} → Γ ↝ Γ' ↝ Γ'' → Exp Γ τ → Exp Γ'' τ elevate Γ↝Γ'↝Γ'' (EVar x) = EVar (elevate-var2 Γ↝Γ'↝Γ'' x) elevate Γ↝Γ'↝Γ'' (EInt x) = EInt x elevate Γ↝Γ'↝Γ'' (EAdd e e₁) = EAdd (elevate Γ↝Γ'↝Γ'' e) (elevate Γ↝Γ'↝Γ'' e₁) elevate Γ↝Γ'↝Γ'' (ELam e) = ELam (elevate (↝↝-extend Γ↝Γ'↝Γ'') e) elevate Γ↝Γ'↝Γ'' (EApp e e₁) = EApp (elevate Γ↝Γ'↝Γ'' e) (elevate Γ↝Γ'↝Γ'' e₁) elevate Γ↝Γ'↝Γ'' (e , e₁) = ((elevate Γ↝Γ'↝Γ'' e) , (elevate Γ↝Γ'↝Γ'' e₁)) elevate Γ↝Γ'↝Γ'' (Tl e) = Tl (elevate Γ↝Γ'↝Γ'' e) elevate Γ↝Γ'↝Γ'' (Tr e) = Tr (elevate Γ↝Γ'↝Γ'' e) elevate Γ↝Γ'↝Γ'' (EFst e) = EFst (elevate Γ↝Γ'↝Γ'' e) elevate Γ↝Γ'↝Γ'' (ESnd e) = ESnd (elevate Γ↝Γ'↝Γ'' e) elevate Γ↝Γ'↝Γ'' (ECase c e₁ e₂) = ECase (elevate Γ↝Γ'↝Γ'' c) (elevate (↝↝-extend Γ↝Γ'↝Γ'') e₁) (elevate (↝↝-extend Γ↝Γ'↝Γ'') e₂) liftE : ∀ {τ Γ Γ'} → Γ ↝ Γ' → Exp Γ τ → Exp Γ' τ liftE Γ↝Γ' e = elevate (↝↝-base Γ↝Γ') e ------------------------------------------------------------- -- --case 1. a first-order static value in a dynamic environment -- lift1 : AExp [] AInt -- lift1 = (AInt 0) -- e1 : Imp [] AInt -- e1 = 0 -- lifted1 : Exp [] (typeof AInt) -- lifted1 = EInt e1 -- --case 2. higher-order static function in a dynamic environment -- --a. a function whose input argument is of static integer -- --lift2 : AExp [] (AFun AInt AInt) -- --lift2 = ALam (Var hd) -- --e2 : Imp [] (AFun AInt AInt) -- --e2 = λ Γ↝Γ' x → x -- --lifted2 : Exp [] (typeof (AFun AInt AInt)) -- --lifted2 = ELam {!!} -- --Note that as explained above it is impossible to construct the right term using [e2] -- --to fill in the above hole! -- --b. a function whose input argument is of dynamic integer -- --b.1. when return type is of dynamic integer -- lift3 : AExp [] (AFun (D Int) (D Int)) -- lift3 = ALam (Var hd) -- e3 : Imp [] (AFun (D Int) (D Int)) -- e3 = λ Γ↝Γ' x → x -- liftede3 : Exp [] (typeof (AFun (D Int) (D Int))) -- liftede3 = ELam (e3 (↝-extend ↝-refl) (EVar hd)) -- --b.2. when return type is of static integer -- lift4 : AExp [] (AFun (D Int) AInt) -- lift4 = ALam (AInt 0) -- e4 : Imp [] (AFun (D Int) AInt) -- e4 = λ Γ↝Γ' x → 0 -- liftede4 : Exp [] (typeof (AFun (D Int) AInt)) -- liftede4 = ELam ( EInt {Int ∷ []} (e4 (↝-extend ↝-refl) (EVar hd))) -- --c. a function whose input argument is of static function type -- --c.1. static function type returns a static integer -- --lift5 : AExp [] (AFun (AFun AInt AInt) AInt) -- --lift5 = ALam (AApp (Var hd) (AInt 0)) -- --e5 : Imp [] (AFun (AFun AInt AInt) AInt) -- --e5 = λ Γ↝Γ' x → x ↝-refl 0 -- --liftede5 : Exp [] (typeof ( AFun (AFun AInt AInt) AInt)) -- --liftede5 = ELam (EInt (e5 (↝-extend {τ = Fun Int Int} ↝-refl) (λ Γ↝Γ' e' → {!!}))) -- --Note that again it is impossible to construct the right residual term -- --c.2. static function type returns a dynamic integer -- --c.2.1. the input of the function type is of static integer -- lift6 : AExp [] (AFun (AFun AInt (D Int)) (D Int)) -- lift6 = ALam (AApp (Var hd) (AInt 0)) -- e6 : Imp [] (AFun (AFun AInt (D Int)) (D Int)) -- e6 = λ Γ↝Γ' x → x ↝-refl 0 -- liftede6 : Exp [] (typeof ( AFun (AFun AInt (D Int)) (D Int))) -- liftede6 = ELam ((e6 (↝-extend {τ = Fun Int Int} ↝-refl) -- (λ Γ↝Γ' e' → EApp (liftE Γ↝Γ' (EVar {Fun Int Int ∷ []} hd)) (EInt e')))) -- --c.2.1. the input of the function type is of dynamic integer -- lift7 : AExp [] (AFun (AFun (D Int) (D Int)) (D Int)) -- lift7 = ALam (AApp (Var hd) (DInt 0)) -- e7 : Imp [] (AFun (AFun (D Int) (D Int)) (D Int)) -- e7 = λ Γ↝Γ' x → x ↝-refl (EInt 0) -- liftede7 : Exp [] (typeof ( AFun (AFun (D Int) (D Int)) (D Int))) -- liftede7 = ELam ((e7 (↝-extend {τ = Fun Int Int} ↝-refl) -- (λ Γ↝Γ' e' → EApp (liftE Γ↝Γ' (EVar {Fun Int Int ∷ []} hd)) e'))) -- --c.3. the output of the function type is of higher-order static value -- --c.3.1 the return value has one static integer as input -- -- lift8 : AExp [] (AFun (D Int) (AFun AInt (D Int))) -- -- lift8 = ALam (ALam (Var (tl hd))) -- -- e8 : Imp [] (AFun (D Int) (AFun AInt (D Int))) -- -- e8 = λ Γ↝Γ' x Γ'↝Γ'' y → liftE Γ'↝Γ'' x -- -- liftede8 : Exp [] (typeof ( AFun (D Int) (AFun AInt (D Int)))) -- -- liftede8 = ELam (ELam (e8 (↝-extend (↝-extend ↝-refl)) (EVar (tl hd)) ↝-refl {!!})) -- --c.3.2 the return value has one dynamic integer as input -- lift9 : AExp [] (AFun (D Int) (AFun (D Int) (D Int))) -- lift9 = ALam (ALam (Var (tl hd))) -- e9 : Imp [] (AFun (D Int) (AFun (D Int) (D Int))) -- e9 = λ Γ↝Γ' x Γ'↝Γ'' y → liftE Γ'↝Γ'' x -- liftede9 : Exp [] (typeof ( AFun (D Int) (AFun (D Int) (D Int)))) -- liftede9 = ELam (ELam (e9 (↝-extend (↝-extend ↝-refl)) (EVar (tl hd)) ↝-refl (EVar hd))) -- --d. static pairs and sums in dynamic environment -- --d.1. identity function with static sum as its input -- lift10 : AExp [] (AFun ((D Int) ⊎ (D Int)) ((D Int) ⊎ (D Int))) -- lift10 = ALam (Var hd) -- e10 : Imp [] (AFun ((D Int) ⊎ (D Int)) ((D Int) ⊎ (D Int))) -- e10 = λ Γ↝Γ' x → x -- liftede10 : Exp [] (typeof (AFun ((D Int) ⊎ (D Int)) ((D Int) ⊎ (D Int)))) -- liftede10 = ELam {!e10!} -- --d.1. identity function with static sum as its input -- lift11 : AExp [] (AFun ((D Int) • (D Int)) ((D Int) • (D Int))) -- lift11 = ALam (Var hd) -- e11 : Imp [] (AFun ((D Int) • (D Int)) ((D Int) • (D Int))) -- e11 = λ Γ↝Γ' x → x -- liftede11 : Exp [] (typeof (AFun ((D Int) • (D Int)) ((D Int) • (D Int)))) -- liftede11 = ELam (fst (e11 (↝-extend ↝-refl) (EFst (EVar hd) , ESnd (EVar hd))) , -- snd (e11 (↝-extend ↝-refl) (EFst (EVar hd) , ESnd (EVar hd)))) --Note that the above two examples in section "d" clearly shows that --"static functions with inputs of static sum type are not liftable -- while with inputs of static pair type are liftable ". --------------------------- --summary on liftable terms --------------------------- --a. Regarding static first-order static value (static integer) in dynamic environment -- All terms of static integer type are liftable --b. Regarding static higher-order static value in dynamic environment --b.1. given that output value is liftable -- • when input is of first-order dynamic type,liftable -- • when input is of higher-order static type and output -- of that input is of dynamic type,liftable --b.2. given that input value is liftable -- • when output is of first-order type,liftable -- • when output is of higher-order type and inputs -- of that type are of dynamic type,liftable ------------------------------------------- --specification of the liftable restriction ------------------------------------------- mutual data Liftable : AType → Set where D : ∀ τ → Liftable (D τ) AInt : Liftable AInt _⊎_ : ∀ {α₁ α₂} → Liftable α₁ → Liftable α₂ → Liftable (α₁ ⊎ α₂) _•_ : ∀ {α₁ α₂} → Liftable α₁ → Liftable α₂ → Liftable (α₁ • α₂) AFun : ∀ {α₁ α₂} → Liftable⁻ α₁ → Liftable α₂ → Liftable (AFun α₁ α₂) data Liftable⁻ : AType → Set where D : ∀ τ → Liftable⁻ (D τ) _•_ : ∀ {α₁ α₂} → Liftable⁻ α₁ → Liftable⁻ α₂ → Liftable⁻ (α₁ • α₂) AFun : ∀ {α₁ α₂} → Liftable α₁ → Liftable⁻ α₂ → Liftable⁻ (AFun α₁ α₂) ---------------------------------------- --[AExp] with liftable terms ---------------------------------------- data AExp (Δ : ACtx) : AType → Set where Var : ∀ {α} → α ∈ Δ → AExp Δ α AInt : ℕ → AExp Δ AInt AAdd : AExp Δ AInt → AExp Δ AInt → AExp Δ AInt ALam : ∀ {α₁ α₂} → AExp (α₁ ∷ Δ) α₂ → AExp Δ (AFun α₁ α₂) AApp : ∀ {α₁ α₂} → AExp Δ (AFun α₂ α₁) → AExp Δ α₂ → AExp Δ α₁ DInt : ℕ → AExp Δ (D Int) DAdd : AExp Δ (D Int) → AExp Δ (D Int) → AExp Δ (D Int) DLam : ∀ {σ₁ σ₂} → AExp ((D σ₁) ∷ Δ) (D σ₂) → AExp Δ (D (Fun σ₁ σ₂)) DApp : ∀ {α₁ α₂} → AExp Δ (D (Fun α₂ α₁)) → AExp Δ (D α₂) → AExp Δ (D α₁) -- Static pairs and sums _,_ : ∀ {α₁ α₂} → AExp Δ α₁ → AExp Δ α₂ → AExp Δ (α₁ • α₂) Tl : ∀ {α₁ α₂} → AExp Δ α₁ → AExp Δ (α₁ ⊎ α₂) Tr : ∀ {α₁ α₂} → AExp Δ α₂ → AExp Δ (α₁ ⊎ α₂) Fst : ∀ {α₁ α₂} → AExp Δ (α₁ • α₂) → AExp Δ α₁ Snd : ∀ {α₁ α₂} → AExp Δ (α₁ • α₂) → AExp Δ α₂ Case : ∀ {α₁ α₂ α₃} → AExp Δ (α₁ ⊎ α₂) → AExp (α₁ ∷ Δ) α₃ → AExp (α₂ ∷ Δ) α₃ → AExp Δ α₃ -- Dynamic pairs and sums _ḋ_ : ∀ {σ₁ σ₂} → AExp Δ (D σ₁) → AExp Δ (D σ₂) → AExp Δ (D (σ₁ • σ₂)) DTl : ∀ {σ₁ σ₂} → AExp Δ (D σ₁) → AExp Δ (D (σ₁ ⊎ σ₂)) DTr : ∀ {σ₁ σ₂} → AExp Δ (D σ₂) → AExp Δ (D (σ₁ ⊎ σ₂)) DFst : ∀ {σ₁ σ₂} → AExp Δ (D (σ₁ • σ₂)) → AExp Δ (D σ₁) DSnd : ∀ {σ₁ σ₂} → AExp Δ (D (σ₁ • σ₂)) → AExp Δ (D σ₂) DCase : ∀ {σ₁ σ₂ σ₃} → AExp Δ (D (σ₁ ⊎ σ₂)) → AExp ((D σ₁) ∷ Δ) (D σ₃) → AExp ((D σ₂) ∷ Δ) (D σ₃) → AExp Δ (D σ₃) -- Liftable static terms ↑ : ∀ {α} → Liftable α → AExp Δ α → AExp Δ (D (typeof α)) -- The terms of AExp assign a binding time to each subterm. For -- program specialization, we interpret terms with dynamic binding -- time as the programs subject to specialization, and their subterms -- with static binding time as statically known inputs. A partial -- evaluation function (or specializer) then compiles the program into -- a residual term for that is specialized for the static inputs. The -- main complication when defining partial evaluation as a total, -- primitively recursive function will be the treatment of the De -- Bruijn variables of non-closed residual expressions. lift : ∀ {Γ Γ'} α → Γ ↝ Γ' → Imp Γ α → Imp Γ' α lift AInt p v = v lift (AFun x x₁) Γ↝Γ' v = λ Γ'↝Γ'' → v (↝-trans Γ↝Γ' Γ'↝Γ'') lift (D x₁) Γ↝Γ' v = elevate (↝↝-base Γ↝Γ') v lift (α₁ • α₂) Γ↝Γ' (v₁ , v₂) = (lift α₁ Γ↝Γ' v₁) , (lift α₂ Γ↝Γ' v₂) lift (α₁ ⊎ α₂) Γ↝Γ' (tl v) = tl (lift α₁ Γ↝Γ' v) lift (α₁ ⊎ α₂) Γ↝Γ' (tr v) = tr (lift α₂ Γ↝Γ' v) module SimpleAEnv where -- A little weaker, but much simpler data AEnv (Γ : Ctx) : ACtx → Set where [] : AEnv Γ [] --cons : ∀ {Δ} (α : AType) → Imp Γ α → AEnv Γ Δ → AEnv Γ (α ∷ Δ) cons : ∀ {Δ} {α : AType} → Imp Γ α → AEnv Γ Δ → AEnv Γ (α ∷ Δ) lookup : ∀ {α Δ Γ} → AEnv Γ Δ → α ∈ Δ → Imp Γ α lookup [] () --lookup {α} (cons .α x aenv) hd = x --lookup {α} (cons .y x aenv) (tl {.α} {y} id) = lookup aenv id lookup {α} (cons x aenv) hd = x lookup {α} (cons x aenv) (tl {.α} {y} id) = lookup aenv id liftEnv : ∀ {Γ Γ' Δ} → Γ ↝ Γ' → AEnv Γ Δ → AEnv Γ' Δ liftEnv Γ↝Γ' [] = [] --liftEnv Γ↝Γ' (cons α x env) = cons α (lift α Γ↝Γ' x) (liftEnv Γ↝Γ' env) liftEnv Γ↝Γ' (cons {α = α} x env) = cons {α = α} (lift α Γ↝Γ' x) (liftEnv Γ↝Γ' env) consD : ∀ {Γ Δ} σ → AEnv Γ Δ → AEnv (σ ∷ Γ) (D σ ∷ Δ) --consD σ env = (cons (D σ) (EVar hd) (liftEnv (↝-extend {τ = σ} ↝-refl) env)) consD σ env = (cons {α = D σ} (EVar hd) (liftEnv (↝-extend {τ = σ} ↝-refl) env)) ---------------------------------------------- -- Helper for the evaluation of liftable terms ---------------------------------------------- mutual lift' : ∀ {Γ α} → Liftable α → Imp Γ α → (Exp Γ (typeof α)) lift' (D τ) v = v lift' AInt v = EInt v lift' (ty ⊎ ty₁) (tl a) = Tl (lift' ty a) lift' (ty ⊎ ty₁) (tr b) = Tr (lift' ty₁ b) lift' (ty • ty₁) (ffst , ssnd) = lift' ty ffst , lift' ty₁ ssnd lift' {Γ} (AFun {α₁} ty₁ ty₂) v = ELam ((λ x → lift' ty₂ (v (↝-extend {τ = typeof α₁} ↝-refl) x)) (embed ty₁ (EVar {Γ = typeof α₁ ∷ Γ} hd))) embed : ∀ {Γ α} → Liftable⁻ α → Exp Γ (typeof α) → (Imp Γ α) embed (D τ) e = e -- embed (ty ⊎ ty₁) e = {! (ECase e (EVar hd) ?)!} -- embed (ty ⊎ ty₁) (EVar x) = {!!} -- embed (ty ⊎ ty₁) (EApp e e₁) = {!!} -- embed (ty ⊎ ty₁) (Tl e) = tl (embed ty e) -- embed (ty ⊎ ty₁) (Tr e) = tr (embed ty₁ e) -- embed (ty ⊎ ty₁) (EFst e) = {!!} -- embed (ty ⊎ ty₁) (ESnd e) = {!!} -- embed (ty ⊎ ty₁) (ECase e e₁ e₂) = {!!} embed (ty • ty₁) e = embed ty (EFst e) , embed ty₁ (ESnd e) embed {Γ} (AFun {α} ty₁ ty₂) e = λ Γ↝Γ' v₁ → embed ty₂ (EApp (liftE Γ↝Γ' e) (lift' ty₁ v₁)) -------------------- -- Partial Evaluator -------------------- pe : ∀ {α Δ Γ} → AExp Δ α → AEnv Γ Δ → Imp Γ α pe (Var x) env = lookup env x pe (AInt x) env = x pe (AAdd e e₁) env = pe e env + pe e₁ env pe (ALam {α} e) env = λ Γ↝Γ' → λ y → pe e (cons {α = α} y (liftEnv Γ↝Γ' env)) pe (AApp e e₁) env = pe e env ↝-refl (pe e₁ env) pe (DInt x) env = EInt x pe (DAdd e e₁) env = EAdd (pe e env) (pe e₁ env) pe (DLam {σ} e) env = ELam (pe e (consD σ env)) pe (DApp e e₁) env = EApp (pe e env) (pe e₁ env) pe {Γ = Γ} (e , e₁) env = pe {Γ = Γ} e env , pe {Γ = Γ} e₁ env pe {α = α₁ ⊎ α₂} {Γ = Γ} (Tl e) env = tl (pe {α = α₁} {Γ = Γ} e env) pe {α = α₁ ⊎ α₂} {Γ = Γ} (Tr e) env = tr (pe {α = α₂} {Γ = Γ} e env) pe {Γ = Γ} (Fst e) env = fst (pe {Γ = Γ} e env) pe {Γ = Γ} (Snd e) env = snd (pe {Γ = Γ} e env) pe {Γ = Γ} (Case e e₁ e₂) env with pe {Γ = Γ} e env pe {Γ = Γ} (Case {α₁ = α} e e₁ e₂) env | tl y = (λ Γ↝Γ' → λ y → pe e₁ (cons {α = α} y (liftEnv Γ↝Γ' env))) ↝-refl y pe {Γ = Γ} (Case {α₂ = α} e e₁ e₂) env | tr y = (λ Γ↝Γ' → λ y → pe e₂ (cons {α = α} y (liftEnv Γ↝Γ' env))) ↝-refl y pe (e ḋ e₁) env = pe e env , pe e₁ env pe (DTl e) env = Tl (pe e env) pe (DTr e) env = Tr (pe e env) pe (DFst e) env = EFst (pe e env) pe (DSnd e) env = ESnd (pe e env) pe (DCase {σ₁} {σ₂} e e₁ e₂) env = ECase (pe e env) (pe e₁ (consD σ₁ env)) (pe e₂ (consD σ₂ env)) pe (↑ x e) env = lift' x (pe e env) -- Correctness proof module Correctness where open SimpleAEnv open Exp-Eval -- TODO: rename occurences of stripα to typeof stripα = typeof stripΔ : ACtx → Ctx stripΔ = map stripα strip-lookup : ∀ { α Δ} → α ∈ Δ → stripα α ∈ stripΔ Δ strip-lookup hd = hd strip-lookup (tl x) = tl (strip-lookup x) strip : ∀ {α Δ} → AExp Δ α → Exp (stripΔ Δ) (stripα α) strip (Var x) = EVar (strip-lookup x) strip (AInt x) = EInt x strip (AAdd e e₁) = EAdd (strip e) (strip e₁) strip (ALam e) = ELam (strip e) strip (AApp e e₁) = EApp (strip e) (strip e₁) strip (DInt x) = EInt x strip (DAdd e e₁) = EAdd (strip e) (strip e₁) strip (DLam e) = ELam (strip e) strip (DApp e e₁) = EApp (strip e) (strip e₁) strip (e , e₁) = strip e , strip e₁ strip (Tl e) = Tl (strip e) strip (Tr e) = Tr (strip e) strip (Fst e) = EFst (strip e) strip (Snd e) = ESnd (strip e) strip (Case e e₁ e₂) = ECase (strip e) (strip e₁) (strip e₂) strip (e ḋ e₁) = strip e , strip e₁ strip (DTl e) = Tl (strip e) strip (DTr e) = Tr (strip e) strip (DFst e) = EFst (strip e) strip (DSnd e) = ESnd (strip e) strip (DCase e e₁ e₂) = ECase (strip e) (strip e₁) (strip e₂) strip (↑ x e) = strip e --liftE : ∀ {τ Γ Γ'} → Γ ↝ Γ' → Exp Γ τ → Exp Γ' τ --liftE Γ↝Γ' e = elevate (↝↝-base Γ↝Γ') e stripLift : ∀ {α Δ Γ} → stripΔ Δ ↝ Γ → AExp Δ α → Exp Γ (stripα α) stripLift Δ↝Γ = liftE Δ↝Γ ∘ strip -- -------------------------------- -- --"lift-strip" equivalence lemma -- -------------------------------- -- ↑≡↓ : ∀ x e env env' aenv → Equiv-Env env' aenv env → ev (lift' x (pe e aenv)) env' ≡ ev (strip e) env -- ↑≡↓ x e env env' aenv eqenv = {!!} -- We want to show that pe preserves the semantics of the -- program. Roughly, Exp-Eval.ev-ing a stripped program is -- equivalent to first pe-ing a program and then Exp-Eval.ev-ing the -- result. But as the pe-result of a static function ``can do more'' -- than the (ev ∘ strip)ped function we need somthing more refined. module Equiv where open import Relation.Binary.PropositionalEquality -- Extending a value environment according to an extension of a -- type environment data _⊢_↝_ {Γ} : ∀ {Γ'} → Γ ↝ Γ' → Env Γ → Env Γ' → Set where refl : ∀ env → ↝-refl ⊢ env ↝ env extend : ∀ {τ Γ' env env'} → {Γ↝Γ' : Γ ↝ Γ'} → (v : EImp τ) → (Γ↝Γ' ⊢ env ↝ env') → ↝-extend {Γ = Γ} {Γ' = Γ'} {τ = τ} Γ↝Γ' ⊢ env ↝ (v ∷ env') env↝trans : ∀ {Γ Γ' Γ''} {Γ↝Γ' : Γ ↝ Γ'} {Γ'↝Γ'' : Γ' ↝ Γ''} {env env' env''} → Γ↝Γ' ⊢ env ↝ env' → Γ'↝Γ'' ⊢ env' ↝ env'' → let Γ↝Γ'' = ↝-trans Γ↝Γ' Γ'↝Γ'' in Γ↝Γ'' ⊢ env ↝ env'' env↝trans {Γ} {.Γ''} {Γ''} {Γ↝Γ'} {.↝-refl} {env} {.env''} {env''} env↝env' (refl .env'') = env↝env' env↝trans env↝env' (extend v env'↝env'') = extend v (env↝trans env↝env' env'↝env'') -- Equivalent Imp Γ α and EImp τ values (where τ = stripα α). As -- (v : Imp Γ α) is not necessarily closed, equivalence is defined for -- the closure (Env Γ, ImpΓ α) Equiv : ∀ {α Γ} → Env Γ → Imp Γ α → EImp (stripα α) → Set Equiv {AInt} env av v = av ≡ v Equiv {AFun α₁ α₂} {Γ} env av v = ∀ {Γ' env' Γ↝Γ'} → (Γ↝Γ' ⊢ env ↝ env') → {av' : Imp Γ' α₁} → {v' : EImp (stripα α₁)} → Equiv {α₁} {Γ'} env' av' v' → Equiv {α₂} env' (av Γ↝Γ' av') (v v') Equiv {D x} env av v = ev av env ≡ v Equiv {α • α₁} env (ffst , ssnd) (ffst₁ , ssnd₁) = (Equiv {α} env ffst ffst₁) ∧ (Equiv {α₁} env ssnd ssnd₁) Equiv {α ⊎ α₁} env (tl a) (tl a₁) = Equiv {α} env a a₁ -------------------------------------------------------------------- Equiv {α ⊎ α₁} env (tl a) (tr b) = ⊥ -- Interesting case! Equiv {α ⊎ α₁} env (tr b) (tl a) = ⊥ -- Interesting case! -------------------------------------------------------------------- Equiv {α ⊎ α₁} env (tr b) (tr b₁) = Equiv {α₁} env b b₁ -- Equiv {AInt} env av v = av ≡ v -- Equiv {AFun α₁ α₂} {Γ} env av v = -- extensional equality, given -- an extended context -- ∀ {Γ' env' Γ↝Γ'} → (Γ↝Γ' ⊢ env ↝ env') → -- {av' : Imp Γ' α₁} → {v' : EImp (stripα α₁)} → -- Equiv env' av' v' → Equiv env' (av Γ↝Γ' av') (v v') -- Equiv {D x} {Γ} env av v = ev av env ≡ v -- actually we mean extensional equality -- TODO: Define a proper equivalence for EImps -- Equivalence of AEnv and Env environments. They need to provide -- Equivalent bindings for a context Δ/stripΔ Δ. Again, the -- equivalence is defined for a closure (Env Γ', AEnv Γ' Δ). data Equiv-Env {Γ' : _} (env' : Env Γ') : ∀ {Δ} → let Γ = stripΔ Δ in AEnv Γ' Δ → Env Γ → Set where [] : Equiv-Env env' [] [] cons : ∀ {α Δ} → let τ = stripα α Γ = stripΔ Δ in {env : Env Γ} → {aenv : AEnv Γ' Δ} → Equiv-Env env' aenv env → (va : Imp (Γ') α) → (v : EImp τ) → Equiv {α} {Γ'} env' va v → --Equiv-Env env' (cons α va (aenv)) (v ∷ env) Equiv-Env env' (cons {α = α} va (aenv)) (v ∷ env) -------------------------------- --"lift-strip" equivalence lemma -------------------------------- -- ↑≡↓ : ∀ {Γ' Δ α} x e env env' aenv → Equiv-Env {Γ'} env' {Δ} aenv env → ev (lift' {Γ = Γ'} {α = α} x (pe e aenv)) env' ≡ ev (strip e) env -- ↑≡↓ x e env env' aenv eqenv = {!!} -- Now for the proof... module Proof where open Equiv open import Relation.Binary.PropositionalEquality -- Extensional equality as an axiom to prove the Equivalence of -- function values. We could (should?) define it locally for -- Equiv. postulate ext : ∀ {τ₁ τ₂} {f g : EImp τ₁ → EImp τ₂} → (∀ x → f x ≡ g x) → f ≡ g -- Ternary helper relation for environment extensions, analogous to _↝_↝_ for contexts data _⊢_↝_↝_⊣ : ∀ { Γ Γ' Γ''} → Γ ↝ Γ' ↝ Γ'' → Env Γ → Env Γ' → Env Γ'' → Set where refl : ∀ {Γ Γ''} {Γ↝Γ'' : Γ ↝ Γ''} { env env'' } → Γ↝Γ'' ⊢ env ↝ env'' → ↝↝-base Γ↝Γ'' ⊢ env ↝ [] ↝ env'' ⊣ extend : ∀ {Γ Γ' Γ'' τ} {Γ↝Γ'↝Γ'' : Γ ↝ Γ' ↝ Γ''} { env env' env'' } → Γ↝Γ'↝Γ'' ⊢ env ↝ env' ↝ env'' ⊣ → (v : EImp τ) → ↝↝-extend {Γ = Γ} {Γ' = Γ'} {Γ'' = Γ''} {τ = τ} Γ↝Γ'↝Γ'' ⊢ (v ∷ env) ↝ (v ∷ env') ↝ (v ∷ env'') ⊣ -- the following lemmas are strong versions of the shifting -- functions, proving that consistent variable renaming preserves -- equivalence (and not just typing). lookup-elevate-≡ : ∀ {τ Γ Γ'} {Γ↝Γ' : Γ ↝ Γ'} {env : Env Γ} {env' : Env Γ'} → Γ↝Γ' ⊢ env ↝ env' → (x : τ ∈ Γ) → lookupE x env ≡ lookupE (elevate-var Γ↝Γ' x) env' lookup-elevate-≡ {τ} {.Γ'} {Γ'} {.↝-refl} {.env'} {env'} (refl .env') x = refl lookup-elevate-≡ (extend v env↝env') x = lookup-elevate-≡ env↝env' x lookup-elevate2-≡ : ∀ {τ Γ Γ' Γ''} {Γ↝Γ'↝Γ'' : Γ ↝ Γ' ↝ Γ''} {env : Env Γ} {env' : Env Γ'} {env'' : Env Γ''} → Γ↝Γ'↝Γ'' ⊢ env ↝ env' ↝ env'' ⊣ → (x : τ ∈ Γ) → lookupE x env ≡ lookupE (elevate-var2 Γ↝Γ'↝Γ'' x) env'' lookup-elevate2-≡ (refl Γ↝Γ') x = lookup-elevate-≡ Γ↝Γ' x lookup-elevate2-≡ (extend env↝env'↝env'' v) hd = refl lookup-elevate2-≡ (extend env↝env'↝env'' _) (tl x) rewrite lookup-elevate2-≡ env↝env'↝env'' x = refl lem-elevate-≡ : ∀ {τ Γ Γ' Γ''} {Γ↝Γ'↝Γ'' : Γ ↝ Γ' ↝ Γ''} {env : Env Γ} {env' : Env Γ'} {env'' : Env Γ''} → Γ↝Γ'↝Γ'' ⊢ env ↝ env' ↝ env'' ⊣ → (e : Exp Γ τ) → ev e env ≡ ev (elevate Γ↝Γ'↝Γ'' e) env'' lem-elevate-≡ env↝env' (EVar x) = lookup-elevate2-≡ env↝env' x lem-elevate-≡ env↝env' (EInt x) = refl lem-elevate-≡ env↝env' (EAdd e e₁) with lem-elevate-≡ env↝env' e | lem-elevate-≡ env↝env' e₁ ... | IA1 | IA2 = cong₂ _+_ IA1 IA2 lem-elevate-≡ {Fun τ₁ τ₂} {Γ↝Γ'↝Γ'' = Γ↝Γ'↝Γ''} {env = env} {env'' = env''} env↝env' (ELam e) = ext {τ₁} {τ₂} lem-elevate-≡-body where lem-elevate-≡-body : ∀ x → ev e (x ∷ env) ≡ ev (elevate (↝↝-extend Γ↝Γ'↝Γ'') e) (x ∷ env'') lem-elevate-≡-body x = lem-elevate-≡ (extend env↝env' x) e lem-elevate-≡ env↝env' (EApp e e₁) with lem-elevate-≡ env↝env' e | lem-elevate-≡ env↝env' e₁ ... | IA1 | IA2 = cong₂ (λ f₁ x → f₁ x) IA1 IA2 lem-elevate-≡ env↝env' (e , e₁) with lem-elevate-≡ env↝env' e | lem-elevate-≡ env↝env' e₁ ... | IA1 | IA2 = cong₂ (λ x y → x , y) IA1 IA2 lem-elevate-≡ env↝env' (Tl e) with lem-elevate-≡ env↝env' e ... | IA = cong (λ x → tl x) IA lem-elevate-≡ env↝env' (Tr e) with lem-elevate-≡ env↝env' e ... | IA = cong (λ x → tr x) IA lem-elevate-≡ env↝env' (EFst e) with lem-elevate-≡ env↝env' e ... | IA = cong (λ x → fst x) IA lem-elevate-≡ env↝env' (ESnd e) with lem-elevate-≡ env↝env' e ... | IA = cong (λ x → snd x) IA lem-elevate-≡ {Γ↝Γ'↝Γ'' = Γ↝Γ'↝Γ''} {env = env} {env'' = env''} env↝env' (ECase e e₁ e₂) with ev e env | ev (elevate Γ↝Γ'↝Γ'' e) env'' | lem-elevate-≡ env↝env' e ... | tl c | tl c' | IA rewrite (→tl {x' = c} {y' = c'} (tl c) (tl c') IA refl refl) = lem-elevate-≡-body c' where lem-elevate-≡-body : ∀ x → ev e₁ (x ∷ env) ≡ ev (elevate (↝↝-extend Γ↝Γ'↝Γ'') e₁) (x ∷ env'') lem-elevate-≡-body x = lem-elevate-≡ (extend env↝env' x) e₁ ... | tl c | tr c' | () ... | tr c | tl c' | () ... | tr c | tr c' | IA rewrite (→tr {x' = c} {y' = c'} (tr c) (tr c') IA refl refl) = lem-elevate-≡-body c' where lem-elevate-≡-body : ∀ x → ev e₂ (x ∷ env) ≡ ev (elevate (↝↝-extend Γ↝Γ'↝Γ'') e₂) (x ∷ env'') lem-elevate-≡-body x = lem-elevate-≡ (extend env↝env' x) e₂ lem-lift-refl-id : ∀ {α Γ} → let τ = stripα α in (env : Env Γ) → (v : EImp τ) (va : Imp Γ α) → Equiv {α} {Γ} env va v → Equiv {α} {Γ} env (lift α ↝-refl va) v lem-lift-refl-id {AInt} env v va eq = eq lem-lift-refl-id {AFun α α₁} {Γ} env v va eq = body where body : ∀ {Γ'} {env' : Env Γ'} {Γ↝Γ' : Γ ↝ Γ'} → Γ↝Γ' ⊢ env ↝ env' → {av' : Imp Γ' α} {v' : EImp (stripα α)} → Equiv {α} {Γ'} env' av' v' → Equiv {α₁} {Γ'} env' (va (↝-trans ↝-refl Γ↝Γ') av') (v v') body {Γ↝Γ' = Γ↝Γ'} env↝env' eq' rewrite sym (lem-↝-refl-id Γ↝Γ') = eq env↝env' eq' lem-lift-refl-id {D x} env v va eq rewrite sym eq = sym (lem-elevate-≡ (refl (refl env)) va) lem-lift-refl-id {α • α₁} env (ffst , ssnd) (ffst₁ , ssnd₁) (∧-intro x x₁) = ∧-intro (lem-lift-refl-id {α} env ffst ffst₁ x) (lem-lift-refl-id {α₁} env ssnd ssnd₁ x₁) lem-lift-refl-id {α ⊎ α₁} env (tl a) (tl a₁) eq = lem-lift-refl-id {α} env a a₁ eq lem-lift-refl-id {α ⊎ α₁} env (tl a) (tr b) () lem-lift-refl-id {α ⊎ α₁} env (tr b) (tl a) () lem-lift-refl-id {α ⊎ α₁} env (tr b) (tr b₁) eq = lem-lift-refl-id {α₁} env b b₁ eq -- lifting an Imp does not affect equivalence lem-lift-equiv : ∀ {α Γ Γ'} → let τ = stripα α in {Γ↝Γ' : Γ ↝ Γ'} → (va : Imp Γ α) (v : EImp τ) → {env : Env Γ} {env' : Env Γ'} → Γ↝Γ' ⊢ env ↝ env' → Equiv {α} {Γ} env va v → Equiv {α} {Γ'} env' (lift α Γ↝Γ' va) v lem-lift-equiv {α} va v {.env'} {env'} (refl .env') eq = lem-lift-refl-id {α} env' v va eq lem-lift-equiv {AInt} va v (extend v₁ env↝env') eq = eq lem-lift-equiv {AFun α α₁} va v (extend v₁ env↝env') eq = λ v₁env₁↝env' eq₁ → eq (env↝trans (extend v₁ env↝env') v₁env₁↝env') eq₁ lem-lift-equiv {D x} va v (extend v₁ env↝env') eq rewrite sym eq = sym (lem-elevate-≡ (refl (extend v₁ env↝env')) va) lem-lift-equiv {α • α₁} (ffst , ssnd) (ffst₁ , ssnd₁) (extend v₁ env↝env') (∧-intro x x₁) = ∧-intro (lem-lift-equiv {α} ffst ffst₁ (extend v₁ env↝env') x) (lem-lift-equiv {α₁} ssnd ssnd₁ (extend v₁ env↝env') x₁) lem-lift-equiv {α ⊎ α₁} (tl a) (tl a₁) (extend v₁ env↝env') eq = lem-lift-equiv {α} a a₁ (extend v₁ env↝env') eq lem-lift-equiv {α ⊎ α₁} (tl a) (tr b) (extend v₁ env↝env') () lem-lift-equiv {α ⊎ α₁} (tr b) (tl a) (extend v₁ env↝env') () lem-lift-equiv {α ⊎ α₁} (tr b) (tr b₁) (extend v₁ env↝env') eq = lem-lift-equiv {α₁} b b₁ (extend v₁ env↝env') eq lem-equiv-lookup : ∀ {α Δ Γ'} → let Γ = stripΔ Δ in { aenv : AEnv Γ' Δ } {env : Env Γ} → (env' : Env Γ') → Equiv-Env env' aenv env → ∀ (x : α ∈ Δ) → Equiv {α} env' (lookup aenv x) (lookupE (strip-lookup x) env) lem-equiv-lookup env' [] () lem-equiv-lookup env' (cons enveq va v eq) hd = eq lem-equiv-lookup env' (cons enveq va v eq) (tl x) = lem-equiv-lookup env' enveq x lem-equiv-env-lift-extend : ∀ {σ Γ' Δ} (env' : Env Γ') → let Γ = stripΔ Δ in {env : Env Γ} {aenv : AEnv Γ' Δ} → Equiv-Env env' aenv env → (x : EImp σ) → Equiv-Env {σ ∷ Γ'} (x ∷ env') (liftEnv (↝-extend ↝-refl) aenv) env lem-equiv-env-lift-extend _ [] x = [] lem-equiv-env-lift-extend env' (cons {α} eqenv va v x) x₁ = cons (lem-equiv-env-lift-extend env' eqenv x₁) (lift α (↝-extend ↝-refl) va) v (lem-lift-equiv {α} va v (extend x₁ (refl env')) x) lem-equiv-env-lift-lift : ∀ {Γ' Γ'' Δ} → let Γ = stripΔ Δ in {Γ↝Γ' : Γ' ↝ Γ''} {env' : Env Γ'} {env'' : Env Γ''} (env'↝env'' : Γ↝Γ' ⊢ env' ↝ env'') → {env : Env Γ} {aenv : AEnv Γ' Δ} → Equiv-Env env' aenv env → Equiv-Env env'' (liftEnv Γ↝Γ' aenv) env lem-equiv-env-lift-lift env'↝env'' [] = [] lem-equiv-env-lift-lift {Γ↝Γ' = Γ↝Γ'} env'↝env'' (cons {α} eqenv va v x) with lem-equiv-env-lift-lift env'↝env'' eqenv ... | IA = cons IA (lift α Γ↝Γ' va) v (lem-lift-equiv {α} va v env'↝env'' x) -------------------------------- --"lift-correct" equivalence lemma -------------------------------- open import Data.Product mutual lift-correct : ∀ {Γ α} (lft : Liftable α) (env : Env Γ) (av : Imp Γ α) (v : EImp (typeof α)) → Equiv {α} {Γ} env av v → (Equiv {D (typeof α)} {Γ} env (lift' lft av) v) lift-correct (D τ) env av v eq = eq lift-correct AInt env av v eq = eq lift-correct (lft ⊎ lft₁) env (tl a) (tl a₁) eq with lift-correct lft env a a₁ ... | IA rewrite IA eq = refl lift-correct (lft ⊎ lft₁) env (tr b) (tl a) () lift-correct (lft ⊎ lft₁) env (tl a) (tr b) () lift-correct (lft ⊎ lft₁) env (tr b) (tr b₁) eq with lift-correct lft₁ env b b₁ ... | IA rewrite IA eq = refl lift-correct (lft • lft₁) env (ffst , ssnd) (ffst₁ , ssnd₁) (∧-intro x x₁) rewrite lift-correct lft env ffst ffst₁ x | lift-correct lft₁ env ssnd ssnd₁ x₁ = refl lift-correct {Γ} {AFun x lft} (AFun y y') env av v eq = ext {typeof x} {typeof lft} (λ x₁ → lift-correct y' (x₁ ∷ env) (av (↝-extend ↝-refl) (embed y (EVar hd))) (v x₁) (eq (extend x₁ (refl env)) (embed-correct {typeof x ∷ Γ} {x} y (x₁ ∷ env) (EVar hd) x₁ refl))) embed-correct : ∀ {Γ α} (lft : Liftable⁻ α) (env : Env Γ) → (e : Exp Γ (typeof α)) → (v : EImp (typeof α)) → ev e env ≡ v → Equiv {α} {Γ} env (embed lft e) v embed-correct (D τ) env e v eq rewrite eq = refl embed-correct (lft • lft₁) env e (fstv , sndv) eq = ∧-intro (embed-correct lft env (EFst e) fstv (subst (λ x → ffst x ≡ fstv) (sym eq) refl)) (embed-correct lft₁ env (ESnd e) sndv (subst (λ x → ssnd x ≡ sndv) (sym eq) refl)) embed-correct {α = AFun α₁ α₂} (AFun x lft) env e v eq = f where f : ∀ {Γ' env' Γ↝Γ'} (x₁ : Γ↝Γ' ⊢ env ↝ env') {x₂ : Imp Γ' α₁} {x₃ : EImp (typeof α₁)} (x₄ : Equiv {α₁} {Γ'} env' x₂ x₃) → Equiv {α₂} {Γ'} env' (embed lft (EApp (elevate (↝↝-base Γ↝Γ') e) (lift' x x₂))) (v x₃) f {Γ'} {env'} {Γext} envext {av'} {v'} eq' = embed-correct lft env' (EApp (elevate (↝↝-base Γext) e) (lift' x av')) (v v') g where g : ev (elevate (↝↝-base Γext) e) env' (ev (lift' x av') env') ≡ v v' g rewrite lift-correct x env' av' v' eq' | sym (cong (λ f → f v') (lem-elevate-≡ (refl envext) e)) | (cong (λ f → f v') eq) = refl --g = {!!} --------------------------------------- --Correctness proof with liftable terms --------------------------------------- -- When we partially evaluate somthing under an environment , it -- will give equivalent results to a ``complete'' evaluation under -- an equivalent environment pe-correct : ∀ { α Δ Γ' } → (e : AExp Δ α) → let Γ = stripΔ Δ in {aenv : AEnv Γ' Δ} → {env : Env Γ} → (env' : Env Γ') → Equiv-Env env' aenv env → Equiv {α} {Γ'} env' (pe e aenv) (ev (strip e) env) pe-correct (Var x) env' eqenv = lem-equiv-lookup env' eqenv x pe-correct (AInt x) env' eqenv = refl pe-correct (AAdd e e₁) env' eqenv rewrite pe-correct e env' eqenv | pe-correct e₁ env' eqenv = refl pe-correct (ALam e) env' eqenv = λ {_} {env''} env'↝env'' {av'} {v'} eq → let eqenv' : _ eqenv' = lem-equiv-env-lift-lift env'↝env'' eqenv eqenv'' : _ eqenv'' = cons eqenv' av' v' eq in pe-correct e env'' eqenv'' pe-correct (AApp e e₁) env' eqenv with pe-correct e env' eqenv | pe-correct e₁ env' eqenv ... | IAe | IAf = IAe (refl env') IAf pe-correct (DInt x) env' eqenv = refl pe-correct (DAdd e e₁) env' eqenv rewrite pe-correct e env' eqenv | pe-correct e₁ env' eqenv = refl pe-correct {α = D (Fun σ₁ σ₂)} (DLam e) env' eqenv = ext {σ₁} {σ₂} (λ x → let eqenv₁ : _ eqenv₁ = lem-equiv-env-lift-extend env' eqenv x eqenv₂ : _ eqenv₂ = cons eqenv₁ (EVar hd) x refl in pe-correct e (x ∷ env') eqenv₂) pe-correct (DApp e e₁) env' eqenv with pe-correct e₁ env' eqenv | pe-correct e env' eqenv ... | IA' | IA = cong₂ (λ f x → f x) IA IA' pe-correct (e , e₁) env' eqenv = ∧-intro (pe-correct e env' eqenv) (pe-correct e₁ env' eqenv) pe-correct (Tl e) env' eqenv = pe-correct e env' eqenv pe-correct (Tr e) env' eqenv = pe-correct e env' eqenv pe-correct (Fst (e , e₁)) env' eqenv = pe-correct e env' eqenv pe-correct (Fst e) {aenv = aenv} {env = env} env' eqenv with pe e aenv | ev (strip e) env | pe-correct e env' eqenv ... | e₁ , e₂ | e₁' , e₂' | ∧-intro A B = A pe-correct (Snd (e , e₁)) env' eqenv = pe-correct e₁ env' eqenv pe-correct (Snd e) {aenv = aenv} {env = env} env' eqenv with pe e aenv | ev (strip e) env | pe-correct e env' eqenv ... | e₁ , e₂ | e₁' , e₂' | ∧-intro A B = B pe-correct {α} (Case e e₁ e₂) {aenv = aenv} {env = env} env' eqenv with pe e aenv | ev (strip e) env | pe-correct e env' eqenv ... | tl c | tl c' | L = pe-correct e₁ {aenv = cons c (liftEnv ↝-refl aenv)} {env = c' ∷ env} env' (cons (lem-equiv-env-lift-lift (refl env') eqenv) c c' L) ... | tr c | tr c' | R = pe-correct e₂ {aenv = cons c (liftEnv ↝-refl aenv)} {env = c' ∷ env} env' (cons (lem-equiv-env-lift-lift (refl env') eqenv) c c' R) ... | tr c | tl c' | () ... | tl c | tr c' | () pe-correct (e ḋ e₁) env' eqenv with pe-correct e env' eqenv | pe-correct e₁ env' eqenv ... | IA | IA' rewrite IA | IA' = refl pe-correct (DTl e) env' eqenv with pe-correct e env' eqenv ... | IA rewrite IA = refl pe-correct (DTr e) env' eqenv with pe-correct e env' eqenv ... | IA rewrite IA = refl pe-correct (DFst e) env' eqenv with pe-correct e env' eqenv ... | IA rewrite IA = refl pe-correct (DSnd e) env' eqenv with pe-correct e env' eqenv ... | IA rewrite IA = refl pe-correct (DCase e e₁ e₂) {aenv = aenv} {env = env} env' eqenv with ev (pe e aenv) env' | ev (strip e) env | pe-correct e env' eqenv ... | tl c | tl c' | IA rewrite (→tl {x' = c} {y' = c'} (tl c) (tl c') IA refl refl) = pe-correct e₁ {aenv = cons (EVar hd) (liftEnv (↝-extend ↝-refl) aenv)} {env = c' ∷ env} (c' ∷ env') (cons (lem-equiv-env-lift-lift (extend c' (refl env')) eqenv) (EVar hd) c' refl) ... | tr c | tr c' | IA rewrite (→tr {x' = c} {y' = c'} (tr c) (tr c') IA refl refl) = pe-correct e₂ {aenv = cons (EVar hd) (liftEnv (↝-extend ↝-refl) aenv)} {env = c' ∷ env} (c' ∷ env') (cons (lem-equiv-env-lift-lift (extend c' (refl env')) eqenv) (EVar hd) c' refl) ... | tl c | tr c' | () ... | tr c | tl c' | () pe-correct (↑ x e) {aenv = aenv} {env = env} env' eqenv with pe-correct e env' eqenv ... | IA = lift-correct x env' (pe e aenv) (ev (strip e) env) IA
src/gen/gstreamer-gst_low_level-gstreamer_0_10_gst_check_gstconsistencychecker_h.ads
persan/A-gst
1
10889
<filename>src/gen/gstreamer-gst_low_level-gstreamer_0_10_gst_check_gstconsistencychecker_h.ads pragma Ada_2005; pragma Style_Checks (Off); pragma Warnings (Off); with Interfaces.C; use Interfaces.C; limited with GStreamer.GST_Low_Level.gstreamer_0_10_gst_gstpad_h; with System; package GStreamer.GST_Low_Level.gstreamer_0_10_gst_check_gstconsistencychecker_h is -- GStreamer -- * -- * unit testing helper lib -- * -- * Copyright (C) 2009 <NAME> <<EMAIL>> -- * -- * This library is free software; you can redistribute it and/or -- * modify it under the terms of the GNU Library General Public -- * License as published by the Free Software Foundation; either -- * version 2 of the License, or (at your option) any later version. -- * -- * This library is distributed in the hope that it will be useful, -- * but WITHOUT ANY WARRANTY; without even the implied warranty of -- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -- * Library General Public License for more details. -- * -- * You should have received a copy of the GNU Library General Public -- * License along with this library; if not, write to the -- * Free Software Foundation, Inc., 59 Temple Place - Suite 330, -- * Boston, MA 02111-1307, USA. -- --* -- * GstStreamConsistency: -- * -- * Opaque consistency checker handle. -- * -- * Since: 0.10.24 -- -- skipped empty struct u_GstStreamConsistency -- skipped empty struct GstStreamConsistency function gst_consistency_checker_new (pad : access GStreamer.GST_Low_Level.gstreamer_0_10_gst_gstpad_h.GstPad) return System.Address; -- gst/check/gstconsistencychecker.h:40 pragma Import (C, gst_consistency_checker_new, "gst_consistency_checker_new"); procedure gst_consistency_checker_reset (consist : System.Address); -- gst/check/gstconsistencychecker.h:42 pragma Import (C, gst_consistency_checker_reset, "gst_consistency_checker_reset"); procedure gst_consistency_checker_free (consist : System.Address); -- gst/check/gstconsistencychecker.h:44 pragma Import (C, gst_consistency_checker_free, "gst_consistency_checker_free"); end GStreamer.GST_Low_Level.gstreamer_0_10_gst_check_gstconsistencychecker_h;
oeis/165/A165972.asm
neoneye/loda-programs
11
25650
; A165972: Nonprimes k such that the sum of the smallest and largest divisor of k is prime. ; Submitted by <NAME>(s1) ; 1,4,6,10,12,16,18,22,28,30,36,40,42,46,52,58,60,66,70,72,78,82,88,96,100,102,106,108,112,126,130,136,138,148,150,156,162,166,172,178,180,190,192,196,198,210,222,226,228,232,238,240,250,256,262,268,270,276 seq $0,5097 ; (Odd primes - 1)/2. add $1,$0 min $1,2 mul $1,$0 mov $0,$1
untested/ARM/nextPowerOf2.asm
GabrielRavier/Generic-Assembly-Samples
0
12966
<gh_stars>0 code32 format ELF public _nextPowerOf2 public _nextPowerOf264 section '.text' executable align 16 _nextPowerOf2: cmp r0, #0 beq .return1 sub r3, r0, #1 tst r3, r0 bxeq lr mov r2, #0 .loop: add r1, r2, #1 lsrs r0, r0, #1 and r2, r1, #0xFF bne .loop mov r0, #1 lsl r0, r0, r2 bx lr .return1: mov r0, #1 bx lr _nextPowerOf264: orrs r3, r0, r1 beq .return1 str fp, [sp, #-4] subs fp, r0, #1 sbc ip, r1, #0 and r2, fp, r0 and r3, fp, r1 orrs r3, r2, r3 beq .return mov r2, #0 .loop: movs r1, r1, lsr #1 mov r0, r0, rrx add r3, r2, #1 orrs r2, r0, r1 and r2, r3, #0xFF bne .loop mov r0, #1 lsl r0, r0, r2 asr r1, r0, #31 .return: ldr fp, [sp], #4 bx lr .return1: mov r0, #1 mov r1, #0 bx lr
oeis/021/A021365.asm
neoneye/loda-programs
11
94972
<gh_stars>10-100 ; A021365: Decimal expansion of 1/361. ; 0,0,2,7,7,0,0,8,3,1,0,2,4,9,3,0,7,4,7,9,2,2,4,3,7,6,7,3,1,3,0,1,9,3,9,0,5,8,1,7,1,7,4,5,1,5,2,3,5,4,5,7,0,6,3,7,1,1,9,1,1,3,5,7,3,4,0,7,2,0,2,2,1,6,0,6,6,4,8,1,9,9,4,4,5,9,8,3,3,7,9,5,0,1,3,8,5,0,4 seq $0,173833 ; 10^n - 3. div $0,361 mod $0,10
libsrc/target/x1/stdio/generic_console_ioctl.asm
Frodevan/z88dk
640
13068
<reponame>Frodevan/z88dk MODULE generic_console_ioctl PUBLIC generic_console_ioctl SECTION code_clib INCLUDE "ioctl.def" EXTERN generic_console_cls EXTERN generic_console_font32 EXTERN generic_console_udg32 EXTERN asm_load_charset EXTERN __x1_mode EXTERN __x1_pcg_mode EXTERN __console_w EXTERN set_crtc_10 INCLUDE "target/mc1000/def/mc1000.def" PUBLIC CLIB_GENCON_CAPS defc CLIB_GENCON_CAPS = CAP_GENCON_FG_COLOUR | CAP_GENCON_CUSTOM_FONT | CAP_GENCON_UDGS ; a = ioctl ; de = arg generic_console_ioctl: ex de,hl ld c,(hl) ;bc = where we point to inc hl ld b,(hl) cp IOCTL_GENCON_SET_FONT32 jr nz,check_set_udg ld (generic_console_font32),bc ld l,c ld h,b ld b,96 ld c,32 ld e,1 call set_pcg_chars success: and a ret check_set_udg: cp IOCTL_GENCON_SET_UDGS jr nz,check_mode ld (generic_console_udg32),bc ld l,c ld h,b ld b,128 ld c,128 ld e,2 call set_pcg_chars jr success check_mode: cp IOCTL_GENCON_SET_MODE jr nz,failure ld a,c ld c,$f0 ld de,$1928 ;rows cols ld hl,text40 and a jr z,set_mode ld c,$b0 ld de,$1950 ld hl,text80 cp 1 jr nz,failure set_mode: push bc ld (__x1_mode),a ld (__console_w),de call set_crtc_10 pop de ld bc,$1a03 ld a,$82 out (c),a dec bc out (c),e call generic_console_cls jr success failure: scf dummy_return: ret set_pcg_chars: ld a,h or l jr z,clear_mode ld a,(__x1_pcg_mode) or e ld (__x1_pcg_mode),a call asm_load_charset ret clear_mode: ld a,e cpl ld hl,__x1_pcg_mode and (hl) ld (hl),a ret SECTION rodata_clib text40: defb 37h, 28h, 2Dh, 34h, 1Fh, 02h, 19h, 1Ch, 00h, 07h text80: defb 6Fh, 50h, 59h, 38h, 1Fh, 02h, 19h, 1Ch, 00h, 07h
programs/oeis/000/A000125.asm
karttu/loda
1
176776
<reponame>karttu/loda<filename>programs/oeis/000/A000125.asm ; A000125: Cake numbers: maximal number of pieces resulting from n planar cuts through a cube (or cake): C(n+1,3)+n+1. ; 1,2,4,8,15,26,42,64,93,130,176,232,299,378,470,576,697,834,988,1160,1351,1562,1794,2048,2325,2626,2952,3304,3683,4090,4526,4992,5489,6018,6580,7176,7807,8474,9178,9920,10701,11522,12384,13288,14235,15226,16262,17344,18473,19650,20876,22152,23479,24858,26290,27776,29317,30914,32568,34280,36051,37882,39774,41728,43745,45826,47972,50184,52463,54810,57226,59712,62269,64898,67600,70376,73227,76154,79158,82240,85401,88642,91964,95368,98855,102426,106082,109824,113653,117570,121576,125672,129859,134138,138510,142976,147537,152194,156948,161800,166751,171802,176954,182208,187565,193026,198592,204264,210043,215930,221926,228032,234249,240578,247020,253576,260247,267034,273938,280960,288101,295362,302744,310248,317875,325626,333502,341504,349633,357890,366276,374792,383439,392218,401130,410176,419357,428674,438128,447720,457451,467322,477334,487488,497785,508226,518812,529544,540423,551450,562626,573952,585429,597058,608840,620776,632867,645114,657518,670080,682801,695682,708724,721928,735295,748826,762522,776384,790413,804610,818976,833512,848219,863098,878150,893376,908777,924354,940108,956040,972151,988442,1004914,1021568,1038405,1055426,1072632,1090024,1107603,1125370,1143326,1161472,1179809,1198338,1217060,1235976,1255087,1274394,1293898,1313600,1333501,1353602,1373904,1394408,1415115,1436026,1457142,1478464,1499993,1521730,1543676,1565832,1588199,1610778,1633570,1656576,1679797,1703234,1726888,1750760,1774851,1799162,1823694,1848448,1873425,1898626,1924052,1949704,1975583,2001690,2028026,2054592,2081389,2108418,2135680,2163176,2190907,2218874,2247078,2275520,2304201,2333122,2362284,2391688,2421335,2451226,2481362,2511744,2542373,2573250 add $0,1 mov $1,$0 bin $1,3 add $1,$0
tests/natools-s_expressions-parsers-tests.adb
faelys/natools
0
16921
<filename>tests/natools-s_expressions-parsers-tests.adb<gh_stars>0 ------------------------------------------------------------------------------ -- Copyright (c) 2014-2017, <NAME> -- -- -- -- Permission to use, copy, modify, and distribute this software for any -- -- purpose with or without fee is hereby granted, provided that the above -- -- copyright notice and this permission notice appear in all copies. -- -- -- -- THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES -- -- WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF -- -- MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR -- -- ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES -- -- WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN -- -- ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF -- -- OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. -- ------------------------------------------------------------------------------ with Natools.S_Expressions.Lockable.Tests; with Natools.S_Expressions.Printers; with Natools.S_Expressions.Test_Tools; package body Natools.S_Expressions.Parsers.Tests is generic Name : String; Source, Expected : Atom; procedure Blackbox_Test (Report : in out NT.Reporter'Class); -- Perform a simple blackbox test, feeding Source to a new parser -- plugged on a canonical printer and comparing with Expected. ------------------------------ -- Local Helper Subprograms -- ------------------------------ procedure Blackbox_Test (Report : in out NT.Reporter'Class) is Test : NT.Test := Report.Item (Name); begin declare Input, Output : aliased Test_Tools.Memory_Stream; Printer : Printers.Canonical (Output'Access); Parser : Parsers.Stream_Parser (Input'Access); begin Output.Set_Expected (Expected); Input.Set_Data (Source); Parser.Next; Printers.Transfer (Parser, Printer); Output.Check_Stream (Test); end; exception when Error : others => Test.Report_Exception (Error); end Blackbox_Test; ------------------------- -- Complete Test Suite -- ------------------------- procedure All_Tests (Report : in out NT.Reporter'Class) is begin Canonical_Encoding (Report); Atom_Encodings (Report); Base64_Subexpression (Report); Special_Subexpression (Report); Nested_Subpexression (Report); Number_Prefixes (Report); Quoted_Escapes (Report); Lockable_Interface (Report); Reset (Report); Locked_Next (Report); Memory_Parser (Report); Close_Current_List (Report); end All_Tests; ----------------------- -- Inidividual Tests -- ----------------------- procedure Atom_Encodings (Report : in out NT.Reporter'Class) is procedure Test is new Blackbox_Test (Name => "Basic atom encodings", Source => To_Atom ("17:Verbatim encoding" & """Quoted\040string""" & "#48657861646563696d616c2064756d70#" & "token " & "|QmFzZS02NCBlbmNvZGluZw==|"), Expected => To_Atom ("17:Verbatim encoding" & "13:Quoted string" & "16:Hexadecimal dump" & "5:token" & "16:Base-64 encoding")); begin Test (Report); end Atom_Encodings; procedure Base64_Subexpression (Report : in out NT.Reporter'Class) is procedure Test is new Blackbox_Test (Name => "Base-64 subexpression", Source => To_Atom ("head({KDc6c3VibGlzdCk1OnRva2Vu})""tail"""), Expected => To_Atom ("4:head((7:sublist)5:token)4:tail")); begin Test (Report); end Base64_Subexpression; procedure Canonical_Encoding (Report : in out NT.Reporter'Class) is Sample_Image : constant String := "3:The(5:quick((5:brown3:fox)5:jumps))9:over3:the()4:lazy0:3:dog"; procedure Test is new Blackbox_Test (Name => "Canonical encoding", Source => To_Atom (Sample_Image), Expected => To_Atom (Sample_Image)); begin Test (Report); end Canonical_Encoding; procedure Close_Current_List (Report : in out NT.Reporter'Class) is Test : NT.Test := Report.Item ("Close_Current_List primitive"); begin declare Input : aliased Test_Tools.Memory_Stream; Parser : Parsers.Stream_Parser (Input'Access); begin Input.Set_Data (To_Atom ("3:The(5:quick((5:brown3:fox)5:jumps))" & "(4:over()3:the)4:lazy(0:3:dog)3:the3:end")); Test_Tools.Next_And_Check (Test, Parser, To_Atom ("The"), 0); Test_Tools.Next_And_Check (Test, Parser, Events.Open_List, 1); Test_Tools.Next_And_Check (Test, Parser, To_Atom ("quick"), 1); Test_Tools.Next_And_Check (Test, Parser, Events.Open_List, 2); Parser.Close_Current_List; Test_Tools.Next_And_Check (Test, Parser, Events.Close_List, 0); Test_Tools.Next_And_Check (Test, Parser, Events.Open_List, 1); Test_Tools.Next_And_Check (Test, Parser, To_Atom ("over"), 1); Test_Tools.Next_And_Check (Test, Parser, Events.Open_List, 2); Test_Tools.Next_And_Check (Test, Parser, Events.Close_List, 1); Parser.Close_Current_List; Test_Tools.Next_And_Check (Test, Parser, To_Atom ("lazy"), 0); Test_Tools.Next_And_Check (Test, Parser, Events.Open_List, 1); Test_Tools.Next_And_Check (Test, Parser, To_Atom (""), 1); Parser.Close_Current_List; Test_Tools.Next_And_Check (Test, Parser, To_Atom ("the"), 0); Parser.Close_Current_List; Check_Last_Event : declare Last_Event : constant Events.Event := Parser.Current_Event; begin if Last_Event /= Events.End_Of_Input then Test.Fail ("Unexpected last event " & Events.Event'Image (Last_Event)); end if; end Check_Last_Event; Parser.Close_Current_List; Check_Byeond_Last_Event : declare Last_Event : constant Events.Event := Parser.Current_Event; begin if Last_Event /= Events.End_Of_Input then Test.Fail ("Unexpected bayond-last event " & Events.Event'Image (Last_Event)); end if; end Check_Byeond_Last_Event; end; exception when Error : others => Test.Report_Exception (Error); end Close_Current_List; procedure Lockable_Interface (Report : in out NT.Reporter'Class) is Test : NT.Test := Report.Item ("Lockable.Descriptor interface"); begin declare Input : aliased Test_Tools.Memory_Stream; Parser : Parsers.Stream_Parser (Input'Access); begin Input.Set_Data (Lockable.Tests.Test_Expression); Test_Tools.Next_And_Check (Test, Parser, Events.Open_List, 1); Lockable.Tests.Test_Interface (Test, Parser); end; exception when Error : others => Test.Report_Exception (Error); end Lockable_Interface; procedure Locked_Next (Report : in out NT.Reporter'Class) is Test : NT.Test := Report.Item ("Next on locked parser"); begin declare Input : aliased Test_Tools.Memory_Stream; Parser : Parsers.Stream_Parser (Input'Access); Lock_State : Lockable.Lock_State; begin Input.Set_Data (To_Atom ("(command (subcommand arg (arg list)))0:")); Test_Tools.Next_And_Check (Test, Parser, Events.Open_List, 1); Test_Tools.Next_And_Check (Test, Parser, To_Atom ("command"), 1); Test_Tools.Next_And_Check (Test, Parser, Events.Open_List, 2); Test_Tools.Next_And_Check (Test, Parser, To_Atom ("subcommand"), 2); Parser.Lock (Lock_State); Test_Tools.Test_Atom_Accessors (Test, Parser, To_Atom ("subcommand"), 0); Test_Tools.Next_And_Check (Test, Parser, To_Atom ("arg"), 0); Test_Tools.Next_And_Check (Test, Parser, Events.Open_List, 1); Test_Tools.Next_And_Check (Test, Parser, To_Atom ("arg"), 1); Test_Tools.Next_And_Check (Test, Parser, To_Atom ("list"), 1); Test_Tools.Next_And_Check (Test, Parser, Events.Close_List, 0); Test_Tools.Next_And_Check (Test, Parser, Events.End_Of_Input, 0); Test_Tools.Next_And_Check (Test, Parser, Events.End_Of_Input, 0); Test_Tools.Next_And_Check (Test, Parser, Events.End_Of_Input, 0); Parser.Unlock (Lock_State); Test_Tools.Next_And_Check (Test, Parser, Events.Close_List, 0); Test_Tools.Next_And_Check (Test, Parser, Null_Atom, 0); end; exception when Error : others => Test.Report_Exception (Error); end Locked_Next; procedure Memory_Parser (Report : in out NT.Reporter'Class) is Test : NT.Test := Report.Item ("Memory-backed parser"); begin declare Parser : Parsers.Memory_Parser := Create_From_String ("(command (subcommand arg (arg list)))0:"); begin Test_Tools.Next_And_Check (Test, Parser, Events.Open_List, 1); Test_Tools.Next_And_Check (Test, Parser, To_Atom ("command"), 1); Test_Tools.Next_And_Check (Test, Parser, Events.Open_List, 2); Test_Tools.Next_And_Check (Test, Parser, To_Atom ("subcommand"), 2); Test_Tools.Next_And_Check (Test, Parser, To_Atom ("arg"), 2); Test_Tools.Next_And_Check (Test, Parser, Events.Open_List, 3); Test_Tools.Next_And_Check (Test, Parser, To_Atom ("arg"), 3); Test_Tools.Next_And_Check (Test, Parser, To_Atom ("list"), 3); Test_Tools.Next_And_Check (Test, Parser, Events.Close_List, 2); Test_Tools.Next_And_Check (Test, Parser, Events.Close_List, 1); Test_Tools.Next_And_Check (Test, Parser, Events.Close_List, 0); Test_Tools.Next_And_Check (Test, Parser, Null_Atom, 0); Test_Tools.Next_And_Check (Test, Parser, Events.End_Of_Input, 0); Test_Tools.Next_And_Check (Test, Parser, Events.End_Of_Input, 0); end; exception when Error : others => Test.Report_Exception (Error); end Memory_Parser; procedure Nested_Subpexression (Report : in out NT.Reporter'Class) is procedure Test is new Blackbox_Test (Name => "Nested base-64 subepxressions", Source => To_Atom ("(5:begin" & "{KG5lc3RlZCB7S0dSbFpYQWdjR0Y1Ykc5aFpDaz19KQ==}" & "end)"), Expected => To_Atom ("(5:begin" & "(6:nested(4:deep7:payload))" & "3:end)")); begin Test (Report); end Nested_Subpexression; procedure Number_Prefixes (Report : in out NT.Reporter'Class) is procedure Test is new Blackbox_Test (Name => "Number prefixes", Source => To_Atom ("8:verbatim" & "(valid 6""quoted"" 11#68657861646563696d616c#" & " 7|YmFzZS02NA==| 9{NzpleHByLTY0})" & "(undefined 42 10% 123() 10)" & "(invalid 10""quoted"" 3#68657861646563696d616c#" & " 75|YmFzZS02NA==| 1{NzpleHByLTY0})"), Expected => To_Atom ("8:verbatim" & "(5:valid6:quoted11:hexadecimal7:base-647:expr-64)" & "(9:undefined2:423:10%3:123()2:10)" & "(7:invalid6:quoted11:hexadecimal7:base-647:expr-64)")); begin Test (Report); end Number_Prefixes; procedure Quoted_Escapes (Report : in out NT.Reporter'Class) is CR : constant Character := Character'Val (13); LF : constant Character := Character'Val (10); procedure Test is new Blackbox_Test (Name => "Escapes in quoted encoding", Source => To_Atom ("(single-letters ""\b\t\n\v\f\r\\\k"")" & "(newlines ""head\" & CR & "tail"" ""head\" & LF & "tail""" & " ""head\" & CR & LF & "tail"" ""head\" & LF & CR & "tail"")" & "(octal ""head\040\04\xtail"")" & "(hexadecimal ""head\x20\x2a\x2D\x2gtail"")" & "(special ""\x""1:"")"), Expected => To_Atom ("(14:single-letters9:" & Character'Val (8) & Character'Val (9) & Character'Val (10) & Character'Val (11) & Character'Val (12) & Character'Val (13) & "\\k)" & "(8:newlines8:headtail8:headtail8:headtail8:headtail)" & "(5:octal14:head \04\xtail)" & "(11:hexadecimal15:head *-\x2gtail)" & "(7:special2:\x1:"")")); begin Test (Report); end Quoted_Escapes; procedure Reset (Report : in out NT.Reporter'Class) is Test : NT.Test := Report.Item ("Parser reset"); begin declare Input : aliased Test_Tools.Memory_Stream; Parser : Parsers.Stream_Parser (Input'Access); Empty : Parsers.Stream_Parser (Input'Access); use type Atom_Buffers.Atom_Buffer; use type Lockable.Lock_Stack; begin Input.Write (To_Atom ("(begin(first second")); Test_Tools.Next_And_Check (Test, Parser, Events.Open_List, 1); Test_Tools.Next_And_Check (Test, Parser, To_Atom ("begin"), 1); Test_Tools.Next_And_Check (Test, Parser, Events.Open_List, 2); Test_Tools.Next_And_Check (Test, Parser, To_Atom ("first"), 2); Test_Tools.Next_And_Check (Test, Parser, Events.End_Of_Input, 2); Parser.Reset (Hard => False); Input.Write (To_Atom ("other(new list)end")); Test_Tools.Next_And_Check (Test, Parser, To_Atom ("other"), 0); Test_Tools.Next_And_Check (Test, Parser, Events.Open_List, 1); Test_Tools.Next_And_Check (Test, Parser, To_Atom ("new"), 1); Test_Tools.Next_And_Check (Test, Parser, To_Atom ("list"), 1); Test_Tools.Next_And_Check (Test, Parser, Events.Close_List, 0); Parser.Reset (Hard => True); if Parser.Internal /= Empty.Internal or else Parser.Next_Event /= Empty.Next_Event or else Parser.Latest /= Empty.Latest or else Parser.Pending.Capacity /= 0 or else Parser.Buffer.Capacity /= 0 or else Parser.Level /= Empty.Level or else Parser.Lock_Stack /= Empty.Lock_Stack or else Parser.Locked /= Empty.Locked then Test.Fail ("Parser after hard reset is not empty"); end if; end; exception when Error : others => Test.Report_Exception (Error); end Reset; procedure Special_Subexpression (Report : in out NT.Reporter'Class) is procedure Test is new Blackbox_Test (Name => "Special base-64 subexpression", Source => To_Atom ("(begin " & "{aGlkZGVuLWVuZCkoaGlkZGVuLWJlZ2lu}" & " end)" & "({MTY6b3ZlcmZsb3dpbmc=} atom)"), Expected => To_Atom ("(5:begin" & "10:hidden-end)(12:hidden-begin" & "3:end)" & "(16:overflowing atom)")); begin Test (Report); end Special_Subexpression; end Natools.S_Expressions.Parsers.Tests;
alloy4fun_models/trainstlt/models/1/M4qnFBBQQ6mSJpb9m.als
Kaixi26/org.alloytools.alloy
0
1492
open main pred idM4qnFBBQQ6mSJpb9m_prop2 { all g : Track.signal | eventually g = Green } pred __repair { idM4qnFBBQQ6mSJpb9m_prop2 } check __repair { idM4qnFBBQQ6mSJpb9m_prop2 <=> prop2o }
oeis/020/A020977.asm
neoneye/loda-programs
11
9109
<reponame>neoneye/loda-programs ; A020977: Expansion of 1/((1-8*x)*(1-9*x)*(1-11*x)). ; Submitted by <NAME> ; 1,28,525,8240,116921,1555428,19795525,244020280,2937425841,34724726828,404763120125,4666104381120,53319258206761,604990586218228,6825603208406325,76653180504610760,857610367436699681,9565794278591213628,106430473594100486125,1181739953489555429200,13099335105479767304601,145003670086166213377028,1603313013257122142591525,17711487222422346433156440,195506478502474706191781521,2156730113961544784114852428,23779763138940803426604354525,262081399348262364163066112480,2887450779023221578094286450441 add $0,2 lpb $0 sub $0,1 add $2,2 mul $2,8 sub $2,9 mul $3,11 add $3,$1 mul $1,9 add $1,1 add $1,$2 lpe mov $0,$3 div $0,8
programs/oeis/028/A028375.asm
karttu/loda
1
4741
; A028375: Squares of (odd numbers not divisible by 5). ; 1,9,49,81,121,169,289,361,441,529,729,841,961,1089,1369,1521,1681,1849,2209,2401,2601,2809,3249,3481,3721,3969,4489,4761,5041,5329,5929,6241,6561,6889,7569,7921,8281,8649,9409,9801,10201,10609,11449,11881,12321,12769,13689,14161,14641,15129,16129,16641,17161,17689,18769,19321,19881,20449,21609,22201,22801,23409,24649,25281,25921,26569,27889,28561,29241,29929,31329,32041,32761,33489,34969,35721,36481,37249,38809,39601,40401,41209,42849,43681,44521,45369,47089,47961,48841,49729,51529,52441,53361,54289,56169,57121,58081,59049,61009,62001,63001,64009,66049,67081,68121,69169,71289,72361,73441,74529,76729,77841,78961,80089,82369,83521,84681,85849,88209,89401,90601,91809,94249,95481,96721,97969,100489,101761,103041,104329,106929,108241,109561,110889,113569,114921,116281,117649,120409,121801,123201,124609,127449,128881,130321,131769,134689,136161,137641,139129,142129,143641,145161,146689,149769,151321,152881,154449,157609,159201,160801,162409,165649,167281,168921,170569,173889,175561,177241,178929,182329,184041,185761,187489,190969,192721,194481,196249,199809,201601,203401,205209,208849,210681,212521,214369,218089,219961,221841,223729,227529,229441,231361,233289,237169,239121,241081,243049,247009,249001,251001,253009,257049,259081,261121,263169,267289,269361,271441,273529,277729,279841,281961,284089,288369,290521,292681,294849,299209,301401,303601,305809,310249,312481,314721,316969,321489,323761,326041,328329,332929,335241,337561,339889,344569,346921,349281,351649,356409,358801,361201,363609,368449,370881,373321,375769,380689,383161,385641,388129 add $0,2 mul $0,5 mov $1,$0 div $1,4 mul $1,4 sub $1,6 pow $1,2 div $1,32 mul $1,8 add $1,1
Transynther/x86/_processed/AVXALIGN/_ht_zr_un_/i3-7100_9_0x84_notsx.log_21829_1219.asm
ljhsiun2/medusa
9
22927
<gh_stars>1-10 .global s_prepare_buffers s_prepare_buffers: push %r10 push %r11 push %r12 push %r8 push %rbp push %rbx push %rcx push %rdi push %rsi lea addresses_D_ht+0x18fdf, %r8 clflush (%r8) nop nop nop dec %rbp mov $0x6162636465666768, %r11 movq %r11, %xmm5 vmovups %ymm5, (%r8) nop nop nop and $63638, %r10 lea addresses_UC_ht+0x29df, %rbx nop dec %r8 and $0xffffffffffffffc0, %rbx vmovaps (%rbx), %ymm3 vextracti128 $1, %ymm3, %xmm3 vpextrq $1, %xmm3, %r12 nop nop nop nop nop add %rbp, %rbp lea addresses_D_ht+0x18667, %rsi lea addresses_D_ht+0x165df, %rdi nop nop nop nop nop and $31280, %r8 mov $1, %rcx rep movsq nop nop nop nop inc %r8 lea addresses_normal_ht+0x45df, %rcx cmp %r8, %r8 mov $0x6162636465666768, %r12 movq %r12, %xmm5 vmovups %ymm5, (%rcx) nop nop cmp %r8, %r8 lea addresses_D_ht+0xa99f, %r10 nop sub $57723, %rdi mov (%r10), %r11d nop nop nop xor $5403, %rcx lea addresses_WT_ht+0xaddf, %r12 nop and %rbp, %rbp movw $0x6162, (%r12) nop add %r12, %r12 lea addresses_normal_ht+0x1b1ab, %rsi lea addresses_WC_ht+0x19d8f, %rdi sub %r12, %r12 mov $50, %rcx rep movsw nop nop nop nop nop lfence lea addresses_D_ht+0x1cb3b, %r11 nop nop dec %rbx and $0xffffffffffffffc0, %r11 vmovaps (%r11), %ymm3 vextracti128 $0, %ymm3, %xmm3 vpextrq $1, %xmm3, %r8 nop nop nop nop nop xor %rbp, %rbp pop %rsi pop %rdi pop %rcx pop %rbx pop %rbp pop %r8 pop %r12 pop %r11 pop %r10 ret .global s_faulty_load s_faulty_load: push %r10 push %r11 push %r13 push %r9 push %rbp push %rbx push %rdi // Store lea addresses_normal+0xf5df, %r13 clflush (%r13) cmp %rbx, %rbx movb $0x51, (%r13) nop inc %r9 // Store lea addresses_WC+0x155df, %r11 nop nop cmp $47532, %r10 movw $0x5152, (%r11) nop nop nop nop sub %r13, %r13 // Store lea addresses_PSE+0x115df, %r10 nop nop cmp %rdi, %rdi mov $0x5152535455565758, %rbx movq %rbx, %xmm1 vmovups %ymm1, (%r10) nop nop nop nop nop xor $29101, %r10 // Load lea addresses_UC+0x12951, %r10 nop nop nop nop add $16589, %rdi movups (%r10), %xmm1 vpextrq $1, %xmm1, %rbp nop nop nop nop nop add %rbp, %rbp // Load lea addresses_normal+0x11adf, %r11 nop nop nop nop add %r9, %r9 mov (%r11), %bx xor %r9, %r9 // Store lea addresses_WT+0x1155f, %r10 nop nop nop nop nop sub %rdi, %rdi mov $0x5152535455565758, %rbp movq %rbp, %xmm2 movups %xmm2, (%r10) sub %rdi, %rdi // Load mov $0x5df, %r11 nop mfence mov (%r11), %rdi nop nop nop add %r10, %r10 // Store mov $0x5df, %r11 nop nop nop nop nop cmp $45905, %r13 movw $0x5152, (%r11) nop nop nop nop inc %r9 // Store lea addresses_UC+0xfddf, %r13 nop nop nop inc %r9 mov $0x5152535455565758, %r11 movq %r11, %xmm5 movups %xmm5, (%r13) nop nop nop nop nop sub %rdi, %rdi // Store lea addresses_A+0x11a3f, %rdi nop nop nop and $26940, %r13 mov $0x5152535455565758, %r9 movq %r9, (%rdi) nop nop xor %r9, %r9 // Faulty Load mov $0x5df, %rdi nop nop nop nop cmp $1829, %r13 movntdqa (%rdi), %xmm2 vpextrq $1, %xmm2, %r10 lea oracles, %r11 and $0xff, %r10 shlq $12, %r10 mov (%r11,%r10,1), %r10 pop %rdi pop %rbx pop %rbp pop %r9 pop %r13 pop %r11 pop %r10 ret /* <gen_faulty_load> [REF] {'src': {'type': 'addresses_P', 'same': False, 'size': 8, 'congruent': 0, 'NT': False, 'AVXalign': True}, 'OP': 'LOAD'} {'dst': {'type': 'addresses_normal', 'same': False, 'size': 1, 'congruent': 10, 'NT': False, 'AVXalign': False}, 'OP': 'STOR'} {'dst': {'type': 'addresses_WC', 'same': False, 'size': 2, 'congruent': 10, 'NT': False, 'AVXalign': False}, 'OP': 'STOR'} {'dst': {'type': 'addresses_PSE', 'same': False, 'size': 32, 'congruent': 10, 'NT': False, 'AVXalign': False}, 'OP': 'STOR'} {'src': {'type': 'addresses_UC', 'same': False, 'size': 16, 'congruent': 1, 'NT': False, 'AVXalign': False}, 'OP': 'LOAD'} {'src': {'type': 'addresses_normal', 'same': False, 'size': 2, 'congruent': 6, 'NT': False, 'AVXalign': False}, 'OP': 'LOAD'} {'dst': {'type': 'addresses_WT', 'same': False, 'size': 16, 'congruent': 7, 'NT': False, 'AVXalign': False}, 'OP': 'STOR'} {'src': {'type': 'addresses_P', 'same': True, 'size': 8, 'congruent': 0, 'NT': False, 'AVXalign': False}, 'OP': 'LOAD'} {'dst': {'type': 'addresses_P', 'same': True, 'size': 2, 'congruent': 0, 'NT': False, 'AVXalign': False}, 'OP': 'STOR'} {'dst': {'type': 'addresses_UC', 'same': False, 'size': 16, 'congruent': 10, 'NT': False, 'AVXalign': False}, 'OP': 'STOR'} {'dst': {'type': 'addresses_A', 'same': False, 'size': 8, 'congruent': 5, 'NT': False, 'AVXalign': False}, 'OP': 'STOR'} [Faulty Load] {'src': {'type': 'addresses_P', 'same': True, 'size': 16, 'congruent': 0, 'NT': True, 'AVXalign': False}, 'OP': 'LOAD'} <gen_prepare_buffer> {'dst': {'type': 'addresses_D_ht', 'same': False, 'size': 32, 'congruent': 9, 'NT': False, 'AVXalign': False}, 'OP': 'STOR'} {'src': {'type': 'addresses_UC_ht', 'same': False, 'size': 32, 'congruent': 9, 'NT': False, 'AVXalign': True}, 'OP': 'LOAD'} {'src': {'type': 'addresses_D_ht', 'congruent': 2, 'same': False}, 'dst': {'type': 'addresses_D_ht', 'congruent': 10, 'same': False}, 'OP': 'REPM'} {'dst': {'type': 'addresses_normal_ht', 'same': False, 'size': 32, 'congruent': 11, 'NT': False, 'AVXalign': False}, 'OP': 'STOR'} {'src': {'type': 'addresses_D_ht', 'same': False, 'size': 4, 'congruent': 4, 'NT': False, 'AVXalign': False}, 'OP': 'LOAD'} {'dst': {'type': 'addresses_WT_ht', 'same': False, 'size': 2, 'congruent': 11, 'NT': False, 'AVXalign': False}, 'OP': 'STOR'} {'src': {'type': 'addresses_normal_ht', 'congruent': 2, 'same': False}, 'dst': {'type': 'addresses_WC_ht', 'congruent': 4, 'same': False}, 'OP': 'REPM'} {'src': {'type': 'addresses_D_ht', 'same': False, 'size': 32, 'congruent': 2, 'NT': False, 'AVXalign': True}, 'OP': 'LOAD'} {'28': 6, '29': 1, '2a': 3, '44': 2, 'f1': 3, '08': 2, '68': 17, 'e2': 5, '5b': 1, '46': 2, '00': 21762, 'ff': 13, '40': 12} 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 40 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 40 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 40 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 e2 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ff 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 */
Types4.agda
pigworker/WhatRTypes4
11
2382
<filename>Types4.agda module Types4 where open import Basics public {-----------------------------------------------------------------------} -- balanced search trees (based on my ICFP '14 paper -- How to Keep Your Neighbours in Order -- but the point here is to watch what the types buy us {-----------------------------------------------------------------------} -- compare natural numbers {- might we visit Basics.agda? -} _<=_ : Nat -> Nat -> Set ze <= y = One su x <= ze = Zero su x <= su y = x <= y {-(-} cmp : (x y : Nat) -> (x <= y) + (y <= x) cmp ze y = inl <> cmp (su x) ze = inr <> cmp (su x) (su x₁) = cmp x x₁ {-)-} {-----------------------------------------------------------------------} -- loose bounds (one good idea, not always obvious) data Bnd : Set where bot : Bnd # : Nat -> Bnd top : Bnd _<B=_ : Bnd -> Bnd -> Set bot <B= _ = One # x <B= # y = x <= y _ <B= top = One _ <B= _ = Zero -- an interval lets you choose a number that fits in some bounds data Intv (l u : Bnd) : Set where intv : (x : Nat)(lx : l <B= # x)(xu : # x <B= u) -> Intv l u {-----------------------------------------------------------------------} -- 2-3-trees, indexed by bounds and height data T23 (l u : Bnd) : (h : Nat) -> Set where leaf : (lu : l <B= u) -> T23 l u ze node2 : forall {h} x (tlx : T23 l (# x) h)(txu : T23 (# x) u h) -> T23 l u (su h) node3 : forall {h} x y (tlx : T23 l (# x) h)(txy : T23 (# x) (# y) h)(tyu : T23 (# y) u h) -> T23 l u (su h) {-----------------------------------------------------------------------} -- insertion TooBig : Bnd -> Bnd -> Nat -> Set TooBig l u h = Sg Nat \ x -> T23 l (# x) h * T23 (# x) u h {-(-} insert : forall {h l u} -> Intv l u -> T23 l u h -> TooBig l u h + T23 l u h insert (intv x lx xu) (leaf lu) = {!!} insert (intv x lx xu) (node2 x₁ t t₁) = {!!} insert (intv x lx xu) (node3 y z tly tyz tzu) with cmp x y insert (intv x lx xu) (node3 y z tly tyz tzu) | inl xy with insert (intv x lx xy) tly insert (intv x lx xu) (node3 y z tly tyz tzu) | inl xy | inl (v , tlv , tvy) = inl (y , node2 v tlv tvy , node2 z tyz tzu) insert (intv x lx xu) (node3 y z tly tyz tzu) | inl xy | inr x₁ = {!!} insert (intv x lx xu) (node3 y z tly tyz tzu) | inr x₁ = {!!} {-)-} {-----------------------------------------------------------------------} -- confession -- it took me about fifteen years to come up with that type for insert {-----------------------------------------------------------------------} -- question (0) -- how can we make better use of the way types act as "problem statement?" {-----------------------------------------------------------------------} -- question (1) -- how can we make better use of the way types act as "problem statement?" -- programmers should profit from the downpayment and focus on -- the actual choices {-----------------------------------------------------------------------} -- question (2) -- how can we make better use of the way types act as "problem statement?" -- programmers should profit from the downpayment and focus on -- the actual choices -- "code" should be a readable record of a problem solving interaction {-----------------------------------------------------------------------} -- question (3) -- how can we make better use of the way types act as "problem statement?" -- programmers should profit from the downpayment and focus on -- the actual choices -- "code" should be a readable record of a problem solving interaction -- we need tools to support redesign {-----------------------------------------------------------------------} -- an incomplete program is a formal document
test/Fail/Issue279-4.agda
shlevy/agda
1,989
3598
<filename>test/Fail/Issue279-4.agda module Issue279-4 where module M (X : Set) where data R : Set where r : X → R postulate P Q : Set open M P using (r) shouldn't-check : M.R Q → Q shouldn't-check (r q) = q
programs/oeis/204/A204125.asm
neoneye/loda
22
23383
<reponame>neoneye/loda ; A204125: Symmetric matrix based on f(i,j)=(i if i=j and 1 otherwise), by antidiagonals. ; 1,1,1,1,2,1,1,1,1,1,1,1,3,1,1,1,1,1,1,1,1,1,1,1,4,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,5,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,6,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,7,1,1,1,1,1,1,1,1,1,1,1,1,1,1 lpb $0 add $1,4 sub $0,$1 lpe lpb $0 mov $0,0 mov $1,0 lpe div $1,4 add $1,1 mov $0,$1
programs/oeis/285/A285204.asm
neoneye/loda
22
160934
; A285204: Row lengths of triangle A285202. ; 1,3,5,5,7,5,7,5,7,5,9,5,7,5,7,5,9,5,7,5,7,5,9,5,7,5,7,5,9,5,7,5,7,5,11,5,7,5,7,5,9,5,7,5,7,5,9,5,7,5,7,5,9,5,7,5,7,5,11,5,7,5,7,5,9,5,7,5,7,5,9,5,7,5,7,5,9,5,7,5,7,5,11,5,7,5,7,5,9,5,7 mov $2,$0 lpb $0 mov $0,$2 add $1,1 sub $0,$1 dif $2,$1 add $2,$1 sub $2,1 lpe mul $1,2 add $1,1 mov $0,$1
chapter_1/page_35/exercise_4/strcmp.asm
assaflevy/practical_reverse_engineering
0
179952
<reponame>assaflevy/practical_reverse_engineering global _main extern _printf section .data string_1: db 'The quick brown fox jump over the lazy dog', 0 string_2: db 'The quick brown fox jump over the lazy dog', 0 format: db 'strcmp() returned %d.', 10, 0 section .text my_strcmp: mov edi, [esp + 4] mov esi, [esp + 8h] my_strcmp_loop: mov al, byte [edi] cmp al, byte [esi] jb my_strcmp_below ja my_strcmp_above test al, al jnz my_strcmp_iterate xor eax, eax ret my_strcmp_iterate: inc edi inc esi dec ecx jmp my_strcmp_loop my_strcmp_below: or eax, 0xffffffff ret my_strcmp_above: mov eax, 1 ret _main: lea eax, string_2 push eax lea eax, string_1 push eax call my_strcmp add esp, 8 push eax push format call _printf add esp, 8 ret
alloy4fun_models/trashltl/models/5/dTRj8PZQWedg4GGmR.als
Kaixi26/org.alloytools.alloy
0
5328
open main pred iddTRj8PZQWedg4GGmR_prop6 { all f: File | once f in Trash implies always f in Trash } pred __repair { iddTRj8PZQWedg4GGmR_prop6 } check __repair { iddTRj8PZQWedg4GGmR_prop6 <=> prop6o }
programs/oeis/262/A262843.asm
neoneye/loda
22
176761
<filename>programs/oeis/262/A262843.asm ; A262843: Inverse Moebius transform of n^(n-1). ; 1,3,10,67,626,7788,117650,2097219,43046731,1000000628,25937424602,743008378540,23298085122482,793714773371796,29192926025391260,1152921504608944195,48661191875666868482,2185911559738739586477,104127350297911241532842,5242880000000001000000692,278218429446951548637314060,15519448971100888998512275676,907846434775996175406740561330,55572324035428505186121405177516,3552713678800500929355621337891251,236773830007967588876818463023591860 add $0,1 mov $1,1 mov $2,$0 lpb $0 mov $3,$2 mov $4,$0 cmp $4,0 add $0,$4 dif $3,$0 cmp $3,$2 cmp $3,0 mul $3,$0 sub $0,1 pow $3,$0 add $1,$3 lpe mov $0,$1 sub $0,1
src/q_sound.adb
jfuica/bingada
4
11424
--***************************************************************************** --* --* PROJECT: BingAda --* --* FILE: q_sound.asfml.adb --* --* AUTHOR: Manuel <mgrojo at github> --* --***************************************************************************** -- External sound library -- with Sf.Audio.Music; with Ada.Directories; with Ada.Strings.Fixed; with Gtkada.Intl; with Q_Bingo; package body Q_Sound is use type Sf.Audio.sfMusic_Ptr; type T_Sound_Array is array (Q_Bingo.T_Number) of Sf.Audio.sfMusic_Ptr; V_Sounds : T_Sound_Array; --================================================================== function F_Filename (V_Number : Positive) return String is C_Number_Image : constant String := Ada.Strings.Fixed.Trim (V_Number'Image, Ada.Strings.Left); C_Path : constant String := "media/"; C_Extension : constant String := ".ogg"; C_Lang_Code_Last : constant := 2; C_Locale : constant String := Gtkada.Intl.Getlocale; C_Default_Lang : constant String := "en"; V_Lang : String (1 .. C_Lang_Code_Last) := C_Default_Lang; begin if C_Locale'Length >= C_Lang_Code_Last then V_Lang := C_Locale (C_Locale'First .. C_Locale'First + C_Lang_Code_Last - 1); end if; if not Ada.Directories.Exists (C_Path & V_Lang & '/' & C_Number_Image & C_Extension) then V_Lang := C_Default_Lang; end if; return C_Path & V_Lang & '/' & C_Number_Image & C_Extension; end F_Filename; --================================================================== procedure P_Play_Number (V_Number : Positive) is begin if V_Sounds (V_Number) = null then V_Sounds (V_Number) := Sf.Audio.Music.createFromFile (F_Filename (V_Number)); end if; Sf.Audio.Music.play (V_Sounds (V_number)); end P_Play_Number; --================================================================== procedure P_Clean_Up is begin for V_Music of V_Sounds loop if V_Music /= null then Sf.Audio.Music.destroy (V_Music); end if; end loop; end p_clean_up; end Q_Sound;
oeis/138/A138016.asm
neoneye/loda-programs
11
95048
; A138016: Row sums of triangle A138015. ; 1,2,4,6,10,14,24,34,68,102,256,410,1284,2158,8072,13986 add $0,1 mov $3,$0 lpb $0 sub $2,$0 trn $2,$0 mul $2,$0 sub $0,1 add $2,$3 lpe mov $0,$2
compute/Compute.g4
craft095/sere
0
388
grammar Compute; compute : (args += argDeclaration)* (lets += letDeclaration)* payload=expression ; ident : ID ; argDeclaration : name=ident TYPE_ANN type=ident ';' ; letDeclaration : LET inner=assignment ';' ; assignment : name=ident ASSIGN body=expression # constAssign | name=ident LPAREN (args += ident (',' args += ident)*) RPAREN ASSIGN body=expression # funcAssign ; expression : LPAREN expression RPAREN # parenExpression | EPS # sereLiteral | func=ident LPAREN (args += expression) (',' (args += expression))* RPAREN # callExpression | (COMPLEMENT | MINUS | BOOL_NOT) arg=expression # unary | arg=expression (KLEENESTAR | KLEENEPLUS) # unary | lhs=expression (DIVIDE | STAR | INTERSECTION) rhs=expression # binary | lhs=expression (MINUS | PLUS) rhs=expression # binary | lhs=expression BOOL_AND rhs=expression # binary | lhs=expression BOOL_OR rhs=expression # binary | lhs=expression (BOOL_EQ | BOOL_NE | BOOL_LT | BOOL_LE | BOOL_GT | BOOL_GE) rhs=expression # binary | lhs=expression UNION rhs=expression # binary | lhs=expression (CONCAT | FUSION) rhs=expression # binary | (BOOL_TRUE | BOOL_FALSE) # boolLiteral | ident # nameReference | INTLIT # intLiteral | FLOATLIT # floatLiteral | STRINGLIT # stringLiteral ; LET : 'let' ; BOOL_NOT : '!' ; BOOL_AND : '&&' ; BOOL_OR : '||' ; BOOL_EQ : '==' ; BOOL_NE : '!=' ; BOOL_LE : '<=' ; BOOL_LT : '<' ; BOOL_GE : '>=' ; BOOL_GT : '>' ; LPAREN : '(' ; RPAREN : ')' ; LBRACE : '{' ; RBRACE : '}' ; DIVIDE : '/' ; STAR : '*' ; PLUS : '+' ; MINUS : '-' ; TYPE_ANN : '::' ; ASSIGN : '=' ; COMPLEMENT : '~' ; INTERSECTION : '&' ; UNION : '|' ; FUSION : ':' ; CONCAT : ';' ; KLEENESTAR : '[*]' ; KLEENEPLUS : '[+]' ; COMMA : ',' ; STRINGLIT : '"' .*? '"' ; INTLIT : '0'|[1-9][0-9]* ; FLOATLIT : ('0'|[1-9][0-9]*) '.' [0-9]+ ; BOOL_TRUE : 'true' ; BOOL_FALSE : 'false' ; EPS : '()' ; WHITESPACE : [ \r\n\t] -> skip ; // Identifiers ID : [A-Za-z][A-Za-z0-9_]* ;
src/section-4-3/Graphics.g4
geeeger/language-implementation-patterns-learning
0
4864
grammar Graphics; file : command+ ; command : 'line' 'from' point 'to' point ; point : INT ',' INT ; INT : [0-9]+ ; WS : [ \t\r\n]+ -> skip ;
oeis/174/A174339.asm
neoneye/loda-programs
11
84396
<gh_stars>10-100 ; A174339: a(n) = 109*n^2. ; 0,109,436,981,1744,2725,3924,5341,6976,8829,10900,13189,15696,18421,21364,24525,27904,31501,35316,39349,43600,48069,52756,57661,62784,68125,73684,79461,85456,91669,98100,104749,111616,118701,126004,133525,141264,149221,157396,165789,174400,183229,192276,201541,211024,220725,230644,240781,251136,261709,272500,283509,294736,306181,317844,329725,341824,354141,366676,379429,392400,405589,418996,432621,446464,460525,474804,489301,504016,518949,534100,549469,565056,580861,596884,613125,629584,646261 pow $0,2 mul $0,109
Transynther/x86/_processed/US/_st_4k_sm_/i7-7700_9_0x48.log_1_2261.asm
ljhsiun2/medusa
9
80814
<gh_stars>1-10 .global s_prepare_buffers s_prepare_buffers: push %r10 push %r11 push %r15 push %rax push %rbx push %rcx push %rdi push %rsi lea addresses_D_ht+0x1836b, %rsi lea addresses_normal_ht+0x18657, %rdi dec %rbx mov $9, %rcx rep movsb nop nop nop and $44615, %r10 lea addresses_UC_ht+0x17b2f, %rsi lea addresses_UC_ht+0xb28b, %rdi nop nop nop nop nop cmp $61172, %r15 mov $69, %rcx rep movsq and %rcx, %rcx lea addresses_normal_ht+0xdf6b, %rsi lea addresses_normal_ht+0x1196b, %rdi nop nop nop dec %rbx mov $111, %rcx rep movsb nop nop nop nop nop xor %rdi, %rdi lea addresses_normal_ht+0x1c96b, %r15 sub $42823, %rax mov $0x6162636465666768, %rcx movq %rcx, %xmm6 and $0xffffffffffffffc0, %r15 movntdq %xmm6, (%r15) nop add %rbx, %rbx lea addresses_WT_ht+0x1d91b, %rsi lea addresses_WT_ht+0x20eb, %rdi nop nop sub %r11, %r11 mov $126, %rcx rep movsl nop nop nop cmp $13460, %r15 lea addresses_normal_ht+0x5d9d, %rdi nop nop nop nop add $8621, %rax mov (%rdi), %rcx nop nop nop nop and $45648, %r11 lea addresses_WT_ht+0x1d9bb, %rbx clflush (%rbx) nop nop sub %rcx, %rcx mov (%rbx), %rdi nop sub $24248, %r10 lea addresses_D_ht+0x40eb, %rsi lea addresses_A_ht+0xab6b, %rdi nop nop cmp $13693, %rbx mov $42, %rcx rep movsl nop nop nop cmp %r10, %r10 lea addresses_WT_ht+0x90eb, %rbx nop nop nop nop nop inc %rcx movb $0x61, (%rbx) nop add $3968, %rsi lea addresses_D_ht+0xf20b, %r15 nop nop and $25451, %rbx mov $0x6162636465666768, %r11 movq %r11, %xmm5 and $0xffffffffffffffc0, %r15 vmovntdq %ymm5, (%r15) nop nop nop nop nop sub $23143, %r10 lea addresses_A_ht+0x876b, %r15 nop nop nop cmp %rcx, %rcx movb $0x61, (%r15) nop nop nop nop nop dec %r10 pop %rsi pop %rdi pop %rcx pop %rbx pop %rax pop %r15 pop %r11 pop %r10 ret .global s_faulty_load s_faulty_load: push %r10 push %r14 push %r8 push %r9 push %rcx push %rdi push %rdx // Load lea addresses_PSE+0x455d, %r9 nop nop nop nop nop add %r14, %r14 mov (%r9), %r10w nop nop sub $59311, %rcx // Store lea addresses_US+0x1f36b, %r10 nop nop nop xor %r14, %r14 movb $0x51, (%r10) nop xor $38231, %r10 // Store lea addresses_US+0x1db6b, %r8 nop add %rdi, %rdi movb $0x51, (%r8) xor %rcx, %rcx // Store lea addresses_UC+0x1104f, %r14 add $42484, %r8 mov $0x5152535455565758, %r9 movq %r9, %xmm4 movups %xmm4, (%r14) cmp %rdx, %rdx // Store lea addresses_A+0x195eb, %r10 nop and %r14, %r14 mov $0x5152535455565758, %rdx movq %rdx, %xmm1 movups %xmm1, (%r10) nop nop nop dec %r8 // Store lea addresses_UC+0x11b6b, %r14 nop nop nop nop nop inc %r9 mov $0x5152535455565758, %r8 movq %r8, %xmm6 movups %xmm6, (%r14) nop nop nop dec %r10 // Store mov $0x34f297000000022b, %r9 nop nop nop nop nop add $30851, %r14 mov $0x5152535455565758, %rdx movq %rdx, %xmm6 movntdq %xmm6, (%r9) nop nop add %rdx, %rdx // Store lea addresses_WT+0xe76b, %rcx nop nop nop inc %r10 movw $0x5152, (%rcx) nop inc %r9 // Load lea addresses_US+0x444b, %rdx nop nop nop cmp $18167, %r9 mov (%rdx), %rdi and %r9, %r9 // Faulty Load lea addresses_US+0x1db6b, %rdx clflush (%rdx) nop nop nop sub $569, %r9 movb (%rdx), %r8b lea oracles, %rdx and $0xff, %r8 shlq $12, %r8 mov (%rdx,%r8,1), %r8 pop %rdx pop %rdi pop %rcx pop %r9 pop %r8 pop %r14 pop %r10 ret /* <gen_faulty_load> [REF] {'OP': 'LOAD', 'src': {'type': 'addresses_US', 'AVXalign': False, 'congruent': 0, 'size': 16, 'same': False, 'NT': False}} {'OP': 'LOAD', 'src': {'type': 'addresses_PSE', 'AVXalign': False, 'congruent': 1, 'size': 2, 'same': False, 'NT': False}} {'OP': 'STOR', 'dst': {'type': 'addresses_US', 'AVXalign': False, 'congruent': 11, 'size': 1, 'same': False, 'NT': True}} {'OP': 'STOR', 'dst': {'type': 'addresses_US', 'AVXalign': False, 'congruent': 0, 'size': 1, 'same': True, 'NT': False}} {'OP': 'STOR', 'dst': {'type': 'addresses_UC', 'AVXalign': False, 'congruent': 0, 'size': 16, 'same': False, 'NT': False}} {'OP': 'STOR', 'dst': {'type': 'addresses_A', 'AVXalign': False, 'congruent': 7, 'size': 16, 'same': False, 'NT': False}} {'OP': 'STOR', 'dst': {'type': 'addresses_UC', 'AVXalign': False, 'congruent': 11, 'size': 16, 'same': False, 'NT': False}} {'OP': 'STOR', 'dst': {'type': 'addresses_NC', 'AVXalign': False, 'congruent': 6, 'size': 16, 'same': False, 'NT': True}} {'OP': 'STOR', 'dst': {'type': 'addresses_WT', 'AVXalign': False, 'congruent': 9, 'size': 2, 'same': False, 'NT': False}} {'OP': 'LOAD', 'src': {'type': 'addresses_US', 'AVXalign': False, 'congruent': 5, 'size': 8, 'same': False, 'NT': False}} [Faulty Load] {'OP': 'LOAD', 'src': {'type': 'addresses_US', 'AVXalign': False, 'congruent': 0, 'size': 1, 'same': True, 'NT': False}} <gen_prepare_buffer> {'OP': 'REPM', 'src': {'type': 'addresses_D_ht', 'congruent': 11, 'same': False}, 'dst': {'type': 'addresses_normal_ht', 'congruent': 1, 'same': True}} {'OP': 'REPM', 'src': {'type': 'addresses_UC_ht', 'congruent': 0, 'same': False}, 'dst': {'type': 'addresses_UC_ht', 'congruent': 5, 'same': False}} {'OP': 'REPM', 'src': {'type': 'addresses_normal_ht', 'congruent': 9, 'same': False}, 'dst': {'type': 'addresses_normal_ht', 'congruent': 9, 'same': False}} {'OP': 'STOR', 'dst': {'type': 'addresses_normal_ht', 'AVXalign': False, 'congruent': 9, 'size': 16, 'same': False, 'NT': True}} {'OP': 'REPM', 'src': {'type': 'addresses_WT_ht', 'congruent': 4, 'same': False}, 'dst': {'type': 'addresses_WT_ht', 'congruent': 7, 'same': False}} {'OP': 'LOAD', 'src': {'type': 'addresses_normal_ht', 'AVXalign': False, 'congruent': 0, 'size': 8, 'same': False, 'NT': False}} {'OP': 'LOAD', 'src': {'type': 'addresses_WT_ht', 'AVXalign': False, 'congruent': 3, 'size': 8, 'same': False, 'NT': False}} {'OP': 'REPM', 'src': {'type': 'addresses_D_ht', 'congruent': 5, 'same': False}, 'dst': {'type': 'addresses_A_ht', 'congruent': 11, 'same': False}} {'OP': 'STOR', 'dst': {'type': 'addresses_WT_ht', 'AVXalign': False, 'congruent': 7, 'size': 1, 'same': True, 'NT': True}} {'OP': 'STOR', 'dst': {'type': 'addresses_D_ht', 'AVXalign': False, 'congruent': 4, 'size': 32, 'same': False, 'NT': True}} {'OP': 'STOR', 'dst': {'type': 'addresses_A_ht', 'AVXalign': False, 'congruent': 10, 'size': 1, 'same': False, 'NT': False}} {'58': 1} 58 */
asg/asm/rdkafka_roundrobin_assignor.asm
asgkafka/librdkafka
0
1144
*PROCESS DUPALIAS * * Compiled by DCC Version 2.25.07 Mar 6 2021 08:51:07 * on Fri Apr 30 15:35:58 2021 * WXTRN @@ZARCH# * * * * Code Section * @CODE ALIAS X'7CD9C4D2C1C6D2C16DD9D6E4D5C4D9D6C2C9D56DC1E2E2C9C7D5D6* D9' @CODE CSECT @CODE AMODE ANY @CODE RMODE ANY @DATA ALIAS X'7C998492818692816D9996A4958499968289956D81A2A289879596* 99' rd_kafka_topic_partition_list_add ALIAS X'99846D92818692816DA3969789836* D978199A389A38996956D9389A2A36D818484' EXTRN rd_kafka_topic_partition_list_add qsort ALIAS C'qsort' EXTRN qsort rd_kafka_group_member_cmp ALIAS X'99846D92818692816D879996A4976D9485948* 285996D839497' EXTRN rd_kafka_group_member_cmp rd_kafka_group_member_find_subscription ALIAS X'99846D92818692816D87999* 6A4976D9485948285996D868995846DA2A482A283998997A3899695' EXTRN rd_kafka_group_member_find_subscription rd_kafka_assignor_topic_cmp ALIAS X'99846D92818692816D81A2A289879596996* DA3969789836D839497' EXTRN rd_kafka_assignor_topic_cmp rd_kafka_assignor_add ALIAS X'99846D92818692816D81A2A289879596996D81848* 4' EXTRN rd_kafka_assignor_add rd_kafka_assignor_get_metadata_with_empty_userdata ALIAS X'99846D928186* 92816D81A2A289879596996D8785A36D9485A3818481A3816DA689A3* 886D859497A3A86DA4A285998481A381' EXTRN rd_kafka_assignor_get_metadata_with_empty_userdata rd_kafka_log0 ALIAS X'99846D92818692816D939687F0' EXTRN rd_kafka_log0 * * * * ....... start of rd_kafka_roundrobin_assignor_assign_cb rd_kafka_roundrobin_assignor_assign_cb ALIAS X'99846D92818692816D9996A4* 958499968289956D81A2A289879596996D81A2A28987956D8382' @LNAME1917 DS 0H DC X'00000026' DC C'rd_kafka_roundrobin_assignor_ass' DC C'ign_cb' DC X'00' rd_kafka_roundrobin_assignor_assign_cb DCCPRLG CINDEX=1917,BASER=12,FRA* ME=256,ENTRY=YES,ARCH=ZARCH,LNAMEADDR=@LNAME1917 LGR 9,1 ; ptr to parm area * ******* End of Prologue * * LG 7,0(0,9) ; rk LG 8,32(0,9) ; members * *** unsigned int ti; * *** int next = -1; LHI 4,-1 ; -1 * *** * *** * *** qsort(eligible_topics, eligible_topic_cnt, sizeof(*eligible\ * _topics), * *** rd_kafka_assignor_topic_cmp); LG 15,48(0,9) ; eligible_topics STG 15,176(0,13) LG 15,56(0,9) ; eligible_topic_cnt STG 15,184(0,13) MVGHI 192(13),8 LG 15,@lit_1917_1 ; rd_kafka_assignor_topic_cmp STG 15,200(0,13) LA 1,176(0,13) LG 2,@lit_1917_2 ; qsort LGR 15,2 @@gen_label0 DS 0H BALR 14,15 @@gen_label1 DS 0H * *** * *** * *** qsort(members, member_cnt, sizeof(*members), * *** rd_kafka_group_member_cmp); STG 8,176(0,13) LG 15,40(0,9) ; member_cnt STG 15,184(0,13) MVGHI 192(13),104 LG 15,@lit_1917_3 ; rd_kafka_group_member_cmp STG 15,200(0,13) LA 1,176(0,13) LGR 15,2 @@gen_label2 DS 0H BALR 14,15 @@gen_label3 DS 0H * *** * *** for (ti = 0 ; ti < eligible_topic_cnt ; ti++) { LHI 3,0 ; 0 B @L631 DS 0D @FRAMESIZE_1917 DC F'256' @lit_1917_2 DC AD(qsort) @lit_1917_1 DC AD(rd_kafka_assignor_topic_cmp) @lit_1917_3 DC AD(rd_kafka_group_member_cmp) @lit_1917_7 DC AD(rd_kafka_group_member_find_subscription) @lit_1917_9 DC AD(rd_kafka_log0) @lit_1917_8 DC AD(@strings@) @lit_1917_10 DC AD(rd_kafka_topic_partition_list_add) @L630 DS 0H * *** rd_kafka_assignor_topic_t *eligible_topic = el\ * igible_topics[ti]; LLGFR 15,3 LG 1,48(0,9) ; eligible_topics SLLG 15,15,3(0) ; *0x8 LG 6,0(15,1) * *** int partition; * *** * *** * *** * *** for (partition = 0 ; LHI 2,0 ; 0 * *** partition < eligible_topic->metadata->partition_cnt\ * ; * *** partition++) { B @L635 * *** rd_kafka_group_member_t *rkgm; * *** * *** * *** * *** do { @L638 DS 0H * *** next = (next+1) % member_cnt; AHI 4,1 LGFR 5,4 LGHI 4,0 DLG 4,40(0,9) ; member_cnt * *** } while (!rd_kafka_group_member_find_s\ * ubscription( * *** rk, &members[next], * *** eligible_topic->metad\ * ata->topic)); STG 7,176(0,13) LGFR 15,4 MGHI 15,104 LA 15,0(15,8) STG 15,184(0,13) LG 15,0(0,6) ; eligible_topic LG 15,0(0,15) STG 15,192(0,13) LA 1,176(0,13) LG 15,@lit_1917_7 ; rd_kafka_group_member_find_subscription @@gen_label4 DS 0H BALR 14,15 @@gen_label5 DS 0H LTR 15,15 BZ @L638 * *** * *** rkgm = &members[next]; LGFR 15,4 MGHI 15,104 LA 5,0(15,8) * *** * *** do { if ((((rk)->rk_conf.debug & (0x100)))) rd_kafka_\ * log0(&rk->rk_conf,rk,((void *)0), 7,(0x100), "ASSIGN","roundrobin: M\ * ember \"%s\": " "assigned topic %s partition %d", rkgm->rkgm_member_\ * id->str, eligible_topic->metadata->topic, partition); } while (0); @L641 DS 0H TM 802(7),1 BZ @L644 LA 15,528(0,7) STG 15,176(0,13) STG 7,184(0,13) XC 192(8,13),192(13) MVGHI 200(13),7 MVGHI 208(13),256 LG 15,@lit_1917_8 STG 15,216(0,13) LA 15,8(0,15) STG 15,224(0,13) LG 15,64(0,5) ; offset of rkgm_member_id in rd_kafka_group* _member_s LG 15,8(0,15) STG 15,232(0,13) LG 15,0(0,6) ; eligible_topic LG 15,0(0,15) STG 15,240(0,13) LGFR 15,2 STG 15,248(0,13) LA 1,176(0,13) LG 15,@lit_1917_9 ; rd_kafka_log0 @@gen_label8 DS 0H BALR 14,15 @@gen_label9 DS 0H @L644 DS 0H * *** * *** # 102 "C:\asgkafka\librdkafka\src\rdkafka_roundrobin_assignor.\ * c" * *** rd_kafka_topic_partition_list_add( * *** rkgm->rkgm_assignment, * *** eligible_topic->metadata->topic, partition); LG 15,8(0,5) STG 15,176(0,13) LG 15,0(0,6) ; eligible_topic LG 15,0(0,15) STG 15,184(0,13) LGFR 15,2 STG 15,192(0,13) LA 1,176(0,13) LG 15,@lit_1917_10 ; rd_kafka_topic_partition_list_add @@gen_label10 DS 0H BALR 14,15 @@gen_label11 DS 0H * *** * *** } AHI 2,1 @L635 DS 0H LG 15,0(0,6) ; eligible_topic C 2,8(0,15) BL @L638 * *** } AHI 3,1 @L631 DS 0H LLGFR 15,3 CLG 15,56(0,9) BL @L630 * *** * *** * *** return 0; LGHI 15,0 ; 0 * *** } * * **** Start of Epilogue DCCEPIL * * **** End of Epilogue DROP 12 * * DSECT for automatic variables in "rd_kafka_roundrobin_assignor_ass * ign_cb" * (FUNCTION #1917) * @AUTO#rd_kafka_roundrobin_assignor_assign_cb DSECT DS XL168 rd_kafka_roundrobin_assignor_assign_cb#partition#1 DS 1F ; partition ORG @AUTO#rd_kafka_roundrobin_assignor_assign_cb+168 rd_kafka_roundrobin_assignor_assign_cb#next#0 DS 1F ; next ORG @AUTO#rd_kafka_roundrobin_assignor_assign_cb+168 rd_kafka_roundrobin_assignor_assign_cb#ti#0 DS 1F ; ti * @CODE CSECT * * * * ....... start of rd_kafka_roundrobin_assignor_init rd_kafka_roundrobin_assignor_init ALIAS X'99846D92818692816D9996A495849* 9968289956D81A2A289879596996D899589A3' @LNAME1603 DS 0H DC X'00000021' DC C'rd_kafka_roundrobin_assignor_ini' DC C't' DC X'00' rd_kafka_roundrobin_assignor_init DCCPRLG CINDEX=1603,BASER=12,FRAME=24* 8,ENTRY=YES,ARCH=ZARCH,LNAMEADDR=@LNAME1603 * ******* End of Prologue * * * *** return rd_kafka_assignor_add( * *** rk, "consumer", "roundrobin", * *** RD_KAFKA_REBALANCE_PROTOCOL_EAGER, * *** rd_kafka_roundrobin_assignor_assign_cb, * *** rd_kafka_assignor_get_metadata_with_empty_user\ * data, * *** ((void *)0), ((void *)0), ((void *)0), ((void \ * *)0)); LG 15,0(0,1) ; rk STG 15,168(0,13) LG 15,@lit_1603_13 LA 1,64(0,15) STG 1,176(0,13) LA 15,74(0,15) STG 15,184(0,13) MVGHI 192(13),1 LG 15,@lit_1603_14 ; rd_kafka_roundrobin_assignor_assign_cb STG 15,200(0,13) LG 15,@lit_1603_15 ; rd_kafka_assignor_get_metadata_with_em* pty_userdata STG 15,208(0,13) XC 216(32,13),216(13) LA 1,168(0,13) LG 15,@lit_1603_16 ; rd_kafka_assignor_add @@gen_label14 DS 0H BALR 14,15 @@gen_label15 DS 0H LGFR 15,15 * *** } * * **** Start of Epilogue DCCEPIL * * **** End of Epilogue DS 0D @FRAMESIZE_1603 DC F'248' @lit_1603_16 DC AD(rd_kafka_assignor_add) @lit_1603_15 DC AD(rd_kafka_assignor_get_metadata_with_empty_userdata) @lit_1603_14 DC AD(rd_kafka_roundrobin_assignor_assign_cb) @lit_1603_13 DC AD(@strings@) DROP 12 * * DSECT for automatic variables in "rd_kafka_roundrobin_assignor_ini * t" * (FUNCTION #1603) * @AUTO#rd_kafka_roundrobin_assignor_init DSECT DS XL168 * @CODE CSECT @@STATIC ALIAS X'7C998492818692816D9996A4958499968289956D81A2A289879596* 9950' @@STATIC DXD 219D * * Non-Re-Entrant Data Section * @DATA CSECT @DATA RMODE ANY @DATA AMODE ANY @@T48F DC X'99846D838193939683' rd.calloc DC 1X'00' @@T493 DC X'99846D948193939683' rd.malloc DC 1X'00' @@T498 DC X'99846D99858193939683' rd.realloc DC 2X'00' @@T49E DC X'99846DA2A39984A497' rd.strdup DC 1X'00' @@T4A3 DC X'99846DA2A3999584A497' rd.strndup DC 2X'00' @@T4AB DC X'99846D9985868395A36DA2A482F0' rd.refcnt.sub0 DC 4X'00' @@T65A DC 4X'00' DC X'0000001A000000000000002200000000' ................ DC X'00000024' .... @@T67D DC X'99846D92818692816D94A287986D8485' rd.kafka.msgq.de DC X'98' q DC 1X'00' @@T704 DC X'99846D92818692816D986D8485A2A399' rd.kafka.q.destr DC X'96A8F0' oy0 DC 1X'00' @@T785 DC X'99846D92818692816D8595986D969583' rd.kafka.enq.onc DC X'856D8485A2A39996A8F0' e.destroy0 DC 2X'00' @@T78D DC X'99846D92818692816D8595986D969583' rd.kafka.enq.onc DC X'856D8485936DA296A4998385' e.del.source DC 2X'00' @@T794 DC X'99846D92818692816D8595986D969583' rd.kafka.enq.onc DC X'856D8485936DA296A49983856D9985A3' e.del.source.ret DC X'A49995' urn DC 1X'00' @@T79C DC X'99846D92818692816D8595986D969583' rd.kafka.enq.onc DC X'856DA3998987878599' e.trigger DC 1X'00' @@T7A0 DC X'99846D92818692816D8595986D969583' rd.kafka.enq.onc DC X'856D8485A2A39996A8' e.destroy DC 1X'00' @@T7A5 DC X'99846D92818692816D8595986D969583' rd.kafka.enq.onc DC X'856D8489A281829385' e.disable DC 1X'00' @@T7C5 DC X'99846DA394978182A4866D8193939683' rd.tmpabuf.alloc DC X'F0' 0 DC 1X'00' @@T7F9 DC X'99846D92818692816D82A4866DA49784' rd.kafka.buf.upd DC X'81A385' ate DC 1X'00' @@T81A DC X'99846D92818692816D82A4866D868995' rd.kafka.buf.fin DC X'819389A9856D81999981A88395A3' alize.arraycnt DC 2X'00' @@T857 DC X'99846D92818692816D82A4866D839983' rd.kafka.buf.crc DC X'6D899589A3' .init DC 1X'00' @@TA27 DC X'99846D92818692816D83A499996D94A2' rd.kafka.curr.ms DC X'87A26DA2A482' gs.sub DC 1X'00' @strings@ DS 0H DC X'C1E2E2C9C7D500009996A49584999682' ASSIGN..roundrob DC X'89957A40D48594828599407F6CA27F7A' in..Member...s.. DC X'4081A2A2898795858440A39697898340' .assigned.topic. DC X'6CA240978199A389A3899695406C8400' .s.partition..d. DC X'839695A2A494859900009996A4958499' consumer..roundr DC X'968289950000D7999684A4838500C685' obin..Produce.Fe DC X'A3838800D68686A285A30000D485A381' tch.Offset..Meta DC X'8481A3810000D38581848599C19584C9' data..LeaderAndI DC X'A2990000E2A39697D985979389838100' sr..StopReplica. DC X'E4978481A385D485A3818481A3810000' UpdateMetadata.. DC X'C39695A3999693938584E288A4A38496' ControlledShutdo DC X'A6950000D68686A285A3C396949489A3' wn..OffsetCommit DC X'0000D68686A285A3C685A3838800C689' ..OffsetFetch.Fi DC X'9584C396969984899581A3969900D196' ndCoordinator.Jo DC X'8995C79996A49700C8858199A3828581' inGroup.Heartbea DC X'A300D38581A585C79996A4970000E2A8' t.LeaveGroup..Sy DC X'9583C79996A49700C485A28399898285' ncGroup.Describe DC X'C79996A497A20000D389A2A3C79996A4' Groups..ListGrou DC X'97A20000E281A293C8819584A2888192' ps..SaslHandshak DC X'8500C19789E58599A28996950000C399' e.ApiVersion..Cr DC X'8581A385E396978983A20000C4859385' eateTopics..Dele DC X'A385E396978983A20000C4859385A385' teTopics..Delete DC X'D98583969984A200C99589A3D7999684' Records.InitProd DC X'A4838599C9840000D68686A285A3C696' ucerId..OffsetFo DC X'99D38581848599C5979683880000C184' rLeaderEpoch..Ad DC X'84D78199A389A3899695A2E396E3A795' dPartitionsToTxn DC X'0000C18484D68686A285A3A2E396E3A7' ..AddOffsetsToTx DC X'9500C59584E3A7950000E69989A385E3' n.EndTxn..WriteT DC X'A795D48199928599A200E3A795D68686' xnMarkers.TxnOff DC X'A285A3C396949489A300C485A2839989' setCommit.Descri DC X'8285C18393A20000C3998581A385C183' beAcls..CreateAc DC X'93A20000C4859385A385C18393A20000' ls..DeleteAcls.. DC X'C485A28399898285C39695868987A200' DescribeConfigs. DC X'C193A38599C39695868987A20000C193' AlterConfigs..Al DC X'A38599D9859793898381D39687C48999' terReplicaLogDir DC X'A200C485A28399898285D39687C48999' s.DescribeLogDir DC X'A200E281A293C1A4A3888595A3898381' s.SaslAuthentica DC X'A3850000C3998581A385D78199A389A3' te..CreatePartit DC X'899695A20000C3998581A385C4859385' ions..CreateDele DC X'8781A3899695E39692859500D9859585' gationToken.Rene DC X'A6C48593858781A3899695E396928595' wDelegationToken DC X'0000C5A797899985C48593858781A389' ..ExpireDelegati DC X'9695E39692859500C485A28399898285' onToken.Describe DC X'C48593858781A3899695E39692859500' DelegationToken. DC X'C4859385A385C79996A497A20000C593' DeleteGroups..El DC X'8583A3D38581848599A2D98598A485A2' ectLeadersReques DC X'A300C995839985948595A38193C193A3' t.IncrementalAlt DC X'8599C39695868987A2D98598A485A2A3' erConfigsRequest DC X'0000C193A38599D78199A389A3899695' ..AlterPartition DC X'D98581A2A2898795948595A3A2D98598' ReassignmentsReq DC X'A485A2A30000D389A2A3D78199A389A3' uest..ListPartit DC X'899695D98581A2A2898795948595A3A2' ionReassignments DC X'D98598A485A2A300D68686A285A3C485' Request.OffsetDe DC X'9385A385D98598A485A2A300C485A283' leteRequest.Desc DC X'99898285C393898595A3D8A496A381A2' ribeClientQuotas DC X'D98598A485A2A300C193A38599C39389' Request.AlterCli DC X'8595A3D8A496A381A2D98598A485A2A3' entQuotasRequest DC X'0000C485A28399898285E4A28599E283' ..DescribeUserSc DC X'998194C39985848595A3898193A2D985' ramCredentialsRe DC X'98A485A2A300C193A38599E4A28599E2' quest.AlterUserS DC X'83998194C39985848595A3898193A2D9' cramCredentialsR DC X'8598A485A2A30000E596A385D98598A4' equest..VoteRequ DC X'85A2A300C285878995D8A49699A494C5' est.BeginQuorumE DC X'97968388D98598A485A2A300C59584D8' pochRequest.EndQ DC X'A49699A494C597968388D98598A485A2' uorumEpochReques DC X'A300C485A28399898285D8A49699A494' t.DescribeQuorum DC X'D98598A485A2A300C193A38599C9A299' Request.AlterIsr DC X'D98598A485A2A300E4978481A385C685' Request.UpdateFe DC X'81A3A49985A2D98598A485A2A300C595' aturesRequest.En DC X'A58593969785D98598A485A2A3009596' velopeRequest.no DC X'9585000087A989970000A295819797A8' ne..gzip..snappy DC X'000093A9F400A9A2A384000089958885' ..lz4.zstd..inhe DC X'9989A300839695868987A49985840000' rit.configured.. DC X'93858199958584008995A38599958193' learned.internal DC X'00009396878983819300C99589A30000' ..logical.Init.. DC X'E3859994899581A38500C681A38193C5' Terminate.FatalE DC X'999996990000D98598A485A2A3D7C9C4' rror..RequestPID DC X'0000E68189A3E3998195A2979699A300' ..WaitTransport. DC X'E68189A3D7C9C400C1A2A28987958584' WaitPID.Assigned DC X'0000C499818995D985A285A30000C499' ..DrainReset..Dr DC X'818995C2A4949700D9858184A8D596A3' ainBump.ReadyNot DC X'C18392858400D9858184A800C995E399' Acked.Ready.InTr DC X'8195A28183A389969500C285878995C3' ansaction.BeginC DC X'96949489A300C396949489A3A3899587' ommit.Committing DC X'E3998195A28183A389969500C3969494' Transaction.Comm DC X'89A3D596A3C1839285840000C1829699' itNotAcked..Abor DC X'A3899587E3998195A28183A389969500' tingTransaction. DC X'C1829699A38584D596A3C18392858400' AbortedNotAcked. DC X'C1829699A381829385C5999996990000' AbortableError.. * * * Re-entrant Data Initialization Section * @@INIT@ ALIAS C'rdkafka_roundrobin_assignor:' @@INIT@ CSECT @@INIT@ AMODE ANY @@INIT@ RMODE ANY DC XL1'5' DC AL3(0) DC AL4(288) DC 4X'00' DC Q(@@STATIC) DC X'00000000' DC X'00000001' DC X'00000000' DC X'000000FF' DC X'0102039C09867F978D8E0B0C0D0E0F10' .....f.p........ DC X'1112139D8508871819928F1C1D1E1F80' ....e.g..k...... DC X'818283840A171B88898A8B8C05060790' abcd...hi....... DC X'9116939495960498999A9B14159E1A20' j.lmno.qr....... DC X'A0E2E4E0E1E3E5E7F1A22E3C282B7C26' .SU..TVX1s...... DC X'E9EAEBE8EDEEEFECDF21242A293B5E2D' Z..Y............ DC X'2FC2C4C0C1C3C5C7D1A62C255F3E3FF8' .BD.ACEGJw.....8 DC X'C9CACBC8CDCECFCC603A2340273D22D8' I..H...........Q DC X'616263646566676869ABBBF0FDFEB1B0' ...........0.... DC X'6A6B6C6D6E6F707172AABAE6B8C6A4B5' ...........W.Fu. DC X'7E737475767778797AA1BFD05BDEAEAC' ................ DC X'A3A5B7A9A7B6BCBDBEDDA8AF5DB4D77B' tv.zx.....y...P. DC X'414243444546474849ADF4F6F2F3F57D' ..........46235. DC X'4A4B4C4D4E4F505152B9FBFCF9FAFF5C' ............9... DC X'F7535455565758595AB2D4D6D2D3D530' 7.........MOKLN. DC X'313233343536373839B3DBDCD9DA9F40' ............R... * DC XL1'5' DC AL3(0) DC AL4(480) DC 4X'00' DC Q(@@STATIC) DC X'00000000' DC X'00000101' DC X'00000000' DC X'000000A0' DC X'010203372D2E2F1605150B0C0D0E0F10' ................ DC X'1112133C3D322618193F271C1D1E1F40' ................ DC X'5A7F7B5B6C507D4D5D5C4E6B604B61F0' ...............0 DC X'F1F2F3F4F5F6F7F8F97A5E4C7E6E6F7C' 123456789....... DC X'C1C2C3C4C5C6C7C8C9D1D2D3D4D5D6D7' ABCDEFGHIJKLMNOP DC X'D8D9E2E3E4E5E6E7E8E9ADE0BD5F6D79' QRSTUVWXYZ...... DC X'81828384858687888991929394959697' abcdefghijklmnop DC X'9899A2A3A4A5A6A7A8A9C04FD0A10720' qrstuvwxyz...... DC X'2122232425061728292A2B2C090A1B30' ................ DC X'311A333435360838393A3B04143EFF80' ................ * DC XL1'5' DC AL3(0) DC AL4(520) DC 4X'00' DC Q(@@STATIC) DC X'00000000' DC X'000001C0' DC X'00000000' DC X'00000001' DC X'8A40404040404040' ........ * DC XL1'5' DC AL3(0) DC AL4(560) DC 4X'00' DC Q(@@STATIC) DC X'00000000' DC X'000001E0' DC X'00000000' DC X'00000001' DC X'8B40404040404040' ........ * DC XL1'D' DC AL3(0) DC AL4(600) DC 4X'00' DC Q(@@STATIC) DC X'00000000' DC X'00000220' DC ADL8(@DATA) DC X'00000000' DC X'000001FC' * DC XL1'D' DC AL3(0) DC AL4(640) DC 4X'00' DC Q(@@STATIC) DC X'00000000' DC X'00000228' DC ADL8(@DATA) DC X'00000000' DC X'00000204' * DC XL1'D' DC AL3(0) DC AL4(680) DC 4X'00' DC Q(@@STATIC) DC X'00000000' DC X'00000230' DC ADL8(@DATA) DC X'00000000' DC X'0000020A' * DC XL1'D' DC AL3(0) DC AL4(720) DC 4X'00' DC Q(@@STATIC) DC X'00000000' DC X'00000238' DC ADL8(@DATA) DC X'00000000' DC X'00000212' * DC XL1'D' DC AL3(0) DC AL4(760) DC 4X'00' DC Q(@@STATIC) DC X'00000000' DC X'00000240' DC ADL8(@DATA) DC X'00000000' DC X'0000021C' * DC XL1'D' DC AL3(0) DC AL4(800) DC 4X'00' DC Q(@@STATIC) DC X'00000000' DC X'00000248' DC ADL8(@DATA) DC X'00000000' DC X'0000022A' * DC XL1'D' DC AL3(0) DC AL4(840) DC 4X'00' DC Q(@@STATIC) DC X'00000000' DC X'00000250' DC ADL8(@DATA) DC X'00000000' DC X'00000236' * DC XL1'D' DC AL3(0) DC AL4(880) DC 4X'00' DC Q(@@STATIC) DC X'00000000' DC X'00000258' DC ADL8(@DATA) DC X'00000000' DC X'00000246' * DC XL1'D' DC AL3(0) DC AL4(920) DC 4X'00' DC Q(@@STATIC) DC X'00000000' DC X'00000260' DC ADL8(@DATA) DC X'00000000' DC X'0000025A' * DC XL1'D' DC AL3(0) DC AL4(960) DC 4X'00' DC Q(@@STATIC) DC X'00000000' DC X'00000268' DC ADL8(@DATA) DC X'00000000' DC X'00000268' * DC XL1'D' DC AL3(0) DC AL4(1000) DC 4X'00' DC Q(@@STATIC) DC X'00000000' DC X'00000270' DC ADL8(@DATA) DC X'00000000' DC X'00000274' * DC XL1'D' DC AL3(0) DC AL4(1040) DC 4X'00' DC Q(@@STATIC) DC X'00000000' DC X'00000278' DC ADL8(@DATA) DC X'00000000' DC X'00000284' * DC XL1'D' DC AL3(0) DC AL4(1080) DC 4X'00' DC Q(@@STATIC) DC X'00000000' DC X'00000280' DC ADL8(@DATA) DC X'00000000' DC X'0000028E' * DC XL1'D' DC AL3(0) DC AL4(1120) DC 4X'00' DC Q(@@STATIC) DC X'00000000' DC X'00000288' DC ADL8(@DATA) DC X'00000000' DC X'00000298' * DC XL1'D' DC AL3(0) DC AL4(1160) DC 4X'00' DC Q(@@STATIC) DC X'00000000' DC X'00000290' DC ADL8(@DATA) DC X'00000000' DC X'000002A4' * DC XL1'D' DC AL3(0) DC AL4(1200) DC 4X'00' DC Q(@@STATIC) DC X'00000000' DC X'00000298' DC ADL8(@DATA) DC X'00000000' DC X'000002AE' * DC XL1'D' DC AL3(0) DC AL4(1240) DC 4X'00' DC Q(@@STATIC) DC X'00000000' DC X'000002A0' DC ADL8(@DATA) DC X'00000000' DC X'000002BE' * DC XL1'D' DC AL3(0) DC AL4(1280) DC 4X'00' DC Q(@@STATIC) DC X'00000000' DC X'000002A8' DC ADL8(@DATA) DC X'00000000' DC X'000002CA' * DC XL1'D' DC AL3(0) DC AL4(1320) DC 4X'00' DC Q(@@STATIC) DC X'00000000' DC X'000002B0' DC ADL8(@DATA) DC X'00000000' DC X'000002D8' * DC XL1'D' DC AL3(0) DC AL4(1360) DC 4X'00' DC Q(@@STATIC) DC X'00000000' DC X'000002B8' DC ADL8(@DATA) DC X'00000000' DC X'000002E4' * DC XL1'D' DC AL3(0) DC AL4(1400) DC 4X'00' DC Q(@@STATIC) DC X'00000000' DC X'000002C0' DC ADL8(@DATA) DC X'00000000' DC X'000002F2' * DC XL1'D' DC AL3(0) DC AL4(1440) DC 4X'00' DC Q(@@STATIC) DC X'00000000' DC X'000002C8' DC ADL8(@DATA) DC X'00000000' DC X'00000300' * DC XL1'D' DC AL3(0) DC AL4(1480) DC 4X'00' DC Q(@@STATIC) DC X'00000000' DC X'000002D0' DC ADL8(@DATA) DC X'00000000' DC X'0000030E' * DC XL1'D' DC AL3(0) DC AL4(1520) DC 4X'00' DC Q(@@STATIC) DC X'00000000' DC X'000002D8' DC ADL8(@DATA) DC X'00000000' DC X'0000031E' * DC XL1'D' DC AL3(0) DC AL4(1560) DC 4X'00' DC Q(@@STATIC) DC X'00000000' DC X'000002E0' DC ADL8(@DATA) DC X'00000000' DC X'00000334' * DC XL1'D' DC AL3(0) DC AL4(1600) DC 4X'00' DC Q(@@STATIC) DC X'00000000' DC X'000002E8' DC ADL8(@DATA) DC X'00000000' DC X'00000348' * DC XL1'D' DC AL3(0) DC AL4(1640) DC 4X'00' DC Q(@@STATIC) DC X'00000000' DC X'000002F0' DC ADL8(@DATA) DC X'00000000' DC X'00000358' * DC XL1'D' DC AL3(0) DC AL4(1680) DC 4X'00' DC Q(@@STATIC) DC X'00000000' DC X'000002F8' DC ADL8(@DATA) DC X'00000000' DC X'00000360' * DC XL1'D' DC AL3(0) DC AL4(1720) DC 4X'00' DC Q(@@STATIC) DC X'00000000' DC X'00000300' DC ADL8(@DATA) DC X'00000000' DC X'00000370' * DC XL1'D' DC AL3(0) DC AL4(1760) DC 4X'00' DC Q(@@STATIC) DC X'00000000' DC X'00000308' DC ADL8(@DATA) DC X'00000000' DC X'00000380' * DC XL1'D' DC AL3(0) DC AL4(1800) DC 4X'00' DC Q(@@STATIC) DC X'00000000' DC X'00000310' DC ADL8(@DATA) DC X'00000000' DC X'0000038E' * DC XL1'D' DC AL3(0) DC AL4(1840) DC 4X'00' DC Q(@@STATIC) DC X'00000000' DC X'00000318' DC ADL8(@DATA) DC X'00000000' DC X'0000039A' * DC XL1'D' DC AL3(0) DC AL4(1880) DC 4X'00' DC Q(@@STATIC) DC X'00000000' DC X'00000320' DC ADL8(@DATA) DC X'00000000' DC X'000003A6' * DC XL1'D' DC AL3(0) DC AL4(1920) DC 4X'00' DC Q(@@STATIC) DC X'00000000' DC X'00000328' DC ADL8(@DATA) DC X'00000000' DC X'000003B6' * DC XL1'D' DC AL3(0) DC AL4(1960) DC 4X'00' DC Q(@@STATIC) DC X'00000000' DC X'00000330' DC ADL8(@DATA) DC X'00000000' DC X'000003C4' * DC XL1'D' DC AL3(0) DC AL4(2000) DC 4X'00' DC Q(@@STATIC) DC X'00000000' DC X'00000338' DC ADL8(@DATA) DC X'00000000' DC X'000003D8' * DC XL1'D' DC AL3(0) DC AL4(2040) DC 4X'00' DC Q(@@STATIC) DC X'00000000' DC X'00000340' DC ADL8(@DATA) DC X'00000000' DC X'000003E8' * DC XL1'D' DC AL3(0) DC AL4(2080) DC 4X'00' DC Q(@@STATIC) DC X'00000000' DC X'00000348' DC ADL8(@DATA) DC X'00000000' DC X'000003FA' * DC XL1'D' DC AL3(0) DC AL4(2120) DC 4X'00' DC Q(@@STATIC) DC X'00000000' DC X'00000350' DC ADL8(@DATA) DC X'00000000' DC X'0000040C' * DC XL1'D' DC AL3(0) DC AL4(2160) DC 4X'00' DC Q(@@STATIC) DC X'00000000' DC X'00000358' DC ADL8(@DATA) DC X'00000000' DC X'00000422' * DC XL1'D' DC AL3(0) DC AL4(2200) DC 4X'00' DC Q(@@STATIC) DC X'00000000' DC X'00000360' DC ADL8(@DATA) DC X'00000000' DC X'00000438' * DC XL1'D' DC AL3(0) DC AL4(2240) DC 4X'00' DC Q(@@STATIC) DC X'00000000' DC X'00000368' DC ADL8(@DATA) DC X'00000000' DC X'0000044E' * DC XL1'D' DC AL3(0) DC AL4(2280) DC 4X'00' DC Q(@@STATIC) DC X'00000000' DC X'00000370' DC ADL8(@DATA) DC X'00000000' DC X'00000466' * DC XL1'D' DC AL3(0) DC AL4(2320) DC 4X'00' DC Q(@@STATIC) DC X'00000000' DC X'00000378' DC ADL8(@DATA) DC X'00000000' DC X'00000474' * DC XL1'D' DC AL3(0) DC AL4(2360) DC 4X'00' DC Q(@@STATIC) DC X'00000000' DC X'00000380' DC ADL8(@DATA) DC X'00000000' DC X'00000488' * DC XL1'D' DC AL3(0) DC AL4(2400) DC 4X'00' DC Q(@@STATIC) DC X'00000000' DC X'00000388' DC ADL8(@DATA) DC X'00000000' DC X'000004A8' * DC XL1'D' DC AL3(0) DC AL4(2440) DC 4X'00' DC Q(@@STATIC) DC X'00000000' DC X'00000390' DC ADL8(@DATA) DC X'00000000' DC X'000004CC' * DC XL1'D' DC AL3(0) DC AL4(2480) DC 4X'00' DC Q(@@STATIC) DC X'00000000' DC X'00000398' DC ADL8(@DATA) DC X'00000000' DC X'000004EE' * DC XL1'D' DC AL3(0) DC AL4(2520) DC 4X'00' DC Q(@@STATIC) DC X'00000000' DC X'000003A0' DC ADL8(@DATA) DC X'00000000' DC X'00000502' * DC XL1'D' DC AL3(0) DC AL4(2560) DC 4X'00' DC Q(@@STATIC) DC X'00000000' DC X'000003A8' DC ADL8(@DATA) DC X'00000000' DC X'0000051E' * DC XL1'D' DC AL3(0) DC AL4(2600) DC 4X'00' DC Q(@@STATIC) DC X'00000000' DC X'000003B0' DC ADL8(@DATA) DC X'00000000' DC X'00000538' * DC XL1'D' DC AL3(0) DC AL4(2640) DC 4X'00' DC Q(@@STATIC) DC X'00000000' DC X'000003B8' DC ADL8(@DATA) DC X'00000000' DC X'0000055C' * DC XL1'D' DC AL3(0) DC AL4(2680) DC 4X'00' DC Q(@@STATIC) DC X'00000000' DC X'000003C0' DC ADL8(@DATA) DC X'00000000' DC X'0000057E' * DC XL1'D' DC AL3(0) DC AL4(2720) DC 4X'00' DC Q(@@STATIC) DC X'00000000' DC X'000003C8' DC ADL8(@DATA) DC X'00000000' DC X'0000058A' * DC XL1'D' DC AL3(0) DC AL4(2760) DC 4X'00' DC Q(@@STATIC) DC X'00000000' DC X'000003D0' DC ADL8(@DATA) DC X'00000000' DC X'000005A2' * DC XL1'D' DC AL3(0) DC AL4(2800) DC 4X'00' DC Q(@@STATIC) DC X'00000000' DC X'000003D8' DC ADL8(@DATA) DC X'00000000' DC X'000005B8' * DC XL1'D' DC AL3(0) DC AL4(2840) DC 4X'00' DC Q(@@STATIC) DC X'00000000' DC X'000003E0' DC ADL8(@DATA) DC X'00000000' DC X'000005CE' * DC XL1'D' DC AL3(0) DC AL4(2880) DC 4X'00' DC Q(@@STATIC) DC X'00000000' DC X'000003E8' DC ADL8(@DATA) DC X'00000000' DC X'000005DE' * DC XL1'D' DC AL3(0) DC AL4(2920) DC 4X'00' DC Q(@@STATIC) DC X'00000000' DC X'000003F0' DC ADL8(@DATA) DC X'00000000' DC X'000005F4' * DC XL1'D' DC AL3(0) DC AL4(2960) DC 4X'00' DC Q(@@STATIC) DC X'00000000' DC X'000004C0' DC ADL8(@DATA) DC X'00000000' DC X'00000604' * DC XL1'D' DC AL3(0) DC AL4(3000) DC 4X'00' DC Q(@@STATIC) DC X'00000000' DC X'000004C8' DC ADL8(@DATA) DC X'00000000' DC X'0000060A' * DC XL1'D' DC AL3(0) DC AL4(3040) DC 4X'00' DC Q(@@STATIC) DC X'00000000' DC X'000004D0' DC ADL8(@DATA) DC X'00000000' DC X'00000610' * DC XL1'D' DC AL3(0) DC AL4(3080) DC 4X'00' DC Q(@@STATIC) DC X'00000000' DC X'000004D8' DC ADL8(@DATA) DC X'00000000' DC X'00000618' * DC XL1'D' DC AL3(0) DC AL4(3120) DC 4X'00' DC Q(@@STATIC) DC X'00000000' DC X'000004E0' DC ADL8(@DATA) DC X'00000000' DC X'0000061C' * DC XL1'D' DC AL3(0) DC AL4(3160) DC 4X'00' DC Q(@@STATIC) DC X'00000000' DC X'000004E8' DC ADL8(@DATA) DC X'00000000' DC X'00000622' * DC XL1'D' DC AL3(0) DC AL4(3200) DC 4X'00' DC Q(@@STATIC) DC X'00000000' DC X'00000510' DC ADL8(@DATA) DC X'00000000' DC X'0000062A' * DC XL1'D' DC AL3(0) DC AL4(3240) DC 4X'00' DC Q(@@STATIC) DC X'00000000' DC X'00000518' DC ADL8(@DATA) DC X'00000000' DC X'00000636' * DC XL1'D' DC AL3(0) DC AL4(3280) DC 4X'00' DC Q(@@STATIC) DC X'00000000' DC X'00000520' DC ADL8(@DATA) DC X'00000000' DC X'0000063E' * DC XL1'D' DC AL3(0) DC AL4(3320) DC 4X'00' DC Q(@@STATIC) DC X'00000000' DC X'00000528' DC ADL8(@DATA) DC X'00000000' DC X'00000648' * DC XL1'D' DC AL3(0) DC AL4(3360) DC 4X'00' DC Q(@@STATIC) DC X'00000000' DC X'00000630' DC ADL8(@DATA) DC X'00000000' DC X'00000650' * DC XL1'D' DC AL3(0) DC AL4(3400) DC 4X'00' DC Q(@@STATIC) DC X'00000000' DC X'00000638' DC ADL8(@DATA) DC X'00000000' DC X'00000656' * DC XL1'D' DC AL3(0) DC AL4(3440) DC 4X'00' DC Q(@@STATIC) DC X'00000000' DC X'00000640' DC ADL8(@DATA) DC X'00000000' DC X'00000660' * DC XL1'D' DC AL3(0) DC AL4(3480) DC 4X'00' DC Q(@@STATIC) DC X'00000000' DC X'00000648' DC ADL8(@DATA) DC X'00000000' DC X'0000066C' * DC XL1'D' DC AL3(0) DC AL4(3520) DC 4X'00' DC Q(@@STATIC) DC X'00000000' DC X'00000650' DC ADL8(@DATA) DC X'00000000' DC X'00000678' * DC XL1'D' DC AL3(0) DC AL4(3560) DC 4X'00' DC Q(@@STATIC) DC X'00000000' DC X'00000658' DC ADL8(@DATA) DC X'00000000' DC X'00000686' * DC XL1'D' DC AL3(0) DC AL4(3600) DC 4X'00' DC Q(@@STATIC) DC X'00000000' DC X'00000660' DC ADL8(@DATA) DC X'00000000' DC X'0000068E' * DC XL1'D' DC AL3(0) DC AL4(3640) DC 4X'00' DC Q(@@STATIC) DC X'00000000' DC X'00000668' DC ADL8(@DATA) DC X'00000000' DC X'00000698' * DC XL1'D' DC AL3(0) DC AL4(3680) DC 4X'00' DC Q(@@STATIC) DC X'00000000' DC X'00000670' DC ADL8(@DATA) DC X'00000000' DC X'000006A4' * DC XL1'D' DC AL3(0) DC AL4(3720) DC 4X'00' DC Q(@@STATIC) DC X'00000000' DC X'00000678' DC ADL8(@DATA) DC X'00000000' DC X'00000650' * DC XL1'D' DC AL3(0) DC AL4(3760) DC 4X'00' DC Q(@@STATIC) DC X'00000000' DC X'00000680' DC ADL8(@DATA) DC X'00000000' DC X'00000686' * DC XL1'D' DC AL3(0) DC AL4(3800) DC 4X'00' DC Q(@@STATIC) DC X'00000000' DC X'00000688' DC ADL8(@DATA) DC X'00000000' DC X'000006AE' * DC XL1'D' DC AL3(0) DC AL4(3840) DC 4X'00' DC Q(@@STATIC) DC X'00000000' DC X'00000690' DC ADL8(@DATA) DC X'00000000' DC X'000006BC' * DC XL1'D' DC AL3(0) DC AL4(3880) DC 4X'00' DC Q(@@STATIC) DC X'00000000' DC X'00000698' DC ADL8(@DATA) DC X'00000000' DC X'000006C2' * DC XL1'D' DC AL3(0) DC AL4(3920) DC 4X'00' DC Q(@@STATIC) DC X'00000000' DC X'000006A0' DC ADL8(@DATA) DC X'00000000' DC X'000006D0' * DC XL1'D' DC AL3(0) DC AL4(3960) DC 4X'00' DC Q(@@STATIC) DC X'00000000' DC X'000006A8' DC ADL8(@DATA) DC X'00000000' DC X'000006DC' * DC XL1'D' DC AL3(0) DC AL4(4000) DC 4X'00' DC Q(@@STATIC) DC X'00000000' DC X'000006B0' DC ADL8(@DATA) DC X'00000000' DC X'000006F2' * DC XL1'D' DC AL3(0) DC AL4(4040) DC 4X'00' DC Q(@@STATIC) DC X'00000000' DC X'000006B8' DC ADL8(@DATA) DC X'00000000' DC X'00000702' * DC XL1'D' DC AL3(0) DC AL4(4080) DC 4X'00' DC Q(@@STATIC) DC X'00000000' DC X'000006C0' DC ADL8(@DATA) DC X'00000000' DC X'00000716' * DC XL1'D' DC AL3(0) DC AL4(4120) DC 4X'00' DC Q(@@STATIC) DC X'00000000' DC X'000006C8' DC ADL8(@DATA) DC X'00000000' DC X'00000726' * DC XL1'D' DC AL3(0) DC AL4(0) DC 4X'00' DC Q(@@STATIC) DC X'00000000' DC X'000006D0' DC ADL8(@DATA) DC X'00000000' DC X'00000660' * END
oeis/286/A286910.asm
neoneye/loda-programs
11
87916
; A286910: Number of independent vertex sets and vertex covers in the n-antiprism graph. ; Submitted by <NAME> ; 3,1,5,10,21,46,98,211,453,973,2090,4489,9642,20710,44483,95545,205221,440794,946781,2033590,4367946,9381907,20151389,43283149,92967834,199685521,428904338,921243214,1978737411,4250128177,9128846213,19607839978,42115660581,90460186750,194299347890,417335381971,896394264501,1925364376333,4135488287306,8882611304473,19078952255418,40979663151670,88020178966979,189058457525737,406078478611365,872215572629818,1873430987378285,4023940611249286,8643018158635674,18564330368512531,39874307297033165 mul $0,2 mov $1,2 lpb $0 sub $0,1 mov $3,$4 mov $4,$1 mov $1,$2 add $2,$3 add $4,1 lpe add $0,$1 add $0,1
oeis/041/A041127.asm
neoneye/loda-programs
11
163298
; A041127: Denominators of continued fraction convergents to sqrt(72). ; Submitted by <NAME>(s1.) ; 1,2,33,68,1121,2310,38081,78472,1293633,2665738,43945441,90556620,1492851361,3076259342,50713000833,104502261008,1722749176961,3550000614930,58522759015841,120595518646612,1988051057361633,4096697633369878,67535213191279681,139167124015929240,2294209197446147521,4727585518908224282,77935577499977736033,160598740518863696348,2647515425801796877601,5455629592122457451550,89937588899761116102401,185330807391644689656352,3055230507166076150604033,6295791821723796990864418 add $0,1 mov $3,1 lpb $0 sub $0,1 dif $2,3 add $2,$3 mov $3,$1 mov $1,$2 dif $2,8 mul $2,48 lpe mov $0,$2 div $0,48
a/assembler_lc-3.asm
ozcanyarimdunya/FuckYouGithub
0
105570
<reponame>ozcanyarimdunya/FuckYouGithub .ORIG x3000 LEA R0, FuckYouGithub PUTS FuckYouGithub .STRINGZ "Fuck You Github!\n"
Fire Alarm - Smoke Detector/assets/alarm_3.asm
sanils2002/ASSEMBLY-PROJECTS
0
169504
MVI A,98H REPEAT: IN 60H ANI 01H JNZ SKIP JMP REPEAT SKIP: OUT 61H HLT
libsrc/math/mbf32/c/sccz80/exp.asm
rjcorrig/z88dk
0
102258
<filename>libsrc/math/mbf32/c/sccz80/exp.asm SECTION code_fp_mbf32 PUBLIC exp EXTERN ___mbf32_setup_expgle EXTERN ___mbf32_EXP EXTERN ___mbf32_return EXTERN msbios exp: call ___mbf32_setup_expgle ld ix,___mbf32_EXP call msbios jp ___mbf32_return
data/mapHeaders/CeruleanPokecenter.asm
AmateurPanda92/pokemon-rby-dx
9
94501
CeruleanPokecenter_h: db POKECENTER ; tileset db CERULEAN_POKECENTER_HEIGHT, CERULEAN_POKECENTER_WIDTH ; dimensions (y, x) dw CeruleanPokecenter_Blocks ; blocks dw CeruleanPokecenter_TextPointers ; texts dw CeruleanPokecenter_Script ; scripts db 0 ; connections dw CeruleanPokecenter_Object ; objects
oeis/004/A004658.asm
neoneye/loda-programs
11
87510
<reponame>neoneye/loda-programs ; A004658: Powers of 3 written in base 4. ; 1,3,21,123,1101,3303,23121,202023,1212201,10303203,32122221,223033323,2001233301,12011033103,102033231321,312233021223,2210031131001,13230220113003,113011321011021,1011101223033123,3033311001232101,21233133011022303,131032131033200121,1113223113232201023,10013002013023203201,30111012111202222203,210333103000213333221,1232331321001313332323,11030321223011213330301,33212231001100313312103,232310013003302213202321,2030130111023113312220223,12211110333202013203322001,103233332332212112223232003 mov $1,3 pow $1,$0 seq $1,7090 ; Numbers in base 4. mov $0,$1
source/textio/a-coteio.ads
ytomino/drake
33
5233
<filename>source/textio/a-coteio.ads pragma License (Unrestricted); with Ada.Numerics.Complex_Types; with Ada.Text_IO.Complex_IO; package Ada.Complex_Text_IO is new Text_IO.Complex_IO (Numerics.Complex_Types);
tools-src/gnu/gcc/gcc/ada/exp_ch6.adb
enfoTek/tomato.linksys.e2000.nvram-mod
80
11828
------------------------------------------------------------------------------ -- -- -- GNAT COMPILER COMPONENTS -- -- -- -- E X P _ C H 6 -- -- -- -- B o d y -- -- -- -- $Revision$ -- -- -- Copyright (C) 1992-2001, Free Software Foundation, Inc. -- -- -- -- GNAT is free software; you can redistribute it and/or modify it under -- -- terms of the GNU General Public License as published by the Free Soft- -- -- ware Foundation; either version 2, or (at your option) any later ver- -- -- sion. GNAT is distributed in the hope that it will be useful, but WITH- -- -- OUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY -- -- or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License -- -- for more details. You should have received a copy of the GNU General -- -- Public License distributed with GNAT; see file COPYING. If not, write -- -- to the Free Software Foundation, 59 Temple Place - Suite 330, Boston, -- -- MA 02111-1307, USA. -- -- -- -- GNAT was originally developed by the GNAT team at New York University. -- -- Extensive contributions were provided by Ada Core Technologies Inc. -- -- -- ------------------------------------------------------------------------------ with Atree; use Atree; with Checks; use Checks; with Debug; use Debug; with Einfo; use Einfo; with Errout; use Errout; with Elists; use Elists; with Exp_Ch2; use Exp_Ch2; with Exp_Ch3; use Exp_Ch3; with Exp_Ch7; use Exp_Ch7; with Exp_Ch9; use Exp_Ch9; with Exp_Ch11; use Exp_Ch11; with Exp_Dbug; use Exp_Dbug; with Exp_Disp; use Exp_Disp; with Exp_Dist; use Exp_Dist; with Exp_Intr; use Exp_Intr; with Exp_Pakd; use Exp_Pakd; with Exp_Tss; use Exp_Tss; with Exp_Util; use Exp_Util; with Freeze; use Freeze; with Hostparm; use Hostparm; with Inline; use Inline; with Lib; use Lib; with Nlists; use Nlists; with Nmake; use Nmake; with Opt; use Opt; with Restrict; use Restrict; with Rtsfind; use Rtsfind; with Sem; use Sem; with Sem_Ch6; use Sem_Ch6; with Sem_Ch8; use Sem_Ch8; with Sem_Ch12; use Sem_Ch12; with Sem_Ch13; use Sem_Ch13; with Sem_Disp; use Sem_Disp; with Sem_Dist; use Sem_Dist; with Sem_Res; use Sem_Res; with Sem_Util; use Sem_Util; with Sinfo; use Sinfo; with Snames; use Snames; with Stand; use Stand; with Tbuild; use Tbuild; with Uintp; use Uintp; with Validsw; use Validsw; package body Exp_Ch6 is ----------------------- -- Local Subprograms -- ----------------------- procedure Check_Overriding_Operation (Subp : Entity_Id); -- Subp is a dispatching operation. Check whether it may override an -- inherited private operation, in which case its DT entry is that of -- the hidden operation, not the one it may have received earlier. -- This must be done before emitting the code to set the corresponding -- DT to the address of the subprogram. The actual placement of Subp in -- the proper place in the list of primitive operations is done in -- Declare_Inherited_Private_Subprograms, which also has to deal with -- implicit operations. This duplication is unavoidable for now??? procedure Detect_Infinite_Recursion (N : Node_Id; Spec : Entity_Id); -- This procedure is called only if the subprogram body N, whose spec -- has the given entity Spec, contains a parameterless recursive call. -- It attempts to generate runtime code to detect if this a case of -- infinite recursion. -- -- The body is scanned to determine dependencies. If the only external -- dependencies are on a small set of scalar variables, then the values -- of these variables are captured on entry to the subprogram, and if -- the values are not changed for the call, we know immediately that -- we have an infinite recursion. procedure Expand_Actuals (N : Node_Id; Subp : Entity_Id); -- For each actual of an in-out parameter which is a numeric conversion -- of the form T(A), where A denotes a variable, we insert the declaration: -- -- Temp : T := T(A); -- -- prior to the call. Then we replace the actual with a reference to Temp, -- and append the assignment: -- -- A := T' (Temp); -- -- after the call. Here T' is the actual type of variable A. -- For out parameters, the initial declaration has no expression. -- If A is not an entity name, we generate instead: -- -- Var : T' renames A; -- Temp : T := Var; -- omitting expression for out parameter. -- ... -- Var := T' (Temp); -- -- For other in-out parameters, we emit the required constraint checks -- before and/or after the call. -- For all parameter modes, actuals that denote components and slices -- of packed arrays are expanded into suitable temporaries. procedure Expand_Inlined_Call (N : Node_Id; Subp : Entity_Id; Orig_Subp : Entity_Id); -- If called subprogram can be inlined by the front-end, retrieve the -- analyzed body, replace formals with actuals and expand call in place. -- Generate thunks for actuals that are expressions, and insert the -- corresponding constant declarations before the call. If the original -- call is to a derived operation, the return type is the one of the -- derived operation, but the body is that of the original, so return -- expressions in the body must be converted to the desired type (which -- is simply not noted in the tree without inline expansion). function Expand_Protected_Object_Reference (N : Node_Id; Scop : Entity_Id) return Node_Id; procedure Expand_Protected_Subprogram_Call (N : Node_Id; Subp : Entity_Id; Scop : Entity_Id); -- A call to a protected subprogram within the protected object may appear -- as a regular call. The list of actuals must be expanded to contain a -- reference to the object itself, and the call becomes a call to the -- corresponding protected subprogram. -------------------------------- -- Check_Overriding_Operation -- -------------------------------- procedure Check_Overriding_Operation (Subp : Entity_Id) is Typ : constant Entity_Id := Find_Dispatching_Type (Subp); Op_List : constant Elist_Id := Primitive_Operations (Typ); Op_Elmt : Elmt_Id; Prim_Op : Entity_Id; Par_Op : Entity_Id; begin if Is_Derived_Type (Typ) and then not Is_Private_Type (Typ) and then In_Open_Scopes (Scope (Etype (Typ))) and then Typ = Base_Type (Typ) then -- Subp overrides an inherited private operation if there is -- an inherited operation with a different name than Subp (see -- Derive_Subprogram) whose Alias is a hidden subprogram with -- the same name as Subp. Op_Elmt := First_Elmt (Op_List); while Present (Op_Elmt) loop Prim_Op := Node (Op_Elmt); Par_Op := Alias (Prim_Op); if Present (Par_Op) and then not Comes_From_Source (Prim_Op) and then Chars (Prim_Op) /= Chars (Par_Op) and then Chars (Par_Op) = Chars (Subp) and then Is_Hidden (Par_Op) and then Type_Conformant (Prim_Op, Subp) then Set_DT_Position (Subp, DT_Position (Prim_Op)); end if; Next_Elmt (Op_Elmt); end loop; end if; end Check_Overriding_Operation; ------------------------------- -- Detect_Infinite_Recursion -- ------------------------------- procedure Detect_Infinite_Recursion (N : Node_Id; Spec : Entity_Id) is Loc : constant Source_Ptr := Sloc (N); Var_List : Elist_Id := New_Elmt_List; -- List of globals referenced by body of procedure Call_List : Elist_Id := New_Elmt_List; -- List of recursive calls in body of procedure Shad_List : Elist_Id := New_Elmt_List; -- List of entity id's for entities created to capture the -- value of referenced globals on entry to the procedure. Scop : constant Uint := Scope_Depth (Spec); -- This is used to record the scope depth of the current -- procedure, so that we can identify global references. Max_Vars : constant := 4; -- Do not test more than four global variables Count_Vars : Natural := 0; -- Count variables found so far Var : Entity_Id; Elm : Elmt_Id; Ent : Entity_Id; Call : Elmt_Id; Decl : Node_Id; Test : Node_Id; Elm1 : Elmt_Id; Elm2 : Elmt_Id; Last : Node_Id; function Process (Nod : Node_Id) return Traverse_Result; -- Function to traverse the subprogram body (using Traverse_Func) ------------- -- Process -- ------------- function Process (Nod : Node_Id) return Traverse_Result is begin -- Procedure call if Nkind (Nod) = N_Procedure_Call_Statement then -- Case of one of the detected recursive calls if Is_Entity_Name (Name (Nod)) and then Has_Recursive_Call (Entity (Name (Nod))) and then Entity (Name (Nod)) = Spec then Append_Elmt (Nod, Call_List); return Skip; -- Any other procedure call may have side effects else return Abandon; end if; -- A call to a pure function can always be ignored elsif Nkind (Nod) = N_Function_Call and then Is_Entity_Name (Name (Nod)) and then Is_Pure (Entity (Name (Nod))) then return Skip; -- Case of an identifier reference elsif Nkind (Nod) = N_Identifier then Ent := Entity (Nod); -- If no entity, then ignore the reference -- Not clear why this can happen. To investigate, remove this -- test and look at the crash that occurs here in 3401-004 ??? if No (Ent) then return Skip; -- Ignore entities with no Scope, again not clear how this -- can happen, to investigate, look at 4108-008 ??? elsif No (Scope (Ent)) then return Skip; -- Ignore the reference if not to a more global object elsif Scope_Depth (Scope (Ent)) >= Scop then return Skip; -- References to types, exceptions and constants are always OK elsif Is_Type (Ent) or else Ekind (Ent) = E_Exception or else Ekind (Ent) = E_Constant then return Skip; -- If other than a non-volatile scalar variable, we have some -- kind of global reference (e.g. to a function) that we cannot -- deal with so we forget the attempt. elsif Ekind (Ent) /= E_Variable or else not Is_Scalar_Type (Etype (Ent)) or else Is_Volatile (Ent) then return Abandon; -- Otherwise we have a reference to a global scalar else -- Loop through global entities already detected Elm := First_Elmt (Var_List); loop -- If not detected before, record this new global reference if No (Elm) then Count_Vars := Count_Vars + 1; if Count_Vars <= Max_Vars then Append_Elmt (Entity (Nod), Var_List); else return Abandon; end if; exit; -- If recorded before, ignore elsif Node (Elm) = Entity (Nod) then return Skip; -- Otherwise keep looking else Next_Elmt (Elm); end if; end loop; return Skip; end if; -- For all other node kinds, recursively visit syntactic children else return OK; end if; end Process; function Traverse_Body is new Traverse_Func; -- Start of processing for Detect_Infinite_Recursion begin -- Do not attempt detection in No_Implicit_Conditional mode, -- since we won't be able to generate the code to handle the -- recursion in any case. if Restrictions (No_Implicit_Conditionals) then return; end if; -- Otherwise do traversal and quit if we get abandon signal if Traverse_Body (N) = Abandon then return; -- We must have a call, since Has_Recursive_Call was set. If not -- just ignore (this is only an error check, so if we have a funny -- situation, due to bugs or errors, we do not want to bomb!) elsif Is_Empty_Elmt_List (Call_List) then return; end if; -- Here is the case where we detect recursion at compile time -- Push our current scope for analyzing the declarations and -- code that we will insert for the checking. New_Scope (Spec); -- This loop builds temporary variables for each of the -- referenced globals, so that at the end of the loop the -- list Shad_List contains these temporaries in one-to-one -- correspondence with the elements in Var_List. Last := Empty; Elm := First_Elmt (Var_List); while Present (Elm) loop Var := Node (Elm); Ent := Make_Defining_Identifier (Loc, Chars => New_Internal_Name ('S')); Append_Elmt (Ent, Shad_List); -- Insert a declaration for this temporary at the start of -- the declarations for the procedure. The temporaries are -- declared as constant objects initialized to the current -- values of the corresponding temporaries. Decl := Make_Object_Declaration (Loc, Defining_Identifier => Ent, Object_Definition => New_Occurrence_Of (Etype (Var), Loc), Constant_Present => True, Expression => New_Occurrence_Of (Var, Loc)); if No (Last) then Prepend (Decl, Declarations (N)); else Insert_After (Last, Decl); end if; Last := Decl; Analyze (Decl); Next_Elmt (Elm); end loop; -- Loop through calls Call := First_Elmt (Call_List); while Present (Call) loop -- Build a predicate expression of the form -- True -- and then global1 = temp1 -- and then global2 = temp2 -- ... -- This predicate determines if any of the global values -- referenced by the procedure have changed since the -- current call, if not an infinite recursion is assured. Test := New_Occurrence_Of (Standard_True, Loc); Elm1 := First_Elmt (Var_List); Elm2 := First_Elmt (Shad_List); while Present (Elm1) loop Test := Make_And_Then (Loc, Left_Opnd => Test, Right_Opnd => Make_Op_Eq (Loc, Left_Opnd => New_Occurrence_Of (Node (Elm1), Loc), Right_Opnd => New_Occurrence_Of (Node (Elm2), Loc))); Next_Elmt (Elm1); Next_Elmt (Elm2); end loop; -- Now we replace the call with the sequence -- if no-changes (see above) then -- raise Storage_Error; -- else -- original-call -- end if; Rewrite (Node (Call), Make_If_Statement (Loc, Condition => Test, Then_Statements => New_List ( Make_Raise_Storage_Error (Loc)), Else_Statements => New_List ( Relocate_Node (Node (Call))))); Analyze (Node (Call)); Next_Elmt (Call); end loop; -- Remove temporary scope stack entry used for analysis Pop_Scope; end Detect_Infinite_Recursion; -------------------- -- Expand_Actuals -- -------------------- procedure Expand_Actuals (N : Node_Id; Subp : Entity_Id) is Loc : constant Source_Ptr := Sloc (N); Actual : Node_Id; Formal : Entity_Id; N_Node : Node_Id; Post_Call : List_Id; E_Formal : Entity_Id; procedure Add_Call_By_Copy_Code; -- For In and In-Out parameters, where the parameter must be passed -- by copy, this routine generates a temporary variable into which -- the actual is copied, and then passes this as the parameter. This -- routine also takes care of any constraint checks required for the -- type conversion case (on both the way in and the way out). procedure Add_Packed_Call_By_Copy_Code; -- This is used when the actual involves a reference to an element -- of a packed array, where we can appropriately use a simpler -- approach than the full call by copy code. We just copy the value -- in and out of an appropriate temporary. procedure Check_Fortran_Logical; -- A value of type Logical that is passed through a formal parameter -- must be normalized because .TRUE. usually does not have the same -- representation as True. We assume that .FALSE. = False = 0. -- What about functions that return a logical type ??? function Make_Var (Actual : Node_Id) return Entity_Id; -- Returns an entity that refers to the given actual parameter, -- Actual (not including any type conversion). If Actual is an -- entity name, then this entity is returned unchanged, otherwise -- a renaming is created to provide an entity for the actual. procedure Reset_Packed_Prefix; -- The expansion of a packed array component reference is delayed in -- the context of a call. Now we need to complete the expansion, so we -- unmark the analyzed bits in all prefixes. --------------------------- -- Add_Call_By_Copy_Code -- --------------------------- procedure Add_Call_By_Copy_Code is Expr : Node_Id; Init : Node_Id; Temp : Entity_Id; Var : Entity_Id; V_Typ : Entity_Id; Crep : Boolean; begin Temp := Make_Defining_Identifier (Loc, New_Internal_Name ('T')); if Nkind (Actual) = N_Type_Conversion then V_Typ := Etype (Expression (Actual)); Var := Make_Var (Expression (Actual)); Crep := not Same_Representation (Etype (Formal), Etype (Expression (Actual))); else V_Typ := Etype (Actual); Var := Make_Var (Actual); Crep := False; end if; -- Setup initialization for case of in out parameter, or an out -- parameter where the formal is an unconstrained array (in the -- latter case, we have to pass in an object with bounds). if Ekind (Formal) = E_In_Out_Parameter or else (Is_Array_Type (Etype (Formal)) and then not Is_Constrained (Etype (Formal))) then if Nkind (Actual) = N_Type_Conversion then if Conversion_OK (Actual) then Init := OK_Convert_To (Etype (Formal), New_Occurrence_Of (Var, Loc)); else Init := Convert_To (Etype (Formal), New_Occurrence_Of (Var, Loc)); end if; else Init := New_Occurrence_Of (Var, Loc); end if; -- An initialization is created for packed conversions as -- actuals for out parameters to enable Make_Object_Declaration -- to determine the proper subtype for N_Node. Note that this -- is wasteful because the extra copying on the call side is -- not required for such out parameters. ??? elsif Ekind (Formal) = E_Out_Parameter and then Nkind (Actual) = N_Type_Conversion and then (Is_Bit_Packed_Array (Etype (Formal)) or else Is_Bit_Packed_Array (Etype (Expression (Actual)))) then if Conversion_OK (Actual) then Init := OK_Convert_To (Etype (Formal), New_Occurrence_Of (Var, Loc)); else Init := Convert_To (Etype (Formal), New_Occurrence_Of (Var, Loc)); end if; else Init := Empty; end if; N_Node := Make_Object_Declaration (Loc, Defining_Identifier => Temp, Object_Definition => New_Occurrence_Of (Etype (Formal), Loc), Expression => Init); Set_Assignment_OK (N_Node); Insert_Action (N, N_Node); -- Now, normally the deal here is that we use the defining -- identifier created by that object declaration. There is -- one exception to this. In the change of representation case -- the above declaration will end up looking like: -- temp : type := identifier; -- And in this case we might as well use the identifier directly -- and eliminate the temporary. Note that the analysis of the -- declaration was not a waste of time in that case, since it is -- what generated the necessary change of representation code. If -- the change of representation introduced additional code, as in -- a fixed-integer conversion, the expression is not an identifier -- and must be kept. if Crep and then Present (Expression (N_Node)) and then Is_Entity_Name (Expression (N_Node)) then Temp := Entity (Expression (N_Node)); Rewrite (N_Node, Make_Null_Statement (Loc)); end if; -- If type conversion, use reverse conversion on exit if Nkind (Actual) = N_Type_Conversion then if Conversion_OK (Actual) then Expr := OK_Convert_To (V_Typ, New_Occurrence_Of (Temp, Loc)); else Expr := Convert_To (V_Typ, New_Occurrence_Of (Temp, Loc)); end if; else Expr := New_Occurrence_Of (Temp, Loc); end if; Rewrite (Actual, New_Reference_To (Temp, Loc)); Analyze (Actual); Append_To (Post_Call, Make_Assignment_Statement (Loc, Name => New_Occurrence_Of (Var, Loc), Expression => Expr)); Set_Assignment_OK (Name (Last (Post_Call))); end Add_Call_By_Copy_Code; ---------------------------------- -- Add_Packed_Call_By_Copy_Code -- ---------------------------------- procedure Add_Packed_Call_By_Copy_Code is Temp : Entity_Id; Incod : Node_Id; Outcod : Node_Id; Lhs : Node_Id; Rhs : Node_Id; begin Reset_Packed_Prefix; -- Prepare to generate code Temp := Make_Defining_Identifier (Loc, New_Internal_Name ('T')); Incod := Relocate_Node (Actual); Outcod := New_Copy_Tree (Incod); -- Generate declaration of temporary variable, initializing it -- with the input parameter unless we have an OUT variable. if Ekind (Formal) = E_Out_Parameter then Incod := Empty; end if; Insert_Action (N, Make_Object_Declaration (Loc, Defining_Identifier => Temp, Object_Definition => New_Occurrence_Of (Etype (Formal), Loc), Expression => Incod)); -- The actual is simply a reference to the temporary Rewrite (Actual, New_Occurrence_Of (Temp, Loc)); -- Generate copy out if OUT or IN OUT parameter if Ekind (Formal) /= E_In_Parameter then Lhs := Outcod; Rhs := New_Occurrence_Of (Temp, Loc); -- Deal with conversion if Nkind (Lhs) = N_Type_Conversion then Lhs := Expression (Lhs); Rhs := Convert_To (Etype (Actual), Rhs); end if; Append_To (Post_Call, Make_Assignment_Statement (Loc, Name => Lhs, Expression => Rhs)); end if; end Add_Packed_Call_By_Copy_Code; --------------------------- -- Check_Fortran_Logical -- --------------------------- procedure Check_Fortran_Logical is Logical : Entity_Id := Etype (Formal); Var : Entity_Id; -- Note: this is very incomplete, e.g. it does not handle arrays -- of logical values. This is really not the right approach at all???) begin if Convention (Subp) = Convention_Fortran and then Root_Type (Etype (Formal)) = Standard_Boolean and then Ekind (Formal) /= E_In_Parameter then Var := Make_Var (Actual); Append_To (Post_Call, Make_Assignment_Statement (Loc, Name => New_Occurrence_Of (Var, Loc), Expression => Unchecked_Convert_To ( Logical, Make_Op_Ne (Loc, Left_Opnd => New_Occurrence_Of (Var, Loc), Right_Opnd => Unchecked_Convert_To ( Logical, New_Occurrence_Of (Standard_False, Loc)))))); end if; end Check_Fortran_Logical; -------------- -- Make_Var -- -------------- function Make_Var (Actual : Node_Id) return Entity_Id is Var : Entity_Id; begin if Is_Entity_Name (Actual) then return Entity (Actual); else Var := Make_Defining_Identifier (Loc, New_Internal_Name ('T')); N_Node := Make_Object_Renaming_Declaration (Loc, Defining_Identifier => Var, Subtype_Mark => New_Occurrence_Of (Etype (Actual), Loc), Name => Relocate_Node (Actual)); Insert_Action (N, N_Node); return Var; end if; end Make_Var; ------------------------- -- Reset_Packed_Prefix -- ------------------------- procedure Reset_Packed_Prefix is Pfx : Node_Id := Actual; begin loop Set_Analyzed (Pfx, False); exit when Nkind (Pfx) /= N_Selected_Component and then Nkind (Pfx) /= N_Indexed_Component; Pfx := Prefix (Pfx); end loop; end Reset_Packed_Prefix; -- Start of processing for Expand_Actuals begin Formal := First_Formal (Subp); Actual := First_Actual (N); Post_Call := New_List; while Present (Formal) loop E_Formal := Etype (Formal); if Is_Scalar_Type (E_Formal) or else Nkind (Actual) = N_Slice then Check_Fortran_Logical; -- RM 6.4.1 (11) elsif Ekind (Formal) /= E_Out_Parameter then -- The unusual case of the current instance of a protected type -- requires special handling. This can only occur in the context -- of a call within the body of a protected operation. if Is_Entity_Name (Actual) and then Ekind (Entity (Actual)) = E_Protected_Type and then In_Open_Scopes (Entity (Actual)) then if Scope (Subp) /= Entity (Actual) then Error_Msg_N ("operation outside protected type may not " & "call back its protected operations?", Actual); end if; Rewrite (Actual, Expand_Protected_Object_Reference (N, Entity (Actual))); end if; Apply_Constraint_Check (Actual, E_Formal); -- Out parameter case. No constraint checks on access type -- RM 6.4.1 (13) elsif Is_Access_Type (E_Formal) then null; -- RM 6.4.1 (14) elsif Has_Discriminants (Base_Type (E_Formal)) or else Has_Non_Null_Base_Init_Proc (E_Formal) then Apply_Constraint_Check (Actual, E_Formal); -- RM 6.4.1 (15) else Apply_Constraint_Check (Actual, Base_Type (E_Formal)); end if; -- Processing for IN-OUT and OUT parameters if Ekind (Formal) /= E_In_Parameter then -- For type conversions of arrays, apply length/range checks if Is_Array_Type (E_Formal) and then Nkind (Actual) = N_Type_Conversion then if Is_Constrained (E_Formal) then Apply_Length_Check (Expression (Actual), E_Formal); else Apply_Range_Check (Expression (Actual), E_Formal); end if; end if; -- If argument is a type conversion for a type that is passed -- by copy, then we must pass the parameter by copy. if Nkind (Actual) = N_Type_Conversion and then (Is_Numeric_Type (E_Formal) or else Is_Access_Type (E_Formal) or else Is_Enumeration_Type (E_Formal) or else Is_Bit_Packed_Array (Etype (Formal)) or else Is_Bit_Packed_Array (Etype (Expression (Actual))) -- Also pass by copy if change of representation or else not Same_Representation (Etype (Formal), Etype (Expression (Actual)))) then Add_Call_By_Copy_Code; -- References to components of bit packed arrays are expanded -- at this point, rather than at the point of analysis of the -- actuals, to handle the expansion of the assignment to -- [in] out parameters. elsif Is_Ref_To_Bit_Packed_Array (Actual) then Add_Packed_Call_By_Copy_Code; -- References to slices of bit packed arrays are expanded elsif Is_Ref_To_Bit_Packed_Slice (Actual) then Add_Call_By_Copy_Code; -- Deal with access types where the actual subtpe and the -- formal subtype are not the same, requiring a check. -- It is necessary to exclude tagged types because of "downward -- conversion" errors and a strange assertion error in namet -- from gnatf in bug 1215-001 ??? elsif Is_Access_Type (E_Formal) and then not Same_Type (E_Formal, Etype (Actual)) and then not Is_Tagged_Type (Designated_Type (E_Formal)) then Add_Call_By_Copy_Code; elsif Is_Entity_Name (Actual) and then Is_Volatile (Entity (Actual)) and then not Is_Scalar_Type (Etype (Entity (Actual))) and then not Is_Volatile (E_Formal) then Add_Call_By_Copy_Code; elsif Nkind (Actual) = N_Indexed_Component and then Is_Entity_Name (Prefix (Actual)) and then Has_Volatile_Components (Entity (Prefix (Actual))) then Add_Call_By_Copy_Code; end if; -- The only processing required for IN parameters is in the packed -- array case, where we expand the indexed component (the circuit -- in Exp_Ch4 deliberately left indexed components appearing as -- actuals untouched, so that the special processing above for -- the OUT and IN OUT cases could be performed. We could make the -- test in Exp_Ch4 more complex and have it detect the parameter -- mode, but it is easier simply to handle all cases here. -- Similarly, we have to expand slices of packed arrays here else if Nkind (Actual) = N_Indexed_Component and then Is_Packed (Etype (Prefix (Actual))) then Reset_Packed_Prefix; Expand_Packed_Element_Reference (Actual); elsif Is_Ref_To_Bit_Packed_Array (Actual) then Add_Packed_Call_By_Copy_Code; elsif Is_Ref_To_Bit_Packed_Slice (Actual) then declare Typ : constant Entity_Id := Etype (Actual); Ent : constant Entity_Id := Make_Defining_Identifier (Loc, Chars => New_Internal_Name ('T')); Decl : constant Node_Id := Make_Object_Declaration (Loc, Defining_Identifier => Ent, Object_Definition => New_Occurrence_Of (Typ, Loc)); begin Set_No_Initialization (Decl); Insert_Actions (N, New_List ( Decl, Make_Assignment_Statement (Loc, Name => New_Occurrence_Of (Ent, Loc), Expression => Relocate_Node (Actual)))); Rewrite (Actual, New_Occurrence_Of (Ent, Loc)); Analyze_And_Resolve (Actual, Typ); end; end if; end if; Next_Formal (Formal); Next_Actual (Actual); end loop; -- Find right place to put post call stuff if it is present if not Is_Empty_List (Post_Call) then -- If call is not a list member, it must be the triggering -- statement of a triggering alternative or an entry call -- alternative, and we can add the post call stuff to the -- corresponding statement list. if not Is_List_Member (N) then declare P : constant Node_Id := Parent (N); begin pragma Assert (Nkind (P) = N_Triggering_Alternative or else Nkind (P) = N_Entry_Call_Alternative); if Is_Non_Empty_List (Statements (P)) then Insert_List_Before_And_Analyze (First (Statements (P)), Post_Call); else Set_Statements (P, Post_Call); end if; end; -- Otherwise, normal case where N is in a statement sequence, -- just put the post-call stuff after the call statement. else Insert_Actions_After (N, Post_Call); end if; end if; -- The call node itself is re-analyzed in Expand_Call. end Expand_Actuals; ----------------- -- Expand_Call -- ----------------- -- This procedure handles expansion of function calls and procedure call -- statements (i.e. it serves as the body for Expand_N_Function_Call and -- Expand_N_Procedure_Call_Statement. Processing for calls includes: -- Replace call to Raise_Exception by Raise_Exception always if possible -- Provide values of actuals for all formals in Extra_Formals list -- Replace "call" to enumeration literal function by literal itself -- Rewrite call to predefined operator as operator -- Replace actuals to in-out parameters that are numeric conversions, -- with explicit assignment to temporaries before and after the call. -- Remove optional actuals if First_Optional_Parameter specified. -- Note that the list of actuals has been filled with default expressions -- during semantic analysis of the call. Only the extra actuals required -- for the 'Constrained attribute and for accessibility checks are added -- at this point. procedure Expand_Call (N : Node_Id) is Loc : constant Source_Ptr := Sloc (N); Remote : constant Boolean := Is_Remote_Call (N); Subp : Entity_Id; Orig_Subp : Entity_Id := Empty; Parent_Subp : Entity_Id; Parent_Formal : Entity_Id; Actual : Node_Id; Formal : Entity_Id; Prev : Node_Id := Empty; Prev_Orig : Node_Id; Scop : Entity_Id; Extra_Actuals : List_Id := No_List; Cond : Node_Id; procedure Add_Actual_Parameter (Insert_Param : Node_Id); -- Adds one entry to the end of the actual parameter list. Used for -- default parameters and for extra actuals (for Extra_Formals). -- The argument is an N_Parameter_Association node. procedure Add_Extra_Actual (Expr : Node_Id; EF : Entity_Id); -- Adds an extra actual to the list of extra actuals. Expr -- is the expression for the value of the actual, EF is the -- entity for the extra formal. function Inherited_From_Formal (S : Entity_Id) return Entity_Id; -- Within an instance, a type derived from a non-tagged formal derived -- type inherits from the original parent, not from the actual. This is -- tested in 4723-003. The current derivation mechanism has the derived -- type inherit from the actual, which is only correct outside of the -- instance. If the subprogram is inherited, we test for this particular -- case through a convoluted tree traversal before setting the proper -- subprogram to be called. -------------------------- -- Add_Actual_Parameter -- -------------------------- procedure Add_Actual_Parameter (Insert_Param : Node_Id) is Actual_Expr : constant Node_Id := Explicit_Actual_Parameter (Insert_Param); begin -- Case of insertion is first named actual if No (Prev) or else Nkind (Parent (Prev)) /= N_Parameter_Association then Set_Next_Named_Actual (Insert_Param, First_Named_Actual (N)); Set_First_Named_Actual (N, Actual_Expr); if No (Prev) then if not Present (Parameter_Associations (N)) then Set_Parameter_Associations (N, New_List); Append (Insert_Param, Parameter_Associations (N)); end if; else Insert_After (Prev, Insert_Param); end if; -- Case of insertion is not first named actual else Set_Next_Named_Actual (Insert_Param, Next_Named_Actual (Parent (Prev))); Set_Next_Named_Actual (Parent (Prev), Actual_Expr); Append (Insert_Param, Parameter_Associations (N)); end if; Prev := Actual_Expr; end Add_Actual_Parameter; ---------------------- -- Add_Extra_Actual -- ---------------------- procedure Add_Extra_Actual (Expr : Node_Id; EF : Entity_Id) is Loc : constant Source_Ptr := Sloc (Expr); begin if Extra_Actuals = No_List then Extra_Actuals := New_List; Set_Parent (Extra_Actuals, N); end if; Append_To (Extra_Actuals, Make_Parameter_Association (Loc, Explicit_Actual_Parameter => Expr, Selector_Name => Make_Identifier (Loc, Chars (EF)))); Analyze_And_Resolve (Expr, Etype (EF)); end Add_Extra_Actual; --------------------------- -- Inherited_From_Formal -- --------------------------- function Inherited_From_Formal (S : Entity_Id) return Entity_Id is Par : Entity_Id; Gen_Par : Entity_Id; Gen_Prim : Elist_Id; Elmt : Elmt_Id; Indic : Node_Id; begin -- If the operation is inherited, it is attached to the corresponding -- type derivation. If the parent in the derivation is a generic -- actual, it is a subtype of the actual, and we have to recover the -- original derived type declaration to find the proper parent. if Nkind (Parent (S)) /= N_Full_Type_Declaration or else not Is_Derived_Type (Defining_Identifier (Parent (S))) or else Nkind (Type_Definition (Original_Node (Parent (S)))) /= N_Derived_Type_Definition then return Empty; else Indic := (Subtype_Indication (Type_Definition (Original_Node (Parent (S))))); if Nkind (Indic) = N_Subtype_Indication then Par := Entity (Subtype_Mark (Indic)); else Par := Entity (Indic); end if; end if; if not Is_Generic_Actual_Type (Par) or else Is_Tagged_Type (Par) or else Nkind (Parent (Par)) /= N_Subtype_Declaration or else not In_Open_Scopes (Scope (Par)) or else not In_Instance then return Empty; else Gen_Par := Generic_Parent_Type (Parent (Par)); end if; Gen_Prim := Collect_Primitive_Operations (Gen_Par); Elmt := First_Elmt (Gen_Prim); while Present (Elmt) loop if Chars (Node (Elmt)) = Chars (S) then declare F1 : Entity_Id; F2 : Entity_Id; begin F1 := First_Formal (S); F2 := First_Formal (Node (Elmt)); while Present (F1) and then Present (F2) loop if Etype (F1) = Etype (F2) or else Etype (F2) = Gen_Par then Next_Formal (F1); Next_Formal (F2); else Next_Elmt (Elmt); exit; -- not the right subprogram end if; return Node (Elmt); end loop; end; else Next_Elmt (Elmt); end if; end loop; raise Program_Error; end Inherited_From_Formal; -- Start of processing for Expand_Call begin -- Call using access to subprogram with explicit dereference if Nkind (Name (N)) = N_Explicit_Dereference then Subp := Etype (Name (N)); Parent_Subp := Empty; -- Case of call to simple entry, where the Name is a selected component -- whose prefix is the task, and whose selector name is the entry name elsif Nkind (Name (N)) = N_Selected_Component then Subp := Entity (Selector_Name (Name (N))); Parent_Subp := Empty; -- Case of call to member of entry family, where Name is an indexed -- component, with the prefix being a selected component giving the -- task and entry family name, and the index being the entry index. elsif Nkind (Name (N)) = N_Indexed_Component then Subp := Entity (Selector_Name (Prefix (Name (N)))); Parent_Subp := Empty; -- Normal case else Subp := Entity (Name (N)); Parent_Subp := Alias (Subp); -- Replace call to Raise_Exception by call to Raise_Exception_Always -- if we can tell that the first parameter cannot possibly be null. if not Restrictions (No_Exception_Handlers) and then Is_RTE (Subp, RE_Raise_Exception) then declare FA : constant Node_Id := Original_Node (First_Actual (N)); begin -- The case we catch is where the first argument is obtained -- using the Identity attribute (which must always be non-null) if Nkind (FA) = N_Attribute_Reference and then Attribute_Name (FA) = Name_Identity then Subp := RTE (RE_Raise_Exception_Always); Set_Entity (Name (N), Subp); end if; end; end if; if Ekind (Subp) = E_Entry then Parent_Subp := Empty; end if; end if; -- First step, compute extra actuals, corresponding to any -- Extra_Formals present. Note that we do not access Extra_Formals -- directly, instead we simply note the presence of the extra -- formals as we process the regular formals and collect the -- corresponding actuals in Extra_Actuals. Formal := First_Formal (Subp); Actual := First_Actual (N); while Present (Formal) loop Prev := Actual; Prev_Orig := Original_Node (Prev); -- Create possible extra actual for constrained case. Usually, -- the extra actual is of the form actual'constrained, but since -- this attribute is only available for unconstrained records, -- TRUE is expanded if the type of the formal happens to be -- constrained (for instance when this procedure is inherited -- from an unconstrained record to a constrained one) or if the -- actual has no discriminant (its type is constrained). An -- exception to this is the case of a private type without -- discriminants. In this case we pass FALSE because the -- object has underlying discriminants with defaults. if Present (Extra_Constrained (Formal)) then if Ekind (Etype (Prev)) in Private_Kind and then not Has_Discriminants (Base_Type (Etype (Prev))) then Add_Extra_Actual ( New_Occurrence_Of (Standard_False, Loc), Extra_Constrained (Formal)); elsif Is_Constrained (Etype (Formal)) or else not Has_Discriminants (Etype (Prev)) then Add_Extra_Actual ( New_Occurrence_Of (Standard_True, Loc), Extra_Constrained (Formal)); else -- If the actual is a type conversion, then the constrained -- test applies to the actual, not the target type. declare Act_Prev : Node_Id := Prev; begin -- Test for unchecked conversions as well, which can -- occur as out parameter actuals on calls to stream -- procedures. if Nkind (Act_Prev) = N_Type_Conversion or else Nkind (Act_Prev) = N_Unchecked_Type_Conversion then Act_Prev := Expression (Act_Prev); end if; Add_Extra_Actual ( Make_Attribute_Reference (Sloc (Prev), Prefix => Duplicate_Subexpr (Act_Prev, Name_Req => True), Attribute_Name => Name_Constrained), Extra_Constrained (Formal)); end; end if; end if; -- Create possible extra actual for accessibility level if Present (Extra_Accessibility (Formal)) then if Is_Entity_Name (Prev_Orig) then -- When passing an access parameter as the actual to another -- access parameter we need to pass along the actual's own -- associated access level parameter. This is done is we are -- in the scope of the formal access parameter (if this is an -- inlined body the extra formal is irrelevant). if Ekind (Entity (Prev_Orig)) in Formal_Kind and then Ekind (Etype (Prev_Orig)) = E_Anonymous_Access_Type and then In_Open_Scopes (Scope (Entity (Prev_Orig))) then declare Parm_Ent : constant Entity_Id := Param_Entity (Prev_Orig); begin pragma Assert (Present (Parm_Ent)); if Present (Extra_Accessibility (Parm_Ent)) then Add_Extra_Actual ( New_Occurrence_Of (Extra_Accessibility (Parm_Ent), Loc), Extra_Accessibility (Formal)); -- If the actual access parameter does not have an -- associated extra formal providing its scope level, -- then treat the actual as having library-level -- accessibility. else Add_Extra_Actual ( Make_Integer_Literal (Loc, Intval => Scope_Depth (Standard_Standard)), Extra_Accessibility (Formal)); end if; end; -- The actual is a normal access value, so just pass the -- level of the actual's access type. else Add_Extra_Actual ( Make_Integer_Literal (Loc, Intval => Type_Access_Level (Etype (Prev_Orig))), Extra_Accessibility (Formal)); end if; else case Nkind (Prev_Orig) is when N_Attribute_Reference => case Get_Attribute_Id (Attribute_Name (Prev_Orig)) is -- For X'Access, pass on the level of the prefix X when Attribute_Access => Add_Extra_Actual ( Make_Integer_Literal (Loc, Intval => Object_Access_Level (Prefix (Prev_Orig))), Extra_Accessibility (Formal)); -- Treat the unchecked attributes as library-level when Attribute_Unchecked_Access | Attribute_Unrestricted_Access => Add_Extra_Actual ( Make_Integer_Literal (Loc, Intval => Scope_Depth (Standard_Standard)), Extra_Accessibility (Formal)); -- No other cases of attributes returning access -- values that can be passed to access parameters when others => raise Program_Error; end case; -- For allocators we pass the level of the execution of -- the called subprogram, which is one greater than the -- current scope level. when N_Allocator => Add_Extra_Actual ( Make_Integer_Literal (Loc, Scope_Depth (Current_Scope) + 1), Extra_Accessibility (Formal)); -- For other cases we simply pass the level of the -- actual's access type. when others => Add_Extra_Actual ( Make_Integer_Literal (Loc, Intval => Type_Access_Level (Etype (Prev_Orig))), Extra_Accessibility (Formal)); end case; end if; end if; -- Perform the check of 4.6(49) that prevents a null value -- from being passed as an actual to an access parameter. -- Note that the check is elided in the common cases of -- passing an access attribute or access parameter as an -- actual. Also, we currently don't enforce this check for -- expander-generated actuals and when -gnatdj is set. if Ekind (Etype (Formal)) /= E_Anonymous_Access_Type or else Suppress_Accessibility_Checks (Subp) then null; elsif Debug_Flag_J then null; elsif not Comes_From_Source (Prev) then null; elsif Is_Entity_Name (Prev) and then Ekind (Etype (Prev)) = E_Anonymous_Access_Type then null; elsif Nkind (Prev) = N_Allocator or else Nkind (Prev) = N_Attribute_Reference then null; -- Suppress null checks when passing to access parameters -- of Java subprograms. (Should this be done for other -- foreign conventions as well ???) elsif Convention (Subp) = Convention_Java then null; else Cond := Make_Op_Eq (Loc, Left_Opnd => Duplicate_Subexpr (Prev), Right_Opnd => Make_Null (Loc)); Insert_Action (Prev, Make_Raise_Constraint_Error (Loc, Cond)); end if; -- Perform appropriate validity checks on parameters if Validity_Checks_On then if Ekind (Formal) = E_In_Parameter and then Validity_Check_In_Params then Ensure_Valid (Actual); elsif Ekind (Formal) = E_In_Out_Parameter and then Validity_Check_In_Out_Params then Ensure_Valid (Actual); end if; end if; -- For IN OUT and OUT parameters, ensure that subscripts are valid -- since this is a left side reference. We only do this for calls -- from the source program since we assume that compiler generated -- calls explicitly generate any required checks. We also need it -- only if we are doing standard validity checks, since clearly it -- is not needed if validity checks are off, and in subscript -- validity checking mode, all indexed components are checked with -- a call directly from Expand_N_Indexed_Component. if Comes_From_Source (N) and then Ekind (Formal) /= E_In_Parameter and then Validity_Checks_On and then Validity_Check_Default and then not Validity_Check_Subscripts then Check_Valid_Lvalue_Subscripts (Actual); end if; -- If the formal is class wide and the actual is an aggregate, force -- evaluation so that the back end who does not know about class-wide -- type, does not generate a temporary of the wrong size. if not Is_Class_Wide_Type (Etype (Formal)) then null; elsif Nkind (Actual) = N_Aggregate or else (Nkind (Actual) = N_Qualified_Expression and then Nkind (Expression (Actual)) = N_Aggregate) then Force_Evaluation (Actual); end if; -- In a remote call, if the formal is of a class-wide type, check -- that the actual meets the requirements described in E.4(18). if Remote and then Is_Class_Wide_Type (Etype (Formal)) then Insert_Action (Actual, Make_Implicit_If_Statement (N, Condition => Make_Op_Not (Loc, Get_Remotely_Callable (Duplicate_Subexpr (Actual))), Then_Statements => New_List ( Make_Procedure_Call_Statement (Loc, New_Occurrence_Of (RTE (RE_Raise_Program_Error_For_E_4_18), Loc))))); end if; Next_Actual (Actual); Next_Formal (Formal); end loop; -- If we are expanding a rhs of an assignement we need to check if -- tag propagation is needed. This code belongs theorically in Analyze -- Assignment but has to be done earlier (bottom-up) because the -- assignment might be transformed into a declaration for an uncons- -- trained value, if the expression is classwide. if Nkind (N) = N_Function_Call and then Is_Tag_Indeterminate (N) and then Is_Entity_Name (Name (N)) then declare Ass : Node_Id := Empty; begin if Nkind (Parent (N)) = N_Assignment_Statement then Ass := Parent (N); elsif Nkind (Parent (N)) = N_Qualified_Expression and then Nkind (Parent (Parent (N))) = N_Assignment_Statement then Ass := Parent (Parent (N)); end if; if Present (Ass) and then Is_Class_Wide_Type (Etype (Name (Ass))) then Propagate_Tag (Name (Ass), N); return; end if; end; end if; -- Deals with Dispatch_Call if we still have a call, before expanding -- extra actuals since this will be done on the re-analysis of the -- dispatching call. Note that we do not try to shorten the actual -- list for a dispatching call, it would not make sense to do so. -- Expansion of dispatching calls is suppressed when Java_VM, because -- the JVM back end directly handles the generation of dispatching -- calls and would have to undo any expansion to an indirect call. if (Nkind (N) = N_Function_Call or else Nkind (N) = N_Procedure_Call_Statement) and then Present (Controlling_Argument (N)) and then not Java_VM then Expand_Dispatch_Call (N); return; -- Similarly, expand calls to RCI subprograms on which pragma -- All_Calls_Remote applies. The rewriting will be reanalyzed -- later. Do this only when the call comes from source since we do -- not want such a rewritting to occur in expanded code. elsif Is_All_Remote_Call (N) then Expand_All_Calls_Remote_Subprogram_Call (N); -- Similarly, do not add extra actuals for an entry call whose entity -- is a protected procedure, or for an internal protected subprogram -- call, because it will be rewritten as a protected subprogram call -- and reanalyzed (see Expand_Protected_Subprogram_Call). elsif Is_Protected_Type (Scope (Subp)) and then (Ekind (Subp) = E_Procedure or else Ekind (Subp) = E_Function) then null; -- During that loop we gathered the extra actuals (the ones that -- correspond to Extra_Formals), so now they can be appended. else while Is_Non_Empty_List (Extra_Actuals) loop Add_Actual_Parameter (Remove_Head (Extra_Actuals)); end loop; end if; if Ekind (Subp) = E_Procedure or else (Ekind (Subp) = E_Subprogram_Type and then Etype (Subp) = Standard_Void_Type) or else Is_Entry (Subp) then Expand_Actuals (N, Subp); end if; -- If the subprogram is a renaming, or if it is inherited, replace it -- in the call with the name of the actual subprogram being called. -- If this is a dispatching call, the run-time decides what to call. -- The Alias attribute does not apply to entries. if Nkind (N) /= N_Entry_Call_Statement and then No (Controlling_Argument (N)) and then Present (Parent_Subp) then if Present (Inherited_From_Formal (Subp)) then Parent_Subp := Inherited_From_Formal (Subp); else while Present (Alias (Parent_Subp)) loop Parent_Subp := Alias (Parent_Subp); end loop; end if; Set_Entity (Name (N), Parent_Subp); if Is_Abstract (Parent_Subp) and then not In_Instance then Error_Msg_NE ("cannot call abstract subprogram &!", Name (N), Parent_Subp); end if; -- Add an explicit conversion for parameter of the derived type. -- This is only done for scalar and access in-parameters. Others -- have been expanded in expand_actuals. Formal := First_Formal (Subp); Parent_Formal := First_Formal (Parent_Subp); Actual := First_Actual (N); -- It is not clear that conversion is needed for intrinsic -- subprograms, but it certainly is for those that are user- -- defined, and that can be inherited on derivation, namely -- unchecked conversion and deallocation. -- General case needs study ??? if not Is_Intrinsic_Subprogram (Parent_Subp) or else Is_Generic_Instance (Parent_Subp) then while Present (Formal) loop if Etype (Formal) /= Etype (Parent_Formal) and then Is_Scalar_Type (Etype (Formal)) and then Ekind (Formal) = E_In_Parameter then Rewrite (Actual, OK_Convert_To (Etype (Parent_Formal), Relocate_Node (Actual))); Analyze (Actual); Resolve (Actual, Etype (Parent_Formal)); Enable_Range_Check (Actual); elsif Is_Access_Type (Etype (Formal)) and then Base_Type (Etype (Parent_Formal)) /= Base_Type (Etype (Actual)) then if Ekind (Formal) /= E_In_Parameter then Rewrite (Actual, Convert_To (Etype (Parent_Formal), Relocate_Node (Actual))); Analyze (Actual); Resolve (Actual, Etype (Parent_Formal)); elsif Ekind (Etype (Parent_Formal)) = E_Anonymous_Access_Type and then Designated_Type (Etype (Parent_Formal)) /= Designated_Type (Etype (Actual)) and then not Is_Controlling_Formal (Formal) then -- This unchecked conversion is not necessary unless -- inlining is unabled, because in that case the type -- mismatch may become visible in the body about to be -- inlined. Rewrite (Actual, Unchecked_Convert_To (Etype (Parent_Formal), Relocate_Node (Actual))); Analyze (Actual); Resolve (Actual, Etype (Parent_Formal)); end if; end if; Next_Formal (Formal); Next_Formal (Parent_Formal); Next_Actual (Actual); end loop; end if; Orig_Subp := Subp; Subp := Parent_Subp; end if; -- Some more special cases for cases other than explicit dereference if Nkind (Name (N)) /= N_Explicit_Dereference then -- Calls to an enumeration literal are replaced by the literal -- This case occurs only when we have a call to a function that -- is a renaming of an enumeration literal. The normal case of -- a direct reference to an enumeration literal has already been -- been dealt with by Resolve_Call. If the function is itself -- inherited (see 7423-001) the literal of the parent type must -- be explicitly converted to the return type of the function. if Ekind (Subp) = E_Enumeration_Literal then if Base_Type (Etype (Subp)) /= Base_Type (Etype (N)) then Rewrite (N, Convert_To (Etype (N), New_Occurrence_Of (Subp, Loc))); else Rewrite (N, New_Occurrence_Of (Subp, Loc)); Resolve (N, Etype (N)); end if; end if; -- Handle case of access to protected subprogram type else if Ekind (Base_Type (Etype (Prefix (Name (N))))) = E_Access_Protected_Subprogram_Type then -- If this is a call through an access to protected operation, -- the prefix has the form (object'address, operation'access). -- Rewrite as a for other protected calls: the object is the -- first parameter of the list of actuals. declare Call : Node_Id; Parm : List_Id; Nam : Node_Id; Obj : Node_Id; Ptr : Node_Id := Prefix (Name (N)); T : Entity_Id := Equivalent_Type (Base_Type (Etype (Ptr))); D_T : Entity_Id := Designated_Type (Base_Type (Etype (Ptr))); begin Obj := Make_Selected_Component (Loc, Prefix => Unchecked_Convert_To (T, Ptr), Selector_Name => New_Occurrence_Of (First_Entity (T), Loc)); Nam := Make_Selected_Component (Loc, Prefix => Unchecked_Convert_To (T, Ptr), Selector_Name => New_Occurrence_Of ( Next_Entity (First_Entity (T)), Loc)); Nam := Make_Explicit_Dereference (Loc, Nam); if Present (Parameter_Associations (N)) then Parm := Parameter_Associations (N); else Parm := New_List; end if; Prepend (Obj, Parm); if Etype (D_T) = Standard_Void_Type then Call := Make_Procedure_Call_Statement (Loc, Name => Nam, Parameter_Associations => Parm); else Call := Make_Function_Call (Loc, Name => Nam, Parameter_Associations => Parm); end if; Set_First_Named_Actual (Call, First_Named_Actual (N)); Set_Etype (Call, Etype (D_T)); -- We do not re-analyze the call to avoid infinite recursion. -- We analyze separately the prefix and the object, and set -- the checks on the prefix that would otherwise be emitted -- when resolving a call. Rewrite (N, Call); Analyze (Nam); Apply_Access_Check (Nam); Analyze (Obj); return; end; end if; end if; -- If this is a call to an intrinsic subprogram, then perform the -- appropriate expansion to the corresponding tree node and we -- are all done (since after that the call is gone!) if Is_Intrinsic_Subprogram (Subp) then Expand_Intrinsic_Call (N, Subp); return; end if; if Ekind (Subp) = E_Function or else Ekind (Subp) = E_Procedure then if Is_Inlined (Subp) then declare Spec : constant Node_Id := Unit_Declaration_Node (Subp); begin -- Verify that the body to inline has already been seen, -- and that if the body is in the current unit the inlining -- does not occur earlier. This avoids order-of-elaboration -- problems in gigi. if Present (Spec) and then Nkind (Spec) = N_Subprogram_Declaration and then Present (Body_To_Inline (Spec)) and then (In_Extended_Main_Code_Unit (N) or else In_Extended_Main_Code_Unit (Parent (N))) and then (not In_Same_Extended_Unit (Sloc (Body_To_Inline (Spec)), Loc) or else Earlier_In_Extended_Unit (Sloc (Body_To_Inline (Spec)), Loc)) then Expand_Inlined_Call (N, Subp, Orig_Subp); else -- Let the back-end handle it. Add_Inlined_Body (Subp); if Front_End_Inlining and then Nkind (Spec) = N_Subprogram_Declaration and then (In_Extended_Main_Code_Unit (N)) and then No (Body_To_Inline (Spec)) and then not Has_Completion (Subp) and then In_Same_Extended_Unit (Sloc (Spec), Loc) and then Ineffective_Inline_Warnings then Error_Msg_N ("call cannot be inlined before body is seen?", N); end if; end if; end; end if; end if; -- Check for a protected subprogram. This is either an intra-object -- call, or a protected function call. Protected procedure calls are -- rewritten as entry calls and handled accordingly. Scop := Scope (Subp); if Nkind (N) /= N_Entry_Call_Statement and then Is_Protected_Type (Scop) then -- If the call is an internal one, it is rewritten as a call to -- to the corresponding unprotected subprogram. Expand_Protected_Subprogram_Call (N, Subp, Scop); end if; -- Functions returning controlled objects need special attention if Controlled_Type (Etype (Subp)) and then not Is_Return_By_Reference_Type (Etype (Subp)) then Expand_Ctrl_Function_Call (N); end if; -- Test for First_Optional_Parameter, and if so, truncate parameter -- list if there are optional parameters at the trailing end. -- Note we never delete procedures for call via a pointer. if (Ekind (Subp) = E_Procedure or else Ekind (Subp) = E_Function) and then Present (First_Optional_Parameter (Subp)) then declare Last_Keep_Arg : Node_Id; begin -- Last_Keep_Arg will hold the last actual that should be -- retained. If it remains empty at the end, it means that -- all parameters are optional. Last_Keep_Arg := Empty; -- Find first optional parameter, must be present since we -- checked the validity of the parameter before setting it. Formal := First_Formal (Subp); Actual := First_Actual (N); while Formal /= First_Optional_Parameter (Subp) loop Last_Keep_Arg := Actual; Next_Formal (Formal); Next_Actual (Actual); end loop; -- Now we have Formal and Actual pointing to the first -- potentially droppable argument. We can drop all the -- trailing arguments whose actual matches the default. -- Note that we know that all remaining formals have -- defaults, because we checked that this requirement -- was met before setting First_Optional_Parameter. -- We use Fully_Conformant_Expressions to check for identity -- between formals and actuals, which may miss some cases, but -- on the other hand, this is only an optimization (if we fail -- to truncate a parameter it does not affect functionality). -- So if the default is 3 and the actual is 1+2, we consider -- them unequal, which hardly seems worrisome. while Present (Formal) loop if not Fully_Conformant_Expressions (Actual, Default_Value (Formal)) then Last_Keep_Arg := Actual; end if; Next_Formal (Formal); Next_Actual (Actual); end loop; -- If no arguments, delete entire list, this is the easy case if No (Last_Keep_Arg) then while Is_Non_Empty_List (Parameter_Associations (N)) loop Delete_Tree (Remove_Head (Parameter_Associations (N))); end loop; Set_Parameter_Associations (N, No_List); Set_First_Named_Actual (N, Empty); -- Case where at the last retained argument is positional. This -- is also an easy case, since the retained arguments are already -- in the right form, and we don't need to worry about the order -- of arguments that get eliminated. elsif Is_List_Member (Last_Keep_Arg) then while Present (Next (Last_Keep_Arg)) loop Delete_Tree (Remove_Next (Last_Keep_Arg)); end loop; Set_First_Named_Actual (N, Empty); -- This is the annoying case where the last retained argument -- is a named parameter. Since the original arguments are not -- in declaration order, we may have to delete some fairly -- random collection of arguments. else declare Temp : Node_Id; Passoc : Node_Id; Junk : Node_Id; begin -- First step, remove all the named parameters from the -- list (they are still chained using First_Named_Actual -- and Next_Named_Actual, so we have not lost them!) Temp := First (Parameter_Associations (N)); -- Case of all parameters named, remove them all if Nkind (Temp) = N_Parameter_Association then while Is_Non_Empty_List (Parameter_Associations (N)) loop Temp := Remove_Head (Parameter_Associations (N)); end loop; -- Case of mixed positional/named, remove named parameters else while Nkind (Next (Temp)) /= N_Parameter_Association loop Next (Temp); end loop; while Present (Next (Temp)) loop Junk := Remove_Next (Temp); end loop; end if; -- Now we loop through the named parameters, till we get -- to the last one to be retained, adding them to the list. -- Note that the Next_Named_Actual list does not need to be -- touched since we are only reordering them on the actual -- parameter association list. Passoc := Parent (First_Named_Actual (N)); loop Temp := Relocate_Node (Passoc); Append_To (Parameter_Associations (N), Temp); exit when Last_Keep_Arg = Explicit_Actual_Parameter (Passoc); Passoc := Parent (Next_Named_Actual (Passoc)); end loop; Set_Next_Named_Actual (Temp, Empty); loop Temp := Next_Named_Actual (Passoc); exit when No (Temp); Set_Next_Named_Actual (Passoc, Next_Named_Actual (Parent (Temp))); Delete_Tree (Temp); end loop; end; end if; end; end if; end Expand_Call; -------------------------- -- Expand_Inlined_Call -- -------------------------- procedure Expand_Inlined_Call (N : Node_Id; Subp : Entity_Id; Orig_Subp : Entity_Id) is Loc : constant Source_Ptr := Sloc (N); Blk : Node_Id; Bod : Node_Id; Decl : Node_Id; Exit_Lab : Entity_Id := Empty; F : Entity_Id; A : Node_Id; Lab_Decl : Node_Id; Lab_Id : Node_Id; New_A : Node_Id; Num_Ret : Int := 0; Orig_Bod : constant Node_Id := Body_To_Inline (Unit_Declaration_Node (Subp)); Ret_Type : Entity_Id; Targ : Node_Id; Temp : Entity_Id; Temp_Typ : Entity_Id; procedure Make_Exit_Label; -- Build declaration for exit label to be used in Return statements. function Process_Formals (N : Node_Id) return Traverse_Result; -- Replace occurrence of a formal with the corresponding actual, or -- the thunk generated for it. procedure Rewrite_Function_Call (N : Node_Id; Blk : Node_Id); -- If the function body is a single expression, replace call with -- expression, else insert block appropriately. procedure Rewrite_Procedure_Call (N : Node_Id; Blk : Node_Id); -- If procedure body has no local variables, inline body without -- creating block, otherwise rewrite call with block. --------------------- -- Make_Exit_Label -- --------------------- procedure Make_Exit_Label is begin -- Create exit label for subprogram, if one doesn't exist yet. if No (Exit_Lab) then Lab_Id := Make_Identifier (Loc, New_Internal_Name ('L')); Set_Entity (Lab_Id, Make_Defining_Identifier (Loc, Chars (Lab_Id))); Exit_Lab := Make_Label (Loc, Lab_Id); Lab_Decl := Make_Implicit_Label_Declaration (Loc, Defining_Identifier => Entity (Lab_Id), Label_Construct => Exit_Lab); end if; end Make_Exit_Label; --------------------- -- Process_Formals -- --------------------- function Process_Formals (N : Node_Id) return Traverse_Result is A : Entity_Id; E : Entity_Id; Ret : Node_Id; begin if Is_Entity_Name (N) and then Present (Entity (N)) then E := Entity (N); if Is_Formal (E) and then Scope (E) = Subp then A := Renamed_Object (E); if Is_Entity_Name (A) then Rewrite (N, New_Occurrence_Of (Entity (A), Loc)); elsif Nkind (A) = N_Defining_Identifier then Rewrite (N, New_Occurrence_Of (A, Loc)); else -- numeric literal Rewrite (N, New_Copy (A)); end if; end if; return Skip; elsif Nkind (N) = N_Return_Statement then if No (Expression (N)) then Make_Exit_Label; Rewrite (N, Make_Goto_Statement (Loc, Name => New_Copy (Lab_Id))); else if Nkind (Parent (N)) = N_Handled_Sequence_Of_Statements and then Nkind (Parent (Parent (N))) = N_Subprogram_Body then -- function body is a single expression. No need for -- exit label. null; else Num_Ret := Num_Ret + 1; Make_Exit_Label; end if; -- Because of the presence of private types, the views of the -- expression and the context may be different, so place an -- unchecked conversion to the context type to avoid spurious -- errors, eg. when the expression is a numeric literal and -- the context is private. If the expression is an aggregate, -- use a qualified expression, because an aggregate is not a -- legal argument of a conversion. if Nkind (Expression (N)) = N_Aggregate then Ret := Make_Qualified_Expression (Sloc (N), Subtype_Mark => New_Occurrence_Of (Ret_Type, Sloc (N)), Expression => Relocate_Node (Expression (N))); else Ret := Unchecked_Convert_To (Ret_Type, Relocate_Node (Expression (N))); end if; if Nkind (Targ) = N_Defining_Identifier then Rewrite (N, Make_Assignment_Statement (Loc, Name => New_Occurrence_Of (Targ, Loc), Expression => Ret)); else Rewrite (N, Make_Assignment_Statement (Loc, Name => New_Copy (Targ), Expression => Ret)); end if; Set_Assignment_OK (Name (N)); if Present (Exit_Lab) then Insert_After (N, Make_Goto_Statement (Loc, Name => New_Copy (Lab_Id))); end if; end if; return OK; else return OK; end if; end Process_Formals; procedure Replace_Formals is new Traverse_Proc (Process_Formals); --------------------------- -- Rewrite_Function_Call -- --------------------------- procedure Rewrite_Function_Call (N : Node_Id; Blk : Node_Id) is HSS : Node_Id := Handled_Statement_Sequence (Blk); Fst : Node_Id := First (Statements (HSS)); begin -- Optimize simple case: function body is a single return statement, -- which has been expanded into an assignment. if Is_Empty_List (Declarations (Blk)) and then Nkind (Fst) = N_Assignment_Statement and then No (Next (Fst)) then -- The function call may have been rewritten as the temporary -- that holds the result of the call, in which case remove the -- now useless declaration. if Nkind (N) = N_Identifier and then Nkind (Parent (Entity (N))) = N_Object_Declaration then Rewrite (Parent (Entity (N)), Make_Null_Statement (Loc)); end if; Rewrite (N, Expression (Fst)); elsif Nkind (N) = N_Identifier and then Nkind (Parent (Entity (N))) = N_Object_Declaration then -- The block assigns the result of the call to the temporary. Insert_After (Parent (Entity (N)), Blk); elsif Nkind (Parent (N)) = N_Assignment_Statement and then Is_Entity_Name (Name (Parent (N))) then -- replace assignment with the block. Rewrite (Parent (N), Blk); elsif Nkind (Parent (N)) = N_Object_Declaration then Set_Expression (Parent (N), Empty); Insert_After (Parent (N), Blk); end if; end Rewrite_Function_Call; ---------------------------- -- Rewrite_Procedure_Call -- ---------------------------- procedure Rewrite_Procedure_Call (N : Node_Id; Blk : Node_Id) is HSS : Node_Id := Handled_Statement_Sequence (Blk); begin if Is_Empty_List (Declarations (Blk)) then Insert_List_After (N, Statements (HSS)); Rewrite (N, Make_Null_Statement (Loc)); else Rewrite (N, Blk); end if; end Rewrite_Procedure_Call; -- Start of processing for Expand_Inlined_Call begin if Nkind (Orig_Bod) = N_Defining_Identifier then -- Subprogram is a renaming_as_body. Calls appearing after the -- renaming can be replaced with calls to the renamed entity -- directly, because the subprograms are subtype conformant. Set_Name (N, New_Occurrence_Of (Orig_Bod, Loc)); return; end if; -- Use generic machinery to copy body of inlined subprogram, as if it -- were an instantiation, resetting source locations appropriately, so -- that nested inlined calls appear in the main unit. Save_Env (Subp, Empty); Set_Copied_Sloc (N, Defining_Entity (Orig_Bod)); Bod := Copy_Generic_Node (Orig_Bod, Empty, Instantiating => True); Blk := Make_Block_Statement (Loc, Declarations => Declarations (Bod), Handled_Statement_Sequence => Handled_Statement_Sequence (Bod)); if No (Declarations (Bod)) then Set_Declarations (Blk, New_List); end if; -- If this is a derived function, establish the proper return type. if Present (Orig_Subp) and then Orig_Subp /= Subp then Ret_Type := Etype (Orig_Subp); else Ret_Type := Etype (Subp); end if; F := First_Formal (Subp); A := First_Actual (N); -- Create temporaries for the actuals that are expressions, or that -- are scalars and require copying to preserve semantics. while Present (F) loop if Present (Renamed_Object (F)) then Error_Msg_N (" cannot inline call to recursive subprogram", N); return; end if; -- If the argument may be a controlling argument in a call within -- the inlined body, we must preserve its classwide nature to -- insure that dynamic dispatching take place subsequently. -- If the formal has a constraint it must be preserved to retain -- the semantics of the body. if Is_Class_Wide_Type (Etype (F)) or else (Is_Access_Type (Etype (F)) and then Is_Class_Wide_Type (Designated_Type (Etype (F)))) then Temp_Typ := Etype (F); elsif Base_Type (Etype (F)) = Base_Type (Etype (A)) and then Etype (F) /= Base_Type (Etype (F)) then Temp_Typ := Etype (F); else Temp_Typ := Etype (A); end if; if (not Is_Entity_Name (A) and then Nkind (A) /= N_Integer_Literal and then Nkind (A) /= N_Real_Literal) or else Is_Scalar_Type (Etype (A)) then Temp := Make_Defining_Identifier (Loc, Chars => New_Internal_Name ('C')); -- If the actual for an in/in-out parameter is a view conversion, -- make it into an unchecked conversion, given that an untagged -- type conversion is not a proper object for a renaming. -- In-out conversions that involve real conversions have already -- been transformed in Expand_Actuals. if Nkind (A) = N_Type_Conversion and then (Ekind (F) = E_In_Out_Parameter or else not Is_Tagged_Type (Etype (F))) then New_A := Make_Unchecked_Type_Conversion (Loc, Subtype_Mark => New_Occurrence_Of (Etype (F), Loc), Expression => Relocate_Node (Expression (A))); elsif Etype (F) /= Etype (A) then New_A := Unchecked_Convert_To (Etype (F), Relocate_Node (A)); Temp_Typ := Etype (F); else New_A := Relocate_Node (A); end if; Set_Sloc (New_A, Sloc (N)); if Ekind (F) = E_In_Parameter and then not Is_Limited_Type (Etype (A)) then Decl := Make_Object_Declaration (Loc, Defining_Identifier => Temp, Constant_Present => True, Object_Definition => New_Occurrence_Of (Temp_Typ, Loc), Expression => New_A); else Decl := Make_Object_Renaming_Declaration (Loc, Defining_Identifier => Temp, Subtype_Mark => New_Occurrence_Of (Temp_Typ, Loc), Name => New_A); end if; Prepend (Decl, Declarations (Blk)); Set_Renamed_Object (F, Temp); else if Etype (F) /= Etype (A) then Set_Renamed_Object (F, Unchecked_Convert_To (Etype (F), Relocate_Node (A))); else Set_Renamed_Object (F, A); end if; end if; Next_Formal (F); Next_Actual (A); end loop; -- Establish target of function call. If context is not assignment or -- declaration, create a temporary as a target. The declaration for -- the temporary may be subsequently optimized away if the body is a -- single expression, or if the left-hand side of the assignment is -- simple enough. if Ekind (Subp) = E_Function then if Nkind (Parent (N)) = N_Assignment_Statement and then Is_Entity_Name (Name (Parent (N))) then Targ := Name (Parent (N)); else -- Replace call with temporary, and create its declaration. Temp := Make_Defining_Identifier (Loc, New_Internal_Name ('C')); Decl := Make_Object_Declaration (Loc, Defining_Identifier => Temp, Object_Definition => New_Occurrence_Of (Ret_Type, Loc)); Set_No_Initialization (Decl); Insert_Action (N, Decl); Rewrite (N, New_Occurrence_Of (Temp, Loc)); Targ := Temp; end if; end if; -- Traverse the tree and replace formals with actuals or their thunks. -- Attach block to tree before analysis and rewriting. Replace_Formals (Blk); Set_Parent (Blk, N); if Present (Exit_Lab) then -- If the body was a single expression, the single return statement -- and the corresponding label are useless. if Num_Ret = 1 and then Nkind (Last (Statements (Handled_Statement_Sequence (Blk)))) = N_Goto_Statement then Remove (Last (Statements (Handled_Statement_Sequence (Blk)))); else Append (Lab_Decl, (Declarations (Blk))); Append (Exit_Lab, Statements (Handled_Statement_Sequence (Blk))); end if; end if; -- Analyze Blk with In_Inlined_Body set, to avoid spurious errors on -- conflicting private views that Gigi would ignore. declare I_Flag : constant Boolean := In_Inlined_Body; begin In_Inlined_Body := True; Analyze (Blk); In_Inlined_Body := I_Flag; end; if Ekind (Subp) = E_Procedure then Rewrite_Procedure_Call (N, Blk); else Rewrite_Function_Call (N, Blk); end if; Restore_Env; -- Cleanup mapping between formals and actuals, for other expansions. F := First_Formal (Subp); while Present (F) loop Set_Renamed_Object (F, Empty); Next_Formal (F); end loop; end Expand_Inlined_Call; ---------------------------- -- Expand_N_Function_Call -- ---------------------------- procedure Expand_N_Function_Call (N : Node_Id) is Typ : constant Entity_Id := Etype (N); function Returned_By_Reference return Boolean; -- If the return type is returned through the secondary stack. i.e. -- by reference, we don't want to create a temporary to force stack -- checking. function Returned_By_Reference return Boolean is S : Entity_Id := Current_Scope; begin if Is_Return_By_Reference_Type (Typ) then return True; elsif Nkind (Parent (N)) /= N_Return_Statement then return False; elsif Requires_Transient_Scope (Typ) then -- Verify that the return type of the enclosing function has -- the same constrained status as that of the expression. while Ekind (S) /= E_Function loop S := Scope (S); end loop; return Is_Constrained (Typ) = Is_Constrained (Etype (S)); else return False; end if; end Returned_By_Reference; -- Start of processing for Expand_N_Function_Call begin -- A special check. If stack checking is enabled, and the return type -- might generate a large temporary, and the call is not the right -- side of an assignment, then generate an explicit temporary. We do -- this because otherwise gigi may generate a large temporary on the -- fly and this can cause trouble with stack checking. if May_Generate_Large_Temp (Typ) and then Nkind (Parent (N)) /= N_Assignment_Statement and then (Nkind (Parent (N)) /= N_Object_Declaration or else Expression (Parent (N)) /= N) and then not Returned_By_Reference then -- Note: it might be thought that it would be OK to use a call to -- Force_Evaluation here, but that's not good enough, because that -- results in a 'Reference construct that may still need a temporary. declare Loc : constant Source_Ptr := Sloc (N); Temp_Obj : constant Entity_Id := Make_Defining_Identifier (Loc, New_Internal_Name ('F')); Temp_Typ : Entity_Id := Typ; Decl : Node_Id; A : Node_Id; F : Entity_Id; Proc : Entity_Id; begin if Is_Tagged_Type (Typ) and then Present (Controlling_Argument (N)) then if Nkind (Parent (N)) /= N_Procedure_Call_Statement and then Nkind (Parent (N)) /= N_Function_Call then -- If this is a tag-indeterminate call, the object must -- be classwide. if Is_Tag_Indeterminate (N) then Temp_Typ := Class_Wide_Type (Typ); end if; else -- If this is a dispatching call that is itself the -- controlling argument of an enclosing call, the nominal -- subtype of the object that replaces it must be classwide, -- so that dispatching will take place properly. If it is -- not a controlling argument, the object is not classwide. Proc := Entity (Name (Parent (N))); F := First_Formal (Proc); A := First_Actual (Parent (N)); while A /= N loop Next_Formal (F); Next_Actual (A); end loop; if Is_Controlling_Formal (F) then Temp_Typ := Class_Wide_Type (Typ); end if; end if; end if; Decl := Make_Object_Declaration (Loc, Defining_Identifier => Temp_Obj, Object_Definition => New_Occurrence_Of (Temp_Typ, Loc), Constant_Present => True, Expression => Relocate_Node (N)); Set_Assignment_OK (Decl); Insert_Actions (N, New_List (Decl)); Rewrite (N, New_Occurrence_Of (Temp_Obj, Loc)); end; -- Normal case, expand the call else Expand_Call (N); end if; end Expand_N_Function_Call; --------------------------------------- -- Expand_N_Procedure_Call_Statement -- --------------------------------------- procedure Expand_N_Procedure_Call_Statement (N : Node_Id) is begin Expand_Call (N); end Expand_N_Procedure_Call_Statement; ------------------------------ -- Expand_N_Subprogram_Body -- ------------------------------ -- Add poll call if ATC polling is enabled -- Add return statement if last statement in body is not a return -- statement (this makes things easier on Gigi which does not want -- to have to handle a missing return). -- Add call to Activate_Tasks if body is a task activator -- Deal with possible detection of infinite recursion -- Eliminate body completely if convention stubbed -- Encode entity names within body, since we will not need to reference -- these entities any longer in the front end. -- Initialize scalar out parameters if Initialize/Normalize_Scalars -- Reset Pure indication if any parameter has root type System.Address procedure Expand_N_Subprogram_Body (N : Node_Id) is Loc : constant Source_Ptr := Sloc (N); H : constant Node_Id := Handled_Statement_Sequence (N); Body_Id : Entity_Id; Spec_Id : Entity_Id; Except_H : Node_Id; Scop : Entity_Id; Dec : Node_Id; Next_Op : Node_Id; L : List_Id; procedure Add_Return (S : List_Id); -- Append a return statement to the statement sequence S if the last -- statement is not already a return or a goto statement. Note that -- the latter test is not critical, it does not matter if we add a -- few extra returns, since they get eliminated anyway later on. ---------------- -- Add_Return -- ---------------- procedure Add_Return (S : List_Id) is Last_S : constant Node_Id := Last (S); -- Get original node, in case raise has been rewritten begin if not Is_Transfer (Last_S) then Append_To (S, Make_Return_Statement (Sloc (Last_S))); end if; end Add_Return; -- Start of processing for Expand_N_Subprogram_Body begin -- Set L to either the list of declarations if present, or -- to the list of statements if no declarations are present. -- This is used to insert new stuff at the start. if Is_Non_Empty_List (Declarations (N)) then L := Declarations (N); else L := Statements (Handled_Statement_Sequence (N)); end if; -- Need poll on entry to subprogram if polling enabled. We only -- do this for non-empty subprograms, since it does not seem -- necessary to poll for a dummy null subprogram. if Is_Non_Empty_List (L) then Generate_Poll_Call (First (L)); end if; -- Find entity for subprogram Body_Id := Defining_Entity (N); if Present (Corresponding_Spec (N)) then Spec_Id := Corresponding_Spec (N); else Spec_Id := Body_Id; end if; -- If this is a Pure function which has any parameters whose root -- type is System.Address, reset the Pure indication, since it will -- likely cause incorrect code to be generated. if Is_Pure (Spec_Id) and then Is_Subprogram (Spec_Id) and then not Has_Pragma_Pure_Function (Spec_Id) then declare F : Entity_Id := First_Formal (Spec_Id); begin while Present (F) loop if Is_RTE (Root_Type (Etype (F)), RE_Address) then Set_Is_Pure (Spec_Id, False); if Spec_Id /= Body_Id then Set_Is_Pure (Body_Id, False); end if; exit; end if; Next_Formal (F); end loop; end; end if; -- Initialize any scalar OUT args if Initialize/Normalize_Scalars if Init_Or_Norm_Scalars and then Is_Subprogram (Spec_Id) then declare F : Entity_Id := First_Formal (Spec_Id); V : constant Boolean := Validity_Checks_On; begin -- We turn off validity checking, since we do not want any -- check on the initializing value itself (which we know -- may well be invalid!) Validity_Checks_On := False; -- Loop through formals while Present (F) loop if Is_Scalar_Type (Etype (F)) and then Ekind (F) = E_Out_Parameter then Insert_Before_And_Analyze (First (L), Make_Assignment_Statement (Loc, Name => New_Occurrence_Of (F, Loc), Expression => Get_Simple_Init_Val (Etype (F), Loc))); end if; Next_Formal (F); end loop; Validity_Checks_On := V; end; end if; -- Clear out statement list for stubbed procedure if Present (Corresponding_Spec (N)) then Set_Elaboration_Flag (N, Spec_Id); if Convention (Spec_Id) = Convention_Stubbed or else Is_Eliminated (Spec_Id) then Set_Declarations (N, Empty_List); Set_Handled_Statement_Sequence (N, Make_Handled_Sequence_Of_Statements (Loc, Statements => New_List ( Make_Null_Statement (Loc)))); return; end if; end if; Scop := Scope (Spec_Id); -- Returns_By_Ref flag is normally set when the subprogram is frozen -- but subprograms with no specs are not frozen declare Typ : constant Entity_Id := Etype (Spec_Id); Utyp : constant Entity_Id := Underlying_Type (Typ); begin if not Acts_As_Spec (N) and then Nkind (Parent (Parent (Spec_Id))) /= N_Subprogram_Body_Stub then null; elsif Is_Return_By_Reference_Type (Typ) then Set_Returns_By_Ref (Spec_Id); elsif Present (Utyp) and then Controlled_Type (Utyp) then Set_Returns_By_Ref (Spec_Id); end if; end; -- For a procedure, we add a return for all possible syntactic ends -- of the subprogram. Note that reanalysis is not necessary in this -- case since it would require a lot of work and accomplish nothing. if Ekind (Spec_Id) = E_Procedure or else Ekind (Spec_Id) = E_Generic_Procedure then Add_Return (Statements (H)); if Present (Exception_Handlers (H)) then Except_H := First_Non_Pragma (Exception_Handlers (H)); while Present (Except_H) loop Add_Return (Statements (Except_H)); Next_Non_Pragma (Except_H); end loop; end if; -- For a function, we must deal with the case where there is at -- least one missing return. What we do is to wrap the entire body -- of the function in a block: -- begin -- ... -- end; -- becomes -- begin -- begin -- ... -- end; -- raise Program_Error; -- end; -- This approach is necessary because the raise must be signalled -- to the caller, not handled by any local handler (RM 6.4(11)). -- Note: we do not need to analyze the constructed sequence here, -- since it has no handler, and an attempt to analyze the handled -- statement sequence twice is risky in various ways (e.g. the -- issue of expanding cleanup actions twice). elsif Has_Missing_Return (Spec_Id) then declare Hloc : constant Source_Ptr := Sloc (H); Blok : constant Node_Id := Make_Block_Statement (Hloc, Handled_Statement_Sequence => H); Rais : constant Node_Id := Make_Raise_Program_Error (Hloc); begin Set_Handled_Statement_Sequence (N, Make_Handled_Sequence_Of_Statements (Hloc, Statements => New_List (Blok, Rais))); New_Scope (Spec_Id); Analyze (Blok); Analyze (Rais); Pop_Scope; end; end if; -- Add discriminal renamings to protected subprograms. -- Install new discriminals for expansion of the next -- subprogram of this protected type, if any. if Is_List_Member (N) and then Present (Parent (List_Containing (N))) and then Nkind (Parent (List_Containing (N))) = N_Protected_Body then Add_Discriminal_Declarations (Declarations (N), Scop, Name_uObject, Loc); Add_Private_Declarations (Declarations (N), Scop, Name_uObject, Loc); -- Associate privals and discriminals with the next protected -- operation body to be expanded. These are used to expand -- references to private data objects and discriminants, -- respectively. Next_Op := Next_Protected_Operation (N); if Present (Next_Op) then Dec := Parent (Base_Type (Scop)); Set_Privals (Dec, Next_Op, Loc); Set_Discriminals (Dec, Next_Op, Loc); end if; end if; -- If subprogram contains a parameterless recursive call, then we may -- have an infinite recursion, so see if we can generate code to check -- for this possibility if storage checks are not suppressed. if Ekind (Spec_Id) = E_Procedure and then Has_Recursive_Call (Spec_Id) and then not Storage_Checks_Suppressed (Spec_Id) then Detect_Infinite_Recursion (N, Spec_Id); end if; -- Finally, if we are in Normalize_Scalars mode, then any scalar out -- parameters must be initialized to the appropriate default value. if Ekind (Spec_Id) = E_Procedure and then Normalize_Scalars then declare Floc : Source_Ptr; Formal : Entity_Id; Stm : Node_Id; begin Formal := First_Formal (Spec_Id); while Present (Formal) loop Floc := Sloc (Formal); if Ekind (Formal) = E_Out_Parameter and then Is_Scalar_Type (Etype (Formal)) then Stm := Make_Assignment_Statement (Floc, Name => New_Occurrence_Of (Formal, Floc), Expression => Get_Simple_Init_Val (Etype (Formal), Floc)); Prepend (Stm, Declarations (N)); Analyze (Stm); end if; Next_Formal (Formal); end loop; end; end if; -- If the subprogram does not have pending instantiations, then we -- must generate the subprogram descriptor now, since the code for -- the subprogram is complete, and this is our last chance. However -- if there are pending instantiations, then the code is not -- complete, and we will delay the generation. if Is_Subprogram (Spec_Id) and then not Delay_Subprogram_Descriptors (Spec_Id) then Generate_Subprogram_Descriptor_For_Subprogram (N, Spec_Id); end if; -- Set to encode entity names in package body before gigi is called Qualify_Entity_Names (N); end Expand_N_Subprogram_Body; ----------------------------------- -- Expand_N_Subprogram_Body_Stub -- ----------------------------------- procedure Expand_N_Subprogram_Body_Stub (N : Node_Id) is begin if Present (Corresponding_Body (N)) then Expand_N_Subprogram_Body ( Unit_Declaration_Node (Corresponding_Body (N))); end if; end Expand_N_Subprogram_Body_Stub; ------------------------------------- -- Expand_N_Subprogram_Declaration -- ------------------------------------- -- The first task to be performed is the construction of default -- expression functions for in parameters with default values. These -- are parameterless inlined functions that are used to evaluate -- default expressions that are more complicated than simple literals -- or identifiers referencing constants and variables. -- If the declaration appears within a protected body, it is a private -- operation of the protected type. We must create the corresponding -- protected subprogram an associated formals. For a normal protected -- operation, this is done when expanding the protected type declaration. procedure Expand_N_Subprogram_Declaration (N : Node_Id) is Loc : constant Source_Ptr := Sloc (N); Subp : Entity_Id := Defining_Entity (N); Scop : Entity_Id := Scope (Subp); Prot_Sub : Entity_Id; Prot_Bod : Node_Id; begin -- Deal with case of protected subprogram if Is_List_Member (N) and then Present (Parent (List_Containing (N))) and then Nkind (Parent (List_Containing (N))) = N_Protected_Body and then Is_Protected_Type (Scop) then if No (Protected_Body_Subprogram (Subp)) then Prot_Sub := Make_Subprogram_Declaration (Loc, Specification => Build_Protected_Sub_Specification (N, Scop, Unprotected => True)); -- The protected subprogram is declared outside of the protected -- body. Given that the body has frozen all entities so far, we -- freeze the subprogram explicitly. If the body is a subunit, -- the insertion point is before the stub in the parent. Prot_Bod := Parent (List_Containing (N)); if Nkind (Parent (Prot_Bod)) = N_Subunit then Prot_Bod := Corresponding_Stub (Parent (Prot_Bod)); end if; Insert_Before (Prot_Bod, Prot_Sub); New_Scope (Scope (Scop)); Analyze (Prot_Sub); Set_Protected_Body_Subprogram (Subp, Defining_Unit_Name (Specification (Prot_Sub))); Pop_Scope; end if; end if; end Expand_N_Subprogram_Declaration; --------------------------------------- -- Expand_Protected_Object_Reference -- --------------------------------------- function Expand_Protected_Object_Reference (N : Node_Id; Scop : Entity_Id) return Node_Id is Loc : constant Source_Ptr := Sloc (N); Corr : Entity_Id; Rec : Node_Id; Param : Entity_Id; Proc : Entity_Id; begin Rec := Make_Identifier (Loc, Name_uObject); Set_Etype (Rec, Corresponding_Record_Type (Scop)); -- Find enclosing protected operation, and retrieve its first -- parameter, which denotes the enclosing protected object. -- If the enclosing operation is an entry, we are immediately -- within the protected body, and we can retrieve the object -- from the service entries procedure. A barrier function has -- has the same signature as an entry. A barrier function is -- compiled within the protected object, but unlike protected -- operations its never needs locks, so that its protected body -- subprogram points to itself. Proc := Current_Scope; while Present (Proc) and then Scope (Proc) /= Scop loop Proc := Scope (Proc); end loop; Corr := Protected_Body_Subprogram (Proc); if No (Corr) then -- Previous error left expansion incomplete. -- Nothing to do on this call. return Empty; end if; Param := Defining_Identifier (First (Parameter_Specifications (Parent (Corr)))); if Is_Subprogram (Proc) and then Proc /= Corr then -- Protected function or procedure. Set_Entity (Rec, Param); -- Rec is a reference to an entity which will not be in scope -- when the call is reanalyzed, and needs no further analysis. Set_Analyzed (Rec); else -- Entry or barrier function for entry body. -- The first parameter of the entry body procedure is a -- pointer to the object. We create a local variable -- of the proper type, duplicating what is done to define -- _object later on. declare Decls : List_Id; Obj_Ptr : Entity_Id := Make_Defining_Identifier (Loc, New_Internal_Name ('T')); begin Decls := New_List ( Make_Full_Type_Declaration (Loc, Defining_Identifier => Obj_Ptr, Type_Definition => Make_Access_To_Object_Definition (Loc, Subtype_Indication => New_Reference_To (Corresponding_Record_Type (Scop), Loc)))); Insert_Actions (N, Decls); Insert_Actions (N, Freeze_Entity (Obj_Ptr, Sloc (N))); Rec := Make_Explicit_Dereference (Loc, Unchecked_Convert_To (Obj_Ptr, New_Occurrence_Of (Param, Loc))); -- Analyze new actual. Other actuals in calls are already -- analyzed and the list of actuals is not renalyzed after -- rewriting. Set_Parent (Rec, N); Analyze (Rec); end; end if; return Rec; end Expand_Protected_Object_Reference; -------------------------------------- -- Expand_Protected_Subprogram_Call -- -------------------------------------- procedure Expand_Protected_Subprogram_Call (N : Node_Id; Subp : Entity_Id; Scop : Entity_Id) is Rec : Node_Id; begin -- If the protected object is not an enclosing scope, this is -- an inter-object function call. Inter-object procedure -- calls are expanded by Exp_Ch9.Build_Simple_Entry_Call. -- The call is intra-object only if the subprogram being -- called is in the protected body being compiled, and if the -- protected object in the call is statically the enclosing type. -- The object may be an component of some other data structure, -- in which case this must be handled as an inter-object call. if not In_Open_Scopes (Scop) or else not Is_Entity_Name (Name (N)) then if Nkind (Name (N)) = N_Selected_Component then Rec := Prefix (Name (N)); else pragma Assert (Nkind (Name (N)) = N_Indexed_Component); Rec := Prefix (Prefix (Name (N))); end if; Build_Protected_Subprogram_Call (N, Name => New_Occurrence_Of (Subp, Sloc (N)), Rec => Convert_Concurrent (Rec, Etype (Rec)), External => True); else Rec := Expand_Protected_Object_Reference (N, Scop); if No (Rec) then return; end if; Build_Protected_Subprogram_Call (N, Name => Name (N), Rec => Rec, External => False); end if; Analyze (N); -- If it is a function call it can appear in elaboration code and -- the called entity must be frozen here. if Ekind (Subp) = E_Function then Freeze_Expression (Name (N)); end if; end Expand_Protected_Subprogram_Call; ----------------------- -- Freeze_Subprogram -- ----------------------- procedure Freeze_Subprogram (N : Node_Id) is E : constant Entity_Id := Entity (N); begin -- When a primitive is frozen, enter its name in the corresponding -- dispatch table. If the DTC_Entity field is not set this is an -- overridden primitive that can be ignored. We suppress the -- initialization of the dispatch table entry when Java_VM because -- the dispatching mechanism is handled internally by the JVM. if Is_Dispatching_Operation (E) and then not Is_Abstract (E) and then Present (DTC_Entity (E)) and then not Is_CPP_Class (Scope (DTC_Entity (E))) and then not Java_VM then Check_Overriding_Operation (E); Insert_After (N, Fill_DT_Entry (Sloc (N), E)); end if; -- Mark functions that return by reference. Note that it cannot be -- part of the normal semantic analysis of the spec since the -- underlying returned type may not be known yet (for private types) declare Typ : constant Entity_Id := Etype (E); Utyp : constant Entity_Id := Underlying_Type (Typ); begin if Is_Return_By_Reference_Type (Typ) then Set_Returns_By_Ref (E); elsif Present (Utyp) and then Controlled_Type (Utyp) then Set_Returns_By_Ref (E); end if; end; end Freeze_Subprogram; end Exp_Ch6;
base/mvdm/vdd/hpscan/hpscan16.asm
npocmaka/Windows-Server-2003
17
16387
<filename>base/mvdm/vdd/hpscan/hpscan16.asm .MODEL small ;************************************************* ; Filename: hpscan16.asm ; Purpose: Stub DOS Device Driver. Pass device ; "HPSCAN" requests to the VDD, hpscan32.dll. ; Environment: MSDOS, Windows NT. ; (C) Hewlett-Packard Company 1993. ;************************************************* INCLUDE hpscan16.inc ;private INCLUDE isvbop.inc ;NT DDK SUBTTL Segment and data definitions ASSUME CS:CSEG,DS:NOTHING,ES:NOTHING CSEG SEGMENT ;------------------------------------------------- ; Resident data area - variables needed after init ;------------------------------------------------- ;**--- Device Header, must be at offset zero ---** SCAN_HEADER: dd -1 ;becomes ptr to next req hdr dw 0C000H ;character, supports IOCTL dw offset STRAT ;Strategy routine dw offset IDVR ;Interrupt routine DH_NAME db 'HPSCAN ' ;char device name ;**---- Request Header addr, saved by STRAT ----** RH_PTRA LABEL DWORD RH_PTRO dw ? ;offset RH_PTRS dw ? ;segment ;**------------- Define Stack Space ------------** STK_SEG dw ? ;Save original stack segment STK_PTR dw ? ;Save original stack pointer STACK dw 200 DUP (0) ;Local stack TOP_STK dw ? ;Top of local stack ;**--------------- VDD information -------------** VDD_DllName db "HPSCAN32.DLL", 0 VDD_InitFunc db "VDDInit", 0 VDD_DispFunc db "VDDDispatch", 0 VDD_hVDD dw ? ;**-------------- Copyright Info ---------------** db '(C) Copyright Hewlett-Packard Company 1993.' db 'All rights reserved.' SUBTTL Device Strategy & Interrupt entry points ;**--------------- STRAT routine ---------------** STRAT proc far ;Strategy routine mov cs:RH_PTRO,bx ;save offset address mov cs:RH_PTRS,es ;save segment address ret ;end Strategy routine STRAT endp ;**--------------- IDVR routine ---------------** IDVR proc far ;Interrupt routine push ds ;save all modified registers push es ;DOS has stack for 20 pushes push ax push bx push cx push dx push di push si push bp mov cs:STK_PTR,sp ;save original stack ptr mov cs:STK_SEG,ss ;save original stack seg cli ;disable for stack ops mov ax,cs ;setup new stack ptr mov ss,ax ;setup new stack seg mov sp,offset TOP_STK sti ;restore flags back cld ;all moves are forward les bx,cs:RH_PTRA ;load req hdr adr in es:bx mov al,RH.RHC_CMD cmp al,0 ;check for init command je BOOTUP ;command 0 = init xor dx,dx ;some other command mov dl,RH.RHC_CMD ;dx = command code mov cx,RH.RHC_CNT ;cx = count mov ax,RH.RHC_SEG ;es:bx = addr of data mov bx,RH.RHC_OFF mov es,ax ;finally, load VDD handle mov ax,word ptr cs:[VDD_hVDD] DispatchCall ;call Dispatch in VDD ;returns with status in di EXIT: les bx,cs:RH_PTRA ;restore ES:BX or di,STAT_DONE ;add "DONE" bit to status mov RH.RHC_STA,di ;save status in requ hdr cli ;disable ints for stack op mov ss,cs:STK_SEG ;restore stack seg mov sp,cs:STK_PTR ;restore stack ptr sti ;re-enable interrupts pop bp ;restore registers pop si pop di pop dx pop cx pop bx pop ax pop es pop ds ret ;far return IDVR endp ;**--------- jump here for Init Command --------** BOOTUP: mov ax,offset EndDriver mov RH.RHC_OFF,ax ;address of end of driver mov RH.RHC_SEG,CS ;reference from code seg mov si,offset VDD_DllName ;load regs for VDD mov di,offset VDD_InitFunc mov bx,offset VDD_DispFunc mov ax,ds mov es,ax RegisterModule ;calls the VDD jnc save_hVDD ;if NC then success mov di,STAT_GF ;set failure status jmp EXIT ;return via common exit save_hVDD: mov [VDD_hVDD],ax ;save handle in ax mov di,STAT_OK ;load OK status jmp EXIT ;return via common exit EndDriver db ? CSEG ENDS END SCAN_HEADER ;REQUIRED BY EXE2BIN 
day20/day20.adb
thorstel/Advent-of-Code-2018
2
10027
<reponame>thorstel/Advent-of-Code-2018<gh_stars>1-10 with Ada.Text_IO; use Ada.Text_IO; procedure Day20 is type Position is record X : Integer; Y : Integer; end record; function Next_Pos (Pos : Position; Dir : Character) return Position is begin case Dir is when 'N' => return (Pos.X, Pos.Y + 1); when 'S' => return (Pos.X, Pos.Y - 1); when 'W' => return (Pos.X - 1, Pos.Y); when 'E' => return (Pos.X + 1, Pos.Y); when others => raise Constraint_Error with "Invalid direction: " & Dir; end case; end Next_Pos; Grid : array (Integer range -1000 .. 1000, Integer range -1000 .. 1000) of Natural := (0 => (0 => 0, others => Natural'Last), others => (others => Natural'Last)); Global_Pos : Position := (0, 0); procedure Parse (Regex : String; Old_Pos : Position) is Pos : Position := Old_Pos; I, J, K : Positive := Regex'First; Depth : Natural := 0; begin while I <= Regex'Last loop exit when Regex (I) = '('; declare New_Pos : constant Position := Next_Pos (Pos, Regex (I)); New_Value : constant Natural := Grid (New_Pos.X, New_Pos.Y); Old_Value : constant Natural := Grid (Pos.X, Pos.Y); begin Pos := New_Pos; Grid (Pos.X, Pos.Y) := Natural'Min (New_Value, Old_Value + 1); end; I := I + 1; end loop; Global_Pos := Pos; if I > Regex'Last then return; end if; J := I + 1; Depth := 1; -- only reachable if Regex (I) = '(' loop if Regex (J) = '(' then Depth := Depth + 1; elsif Regex (J) = ')' then Depth := Depth - 1; end if; exit when Depth = 0; J := J + 1; end loop; K := I; loop declare Sub_Regex : constant String := Regex (K + 1 .. J - 1); begin Depth := 0; K := Sub_Regex'First; while K <= Sub_Regex'Last loop if Sub_Regex (K) = '(' then Depth := Depth + 1; elsif Sub_Regex (K) = ')' then Depth := Depth - 1; end if; exit when Depth = 0 and Sub_Regex (K) = '|'; K := K + 1; end loop; Parse (Sub_Regex (Sub_Regex'First .. K - 1), Pos); exit when K > Sub_Regex'Last; end; end loop; if J < Regex'Last then Parse (Regex (J + 1 .. Regex'Last), Global_Pos); end if; end Parse; File : File_Type; begin Open (File, In_File, "input.txt"); declare Input : constant String := Get_Line (File); begin Parse (Input (Input'First + 1 .. Input'Last - 1), (0, 0)); end; Close (File); declare Room_Count : Natural := 0; Max_Doors : Natural := 0; begin for X in Grid'Range (1) loop for Y in Grid'Range (2) loop if Grid (X, Y) < Natural'Last then Max_Doors := Natural'Max (Max_Doors, Grid (X, Y)); if Grid (X, Y) >= 1000 then Room_Count := Room_Count + 1; end if; end if; end loop; end loop; Put_Line ("Part 1 =" & Natural'Image (Max_Doors)); Put_Line ("Part 2 =" & Natural'Image (Room_Count)); end; end Day20;
programs/oeis/140/A140407.asm
neoneye/loda
22
173888
<reponame>neoneye/loda ; A140407: A000225 interleaved with A000051. ; 1,2,3,3,7,5,15,9,31,17,63,33,127,65,255,129,511,257,1023,513,2047,1025,4095,2049,8191,4097,16383,8193,32767,16385,65535,32769,131071,65537,262143,131073,524287,262145,1048575,524289,2097151,1048577,4194303,2097153,8388607,4194305,16777215,8388609,33554431,16777217,67108863,33554433,134217727,67108865,268435455,134217729,536870911,268435457,1073741823,536870913,2147483647,1073741825,4294967295,2147483649,8589934591,4294967297,17179869183,8589934593,34359738367,17179869185,68719476735,34359738369,137438953471,68719476737,274877906943,137438953473,549755813887,274877906945,1099511627775,549755813889,2199023255551,1099511627777,4398046511103,2199023255553,8796093022207,4398046511105,17592186044415,8796093022209,35184372088831,17592186044417,70368744177663,35184372088833,140737488355327,70368744177665,281474976710655,140737488355329,562949953421311,281474976710657,1125899906842623,562949953421313 add $0,2 mov $4,$0 div $0,2 mov $1,2 mov $2,$0 lpb $2 mul $2,2 mov $0,$2 sub $2,$4 lpb $4 mov $3,$0 sub $0,$4 add $0,$3 sub $4,$1 lpe sub $3,$2 mov $0,$3 mov $2,0 lpe sub $0,1
source/adam-subprogram.ads
charlie5/aIDE
3
14248
<reponame>charlie5/aIDE<gh_stars>1-10 with AdaM.Entity, AdaM.Block, AdaM.Context, AdaM.Parameter, Ada.Containers.Vectors, Ada.Streams; package AdaM.Subprogram is type Item is new Entity.item with private; -- View -- type View is access all Item'Class; procedure View_write (Stream : not null access Ada.Streams.Root_Stream_Type'Class; Self : in View); procedure View_read (Stream : not null access Ada.Streams.Root_Stream_Type'Class; Self : out View); for View'write use View_write; for View'read use View_read; -- Vector -- package Vectors is new ada.Containers.Vectors (Positive, View); subtype Vector is Vectors.Vector; -- Forge -- function new_Subprogram (Name : in String := "") return Subprogram.view; procedure free (Self : in out Subprogram.view); procedure destruct (Self : in out Subprogram.item); -- Attributes -- overriding function Id (Self : access Item) return AdaM.Id; overriding function Name (Self : in Item) return Identifier; procedure Name_is (Self : in out Item; Now : in String); overriding function to_Source (Self : in Item) return text_Vectors.Vector; function Context (Self : in Item) return AdaM.Context.view; function Block (Self : in Item) return AdaM.Block.view; function is_Function (Self : in Item) return Boolean; function is_Procedure (Self : in Item) return Boolean; private type Profile is tagged record Parameters : Parameter.Vector; Result : Parameter.view; end record; function to_Source (the_Profile : in Profile) return text_Vectors.Vector; type Item is new Entity.item with record Context : AdaM.Context.view; Name : Text; Profile : subprogram.Profile; Block : AdaM.Block.view; end record; end AdaM.Subprogram;
devices/devices-console.adb
SMerrony/dgemua
2
19017
<filename>devices/devices-console.adb -- MIT License -- Copyright (c) 2021 <NAME> -- Permission is hereby granted, free of charge, to any person obtaining a copy -- of this software and associated documentation files (the "Software"), to deal -- in the Software without restriction, including without limitation the rights -- to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -- copies of the Software, and to permit persons to whom the Software is -- furnished to do so, subject to the following conditions: -- The above copyright notice and this permission notice shall be included in all -- copies or substantial portions of the Software. -- THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -- IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -- FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -- AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -- LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -- OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE -- SOFTWARE. with Ada.Streams; with Ada.Text_IO; with GNAT.OS_Lib; use type Ada.Streams.Stream_Element_Count; with Processor; with Devices.Bus; with DG_Types; use DG_Types; with Memory; package body Devices.Console is protected body TTIn is procedure Init is begin Devices.Bus.Actions.Set_Reset_Proc (Devices.TTI, Reset'Access); Devices.Bus.Actions.Set_Data_In_Proc (Devices.TTI, Data_In'Access); Devices.Bus.Actions.Set_Data_Out_Proc (Devices.TTI, Data_Out'Access); end Init; procedure Reset is begin -- Stub Ada.Text_IO.Put_Line ("INFO: TTI Reset"); end Reset; -- Insert_Byte places one byte in the TTI buffer fr handling by the Processor procedure Insert_Byte (B : in Byte_T) is begin TTI_Dev.One_Char_Buff := B; Devices.Bus.States.Set_Done( Devices.TTI, true); -- send IRQ if not masked out if Devices.Bus.States.Is_Dev_Masked (14) = false then Devices.Bus.States.Send_Interrupt(Devices.TTI); end if; end Insert_Byte; procedure Data_In (ABC : in IO_Reg_T; IO_Flag : in IO_Flag_T; Datum : out Word_T) is begin Datum := Word_T(TTI_Dev.One_Char_Buff); if ABC = A then case IO_Flag is when S => Devices.Bus.States.Set_Busy( Devices.TTI, true); Devices.Bus.States.Set_Done( Devices.TTI, false); when C => Devices.Bus.States.Set_Busy( Devices.TTI, false); Devices.Bus.States.Set_Done( Devices.TTI, false); when others => Ada.Text_IO.Put_Line("ERROR: Unknown I/O flag"); GNAT.OS_Lib.OS_Exit (1); end case; else Ada.Text_IO.Put_Line("ERROR: Unknown Data I/O Buffer for DIx ac,TTI instruction"); GNAT.OS_Lib.OS_Exit (1); end if; end Data_In; -- Data_Out is only here to support NIO commands to TTI procedure Data_Out( Datum : in Word_T; ABC : in IO_Reg_T; IO_Flag : in IO_Flag_T) is begin case ABC is when N => case IO_Flag is when S => Devices.Bus.States.Set_Busy( Devices.TTI, true); Devices.Bus.States.Set_Done( Devices.TTI, false); when C => Devices.Bus.States.Set_Busy( Devices.TTI, false); Devices.Bus.States.Set_Done( Devices.TTI, false); when others => Ada.Text_IO.Put_Line("ERROR: Unknown I/O flag"); GNAT.OS_Lib.OS_Exit (1); end case; when others => Ada.Text_IO.Put_Line("ERROR: Unknown Data I/O Buffer for DOx ac,TTI instruction"); GNAT.OS_Lib.OS_Exit (1); end case; end Data_Out; end TTIn; protected body TTOut is procedure Init (Sock : in GNAT.Sockets.Socket_Type) is begin Devices.Bus.Actions.Set_Reset_Proc (Devices.TTO, Reset'Access); Devices.Bus.Actions.Set_Data_Out_Proc (Devices.TTO, Data_Out'Access); SCP_Chan := GNAT.Sockets.Stream (Sock); end; -- Reset simply clears the screen or throws a page procedure Reset is begin TTOut.Put_Char (ASCII.FF); Ada.Text_IO.Put_Line ("INFO: TTO Reset"); end Reset; procedure Put_Byte (B : in Byte_T) is begin Byte_T'Output (SCP_Chan, B); end Put_Byte; procedure Put_Char (C : in Character) is begin Character'Output (SCP_Chan, C); end Put_Char; procedure Put_String (S : in String) is begin for C of S loop Character'Output (SCP_Chan, C); end loop; end Put_String; procedure Data_Out( Datum : in Word_T; ABC : in IO_Reg_T; IO_Flag : in IO_Flag_T) is ASCII_Byte : Byte_T; begin case ABC is when A => ASCII_Byte := Get_Lower_Byte(Datum); if IO_Flag = S then Devices.Bus.States.Set_Busy( Devices.TTO, true); Devices.Bus.States.Set_Done( Devices.TTO, false); end if; -- if ASCII_Byte = 93 then raise IO_Error with "Debugging dev #"; end if; TTOut.Put_Byte (ASCII_Byte); Devices.Bus.States.Set_Busy( Devices.TTO, false); Devices.Bus.States.Set_Done( Devices.TTO, true); -- send IRQ if not masked out if Devices.Bus.States.Is_Dev_Masked (15) = false then Devices.Bus.States.Send_Interrupt(Devices.TTO); end if; when N => case IO_Flag is when S => Devices.Bus.States.Set_Busy( Devices.TTO, true); Devices.Bus.States.Set_Done( Devices.TTO, false); when C => Devices.Bus.States.Set_Busy( Devices.TTO, false); Devices.Bus.States.Set_Done( Devices.TTO, false); when others => Ada.Text_IO.Put_Line("ERROR: Unknown I/O flag"); GNAT.OS_Lib.OS_Exit (1); end case; when others => Ada.Text_IO.Put_Line("ERROR: Unknown Data I/O Buffer for DOx ac,TTO instruction"); GNAT.OS_Lib.OS_Exit (1); end case; end Data_Out; end TTOut; task body SCP_Handler is -- SCP_IO : Boolean; -- True if console I/O is directed to the SCP SCP_Buffer : Unbounded_String; SCP_Line_Ready : Boolean := false; begin loop select accept Set_SCP_Line_Ready (Buffer : in Unbounded_String) do SCP_Buffer := Buffer; SCP_Line_Ready := true; end Set_SCP_Line_Ready; or when SCP_Line_Ready => accept SCP_Get_Line (Line : out Unbounded_String) do Line := SCP_Buffer; end SCP_Get_Line; SCP_Buffer := Null_Unbounded_String; SCP_Line_Ready := false; or accept Set_SCP_IO (SCP : in Boolean) do SCP_IO := SCP; end Set_SCP_IO; or accept Get_SCP_IO (SCP : out Boolean) do SCP := SCP_IO; end Get_SCP_IO; end select; end loop; end SCP_Handler; task body Console_Handler is SCP_Buffer : Unbounded_String; SCP_Line_Ready : Boolean := false; SCP_Chan : GNAT.Sockets.Stream_Access; One_Char : Character; SCP_IO : Boolean; begin accept Start (Sock : in GNAT.Sockets.Socket_Type) do SCP_Chan := GNAT.Sockets.Stream (Sock); SCP_Handler.Set_SCP_IO (true); end Start; loop One_Char := Byte_To_Char(Byte_T'Input (SCP_Chan)); SCP_Handler.Get_SCP_IO (SCP_IO); if One_Char = ASCII.ESC then SCP_Handler.Set_SCP_IO (true); -- Processor.Set_SCPIO(true); elsif SCP_IO then case One_Char is when ASCII.CR => SCP_Handler.Set_SCP_Line_Ready (SCP_Buffer); SCP_Buffer := Null_Unbounded_String; when Dasher_Delete => if length (SCP_Buffer) > 0 then Character'Output (SCP_Chan, Dasher_Cursor_Left); SCP_Buffer := Head(SCP_Buffer, length (SCP_Buffer) - 1); end if; when others => Character'Output (SCP_Chan, One_Char); SCP_Buffer := SCP_Buffer & One_Char; end case; else TTIn.Insert_Byte (Char_To_Byte(One_Char)); end if; end loop; end Console_Handler; end Devices.Console;
src/LKS/Fade.asm
Kannagi/LKS
6
160154
<filename>src/LKS/Fade.asm LKS_Fade_in: lda LKS_FADE.phase cmp #0 beq + rtl +: lda LKS_FADE.brg sta INIDISP ldy LKS_FADE.timer cpy #2 bne + ina stz LKS_FADE.timer bra ++ +: inc LKS_FADE.timer ++: cmp #$10 bne + lda #$0F sta INIDISP inc LKS_FADE.phase stz LKS_FADE.timer rtl +: sta LKS_FADE.brg rtl LKS_Fade_out: lda LKS_FADE.phase cmp #0 bne + rtl +: lda LKS_FADE.brg sta INIDISP ldy LKS_FADE.timer cpy #2 bne + dea stz LKS_FADE.timer bra ++ +: inc LKS_FADE.timer ++: cmp #-$1 bne + lda #$00 sta INIDISP inc LKS_FADE.phase stz LKS_FADE.timer rtl +: sta LKS_FADE.brg rtl
tools-src/gnu/gcc/gcc/ada/impunit.ads
enfoTek/tomato.linksys.e2000.nvram-mod
80
29581
------------------------------------------------------------------------------ -- -- -- GNAT COMPILER COMPONENTS -- -- -- -- I M P U N I T -- -- -- -- S p e c -- -- -- -- $Revision$ -- -- -- Copyright (C) 2000 Free Software Foundation, Inc. -- -- -- -- GNAT is free software; you can redistribute it and/or modify it under -- -- terms of the GNU General Public License as published by the Free Soft- -- -- ware Foundation; either version 2, or (at your option) any later ver- -- -- sion. GNAT is distributed in the hope that it will be useful, but WITH- -- -- OUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY -- -- or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License -- -- for more details. You should have received a copy of the GNU General -- -- Public License distributed with GNAT; see file COPYING. If not, write -- -- to the Free Software Foundation, 59 Temple Place - Suite 330, Boston, -- -- MA 02111-1307, USA. -- -- -- -- GNAT was originally developed by the GNAT team at New York University. -- -- Extensive contributions were provided by Ada Core Technologies Inc. -- -- -- ------------------------------------------------------------------------------ -- This package contains data and functions used to determine if a given -- unit is an internal unit intended only for use by the implementation -- and which should not be directly WITH'ed by user code. with Types; use Types; package Impunit is function Implementation_Unit (U : Unit_Number_Type) return Boolean; -- Given the unit number of a unit, this function determines if it is a -- unit that is intended to be used only internally by the implementation. -- This is used for posting warnings for improper WITH's of such units -- (such WITH's are allowed without warnings only in GNAT_Mode set by -- the use of -gnatg). True is returned if a warning should be posted. end Impunit;
Rings/Ideals/Principal/Definition.agda
Smaug123/agdaproofs
4
12847
<gh_stars>1-10 {-# OPTIONS --safe --warning=error --without-K #-} open import Setoids.Setoids open import Rings.Definition open import Agda.Primitive using (Level; lzero; lsuc; _⊔_) module Rings.Ideals.Principal.Definition {a b : _} {A : Set a} {S : Setoid {a} {b} A} {_+_ _*_ : A → A → A} (R : Ring S _+_ _*_) where open import Rings.Ideals.Definition R open import Rings.Divisible.Definition R open Setoid S record PrincipalIdeal {c : _} {pred : A → Set c} (ideal : Ideal pred) : Set (a ⊔ b ⊔ c) where field generator : A genIsInIdeal : pred generator genGenerates : {x : A} → pred x → generator ∣ x
gcc-gcc-7_3_0-release/gcc/testsuite/gnat.dg/discr23_pkg.ads
best08618/asylo
7
8137
<filename>gcc-gcc-7_3_0-release/gcc/testsuite/gnat.dg/discr23_pkg.ads package Discr23_Pkg is subtype Size_Range is Positive range 1 .. 256; type Text (Size : Size_Range) is record Characters : String( 1.. Size); end record; function Get return Text; end Discr23_Pkg;
private/sdktools/imagehlp/i386/chksum.asm
King0987654/windows2000
11
161775
title "Compute Checksum" ;/*++ ; ; Copyright (c) 1992 Microsoft Corporation ; ; Module Name: ; ; chksum.asm ; ; Abstract: ; ; This module implements a fucntion to compute the checksum of a buffer. ; ; Author: ; ; <NAME> (davec) 27-Jan-1992 ; ; Environment: ; ; Any mode. ; ; Revision History: ; ;--*/ .386 .model small,c assume cs:FLAT,ds:FLAT,es:FLAT,ss:FLAT assume fs:nothing,gs:nothing .xlist include callconv.inc include ks386.inc .list .code ;++ ; ; USHORT ; ChkSum( ; IN ULONG cksum, ; IN PUSHORT buf, ; IN ULONG len ; ) ; ; Routine Description: ; ; This function computes the checksum of the specified buffer. ; ; Arguments: ; ; cksum - Suppiles the initial checksum value. ; ; buf - Supplies a pointer to the buffer that is checksumed. ; ; len - Supplies the of the buffer in words. ; ; Return Value: ; ; The computed checksum is returned as the function value. ; ;-- cksum equ 8 ; stack offset to initial checksum buf equ 12 ; stack offset to source address len equ 16 ; stack offset to length in words cPublicProc ChkSum,3 push esi ; save nonvolatile register mov ecx,[esp + len] ; get length in words mov esi,[esp + buf] ; get source address mov eax,[esp + cksum] ; get initial checksum shl ecx,1 ; convert to length in bytes jz cks80 ; if z set, no words to checksum ; ; Compute checksum in cascading order of block size until 128 byte blocks ; are all that is left, then loop on 128-bute blocks. ; test esi,02h ; check if source dword aligned jz short cks10 ; if z set, source is dword aligned sub edx,edx ; get initial word for alignment mov dx,[esi + 0] ; add eax,edx ; update partial checkcum adc eax,0 ; add carry add esi,2 ; update source address sub ecx,2 ; reduce length in bytes cks10: mov edx,ecx ; isolate residual bytes and edx,07h ; sub ecx,edx ; subtract residual bytes jz cks60 ; if z set, no 8-byte blocks test ecx,08h ; test if initial 8-byte block jz short cks20 ; if z set, no initial 8-byte block add eax,[esi + 0] ; compute 8-byte checksum adc eax,[esi + 4] ; adc eax,0 ; add carry add esi,8 ; update source address sub ecx,8 ; reduce length of checksum jz cks60 ; if z set, end of 8-byte blocks cks20: test ecx,010h ; test if initial 16-byte block jz short cks30 ; if z set, no initial 16-byte block add eax,[esi + 0] ; compute 16-byte checksum adc eax,[esi + 4] ; adc eax,[esi + 8] ; adc eax,[esi + 12] ; adc eax,0 ; add carry add esi,16 ; update source address sub ecx,16 ; reduce length of checksum jz cks60 ; if z set, end of 8-byte blocks cks30: test ecx,020h ; test if initial 32-byte block jz short cks40 ; if z set, no initial 32-byte block add eax,[esi + 0] ; compute 32-byte checksum adc eax,[esi + 4] ; adc eax,[esi + 8] ; adc eax,[esi + 12] ; adc eax,[esi + 16] ; adc eax,[esi + 20] ; adc eax,[esi + 24] ; adc eax,[esi + 28] ; adc eax,0 ; add carry add esi,32 ; update source address sub ecx,32 ; reduce length of checksum jz cks60 ; if z set, end of 8-byte blocks cks40: test ecx,040h ; test if initial 64-byte block jz cks50 ; if z set, no initial 64-byte block add eax,[esi + 0] ; compute 64-byte checksum adc eax,[esi + 4] ; adc eax,[esi + 8] ; adc eax,[esi + 12] ; adc eax,[esi + 16] ; adc eax,[esi + 20] ; adc eax,[esi + 24] ; adc eax,[esi + 28] ; adc eax,[esi + 32] ; adc eax,[esi + 36] ; adc eax,[esi + 40] ; adc eax,[esi + 44] ; adc eax,[esi + 48] ; adc eax,[esi + 52] ; adc eax,[esi + 56] ; adc eax,[esi + 60] ; adc eax,0 ; add carry add esi,64 ; update source address sub ecx,64 ; reduce length of checksum jz short cks60 ; if z set, end of 8-byte blocks cks50: add eax,[esi + 0] ; compute 64-byte checksum adc eax,[esi + 4] ; adc eax,[esi + 8] ; adc eax,[esi + 12] ; adc eax,[esi + 16] ; adc eax,[esi + 20] ; adc eax,[esi + 24] ; adc eax,[esi + 28] ; adc eax,[esi + 32] ; adc eax,[esi + 36] ; adc eax,[esi + 40] ; adc eax,[esi + 44] ; adc eax,[esi + 48] ; adc eax,[esi + 52] ; adc eax,[esi + 56] ; adc eax,[esi + 60] ; adc eax,[esi + 64] ; adc eax,[esi + 68] ; adc eax,[esi + 72] ; adc eax,[esi + 76] ; adc eax,[esi + 80] ; adc eax,[esi + 84] ; adc eax,[esi + 88] ; adc eax,[esi + 92] ; adc eax,[esi + 96] ; adc eax,[esi + 100] ; adc eax,[esi + 104] ; adc eax,[esi + 108] ; adc eax,[esi + 112] ; adc eax,[esi + 116] ; adc eax,[esi + 120] ; adc eax,[esi + 124] ; adc eax,0 ; add carry add esi,128 ; update source address sub ecx,128 ; reduce length of checksum jnz short cks50 ; if z clear, not end of 8-byte blocks ; ; Compute checksum on 2-byte blocks. ; cks60: test edx,edx ; check if any 2-byte blocks jz short cks80 ; if z set, no 2-byte blocks cks70: sub ecx,ecx ; load 2-byte block mov cx,[esi + 0] ; add eax,ecx ; compue 2-byte checksum adc eax,0 ; add esi,2 ; update source address sub edx,2 ; reduce length of checksum jnz short cks70 ; if z clear, more 2-bytes blocks ; ; Fold 32-but checksum into 16-bits ; cks80: mov edx,eax ; copy checksum value shr edx,16 ; isolate high order bits and eax,0ffffh ; isolate low order bits add eax,edx ; sum high and low order bits mov edx,eax ; isolate possible carry shr edx,16 ; add eax,edx ; add carry and eax,0ffffh ; clear possible carry bit pop esi ; restore nonvolatile register stdRET ChkSum stdENDP ChkSum end 
llvm-gcc-4.2-2.9/gcc/ada/exp_ch6.adb
vidkidz/crossbridge
1
11727
------------------------------------------------------------------------------ -- -- -- GNAT COMPILER COMPONENTS -- -- -- -- E X P _ C H 6 -- -- -- -- B o d y -- -- -- -- Copyright (C) 1992-2006, Free Software Foundation, Inc. -- -- -- -- GNAT is free software; you can redistribute it and/or modify it under -- -- terms of the GNU General Public License as published by the Free Soft- -- -- ware Foundation; either version 2, or (at your option) any later ver- -- -- sion. GNAT is distributed in the hope that it will be useful, but WITH- -- -- OUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY -- -- or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License -- -- for more details. You should have received a copy of the GNU General -- -- Public License distributed with GNAT; see file COPYING. If not, write -- -- to the Free Software Foundation, 51 Franklin Street, Fifth Floor, -- -- Boston, MA 02110-1301, USA. -- -- -- -- GNAT was originally developed by the GNAT team at New York University. -- -- Extensive contributions were provided by Ada Core Technologies Inc. -- -- -- ------------------------------------------------------------------------------ with Atree; use Atree; with Checks; use Checks; with Debug; use Debug; with Einfo; use Einfo; with Errout; use Errout; with Elists; use Elists; with Exp_Ch2; use Exp_Ch2; with Exp_Ch3; use Exp_Ch3; with Exp_Ch7; use Exp_Ch7; with Exp_Ch9; use Exp_Ch9; with Exp_Dbug; use Exp_Dbug; with Exp_Disp; use Exp_Disp; with Exp_Dist; use Exp_Dist; with Exp_Intr; use Exp_Intr; with Exp_Pakd; use Exp_Pakd; with Exp_Tss; use Exp_Tss; with Exp_Util; use Exp_Util; with Fname; use Fname; with Freeze; use Freeze; with Hostparm; use Hostparm; with Inline; use Inline; with Lib; use Lib; with Nlists; use Nlists; with Nmake; use Nmake; with Opt; use Opt; with Restrict; use Restrict; with Rident; use Rident; with Rtsfind; use Rtsfind; with Sem; use Sem; with Sem_Ch6; use Sem_Ch6; with Sem_Ch8; use Sem_Ch8; with Sem_Ch12; use Sem_Ch12; with Sem_Ch13; use Sem_Ch13; with Sem_Disp; use Sem_Disp; with Sem_Dist; use Sem_Dist; with Sem_Mech; use Sem_Mech; with Sem_Res; use Sem_Res; with Sem_Util; use Sem_Util; with Sinfo; use Sinfo; with Snames; use Snames; with Stand; use Stand; with Tbuild; use Tbuild; with Ttypes; use Ttypes; with Uintp; use Uintp; with Validsw; use Validsw; package body Exp_Ch6 is ----------------------- -- Local Subprograms -- ----------------------- procedure Check_Overriding_Operation (Subp : Entity_Id); -- Subp is a dispatching operation. Check whether it may override an -- inherited private operation, in which case its DT entry is that of -- the hidden operation, not the one it may have received earlier. -- This must be done before emitting the code to set the corresponding -- DT to the address of the subprogram. The actual placement of Subp in -- the proper place in the list of primitive operations is done in -- Declare_Inherited_Private_Subprograms, which also has to deal with -- implicit operations. This duplication is unavoidable for now??? procedure Detect_Infinite_Recursion (N : Node_Id; Spec : Entity_Id); -- This procedure is called only if the subprogram body N, whose spec -- has the given entity Spec, contains a parameterless recursive call. -- It attempts to generate runtime code to detect if this a case of -- infinite recursion. -- -- The body is scanned to determine dependencies. If the only external -- dependencies are on a small set of scalar variables, then the values -- of these variables are captured on entry to the subprogram, and if -- the values are not changed for the call, we know immediately that -- we have an infinite recursion. procedure Expand_Actuals (N : Node_Id; Subp : Entity_Id); -- For each actual of an in-out or out parameter which is a numeric -- (view) conversion of the form T (A), where A denotes a variable, -- we insert the declaration: -- -- Temp : T[ := T (A)]; -- -- prior to the call. Then we replace the actual with a reference to Temp, -- and append the assignment: -- -- A := TypeA (Temp); -- -- after the call. Here TypeA is the actual type of variable A. -- For out parameters, the initial declaration has no expression. -- If A is not an entity name, we generate instead: -- -- Var : TypeA renames A; -- Temp : T := Var; -- omitting expression for out parameter. -- ... -- Var := TypeA (Temp); -- -- For other in-out parameters, we emit the required constraint checks -- before and/or after the call. -- -- For all parameter modes, actuals that denote components and slices -- of packed arrays are expanded into suitable temporaries. -- -- For non-scalar objects that are possibly unaligned, add call by copy -- code (copy in for IN and IN OUT, copy out for OUT and IN OUT). procedure Expand_Inlined_Call (N : Node_Id; Subp : Entity_Id; Orig_Subp : Entity_Id); -- If called subprogram can be inlined by the front-end, retrieve the -- analyzed body, replace formals with actuals and expand call in place. -- Generate thunks for actuals that are expressions, and insert the -- corresponding constant declarations before the call. If the original -- call is to a derived operation, the return type is the one of the -- derived operation, but the body is that of the original, so return -- expressions in the body must be converted to the desired type (which -- is simply not noted in the tree without inline expansion). function Expand_Protected_Object_Reference (N : Node_Id; Scop : Entity_Id) return Node_Id; procedure Expand_Protected_Subprogram_Call (N : Node_Id; Subp : Entity_Id; Scop : Entity_Id); -- A call to a protected subprogram within the protected object may appear -- as a regular call. The list of actuals must be expanded to contain a -- reference to the object itself, and the call becomes a call to the -- corresponding protected subprogram. -------------------------------- -- Check_Overriding_Operation -- -------------------------------- procedure Check_Overriding_Operation (Subp : Entity_Id) is Typ : constant Entity_Id := Find_Dispatching_Type (Subp); Op_List : constant Elist_Id := Primitive_Operations (Typ); Op_Elmt : Elmt_Id; Prim_Op : Entity_Id; Par_Op : Entity_Id; begin if Is_Derived_Type (Typ) and then not Is_Private_Type (Typ) and then In_Open_Scopes (Scope (Etype (Typ))) and then Typ = Base_Type (Typ) then -- Subp overrides an inherited private operation if there is an -- inherited operation with a different name than Subp (see -- Derive_Subprogram) whose Alias is a hidden subprogram with the -- same name as Subp. Op_Elmt := First_Elmt (Op_List); while Present (Op_Elmt) loop Prim_Op := Node (Op_Elmt); Par_Op := Alias (Prim_Op); if Present (Par_Op) and then not Comes_From_Source (Prim_Op) and then Chars (Prim_Op) /= Chars (Par_Op) and then Chars (Par_Op) = Chars (Subp) and then Is_Hidden (Par_Op) and then Type_Conformant (Prim_Op, Subp) then Set_DT_Position (Subp, DT_Position (Prim_Op)); end if; Next_Elmt (Op_Elmt); end loop; end if; end Check_Overriding_Operation; ------------------------------- -- Detect_Infinite_Recursion -- ------------------------------- procedure Detect_Infinite_Recursion (N : Node_Id; Spec : Entity_Id) is Loc : constant Source_Ptr := Sloc (N); Var_List : constant Elist_Id := New_Elmt_List; -- List of globals referenced by body of procedure Call_List : constant Elist_Id := New_Elmt_List; -- List of recursive calls in body of procedure Shad_List : constant Elist_Id := New_Elmt_List; -- List of entity id's for entities created to capture the value of -- referenced globals on entry to the procedure. Scop : constant Uint := Scope_Depth (Spec); -- This is used to record the scope depth of the current procedure, so -- that we can identify global references. Max_Vars : constant := 4; -- Do not test more than four global variables Count_Vars : Natural := 0; -- Count variables found so far Var : Entity_Id; Elm : Elmt_Id; Ent : Entity_Id; Call : Elmt_Id; Decl : Node_Id; Test : Node_Id; Elm1 : Elmt_Id; Elm2 : Elmt_Id; Last : Node_Id; function Process (Nod : Node_Id) return Traverse_Result; -- Function to traverse the subprogram body (using Traverse_Func) ------------- -- Process -- ------------- function Process (Nod : Node_Id) return Traverse_Result is begin -- Procedure call if Nkind (Nod) = N_Procedure_Call_Statement then -- Case of one of the detected recursive calls if Is_Entity_Name (Name (Nod)) and then Has_Recursive_Call (Entity (Name (Nod))) and then Entity (Name (Nod)) = Spec then Append_Elmt (Nod, Call_List); return Skip; -- Any other procedure call may have side effects else return Abandon; end if; -- A call to a pure function can always be ignored elsif Nkind (Nod) = N_Function_Call and then Is_Entity_Name (Name (Nod)) and then Is_Pure (Entity (Name (Nod))) then return Skip; -- Case of an identifier reference elsif Nkind (Nod) = N_Identifier then Ent := Entity (Nod); -- If no entity, then ignore the reference -- Not clear why this can happen. To investigate, remove this -- test and look at the crash that occurs here in 3401-004 ??? if No (Ent) then return Skip; -- Ignore entities with no Scope, again not clear how this -- can happen, to investigate, look at 4108-008 ??? elsif No (Scope (Ent)) then return Skip; -- Ignore the reference if not to a more global object elsif Scope_Depth (Scope (Ent)) >= Scop then return Skip; -- References to types, exceptions and constants are always OK elsif Is_Type (Ent) or else Ekind (Ent) = E_Exception or else Ekind (Ent) = E_Constant then return Skip; -- If other than a non-volatile scalar variable, we have some -- kind of global reference (e.g. to a function) that we cannot -- deal with so we forget the attempt. elsif Ekind (Ent) /= E_Variable or else not Is_Scalar_Type (Etype (Ent)) or else Treat_As_Volatile (Ent) then return Abandon; -- Otherwise we have a reference to a global scalar else -- Loop through global entities already detected Elm := First_Elmt (Var_List); loop -- If not detected before, record this new global reference if No (Elm) then Count_Vars := Count_Vars + 1; if Count_Vars <= Max_Vars then Append_Elmt (Entity (Nod), Var_List); else return Abandon; end if; exit; -- If recorded before, ignore elsif Node (Elm) = Entity (Nod) then return Skip; -- Otherwise keep looking else Next_Elmt (Elm); end if; end loop; return Skip; end if; -- For all other node kinds, recursively visit syntactic children else return OK; end if; end Process; function Traverse_Body is new Traverse_Func; -- Start of processing for Detect_Infinite_Recursion begin -- Do not attempt detection in No_Implicit_Conditional mode, since we -- won't be able to generate the code to handle the recursion in any -- case. if Restriction_Active (No_Implicit_Conditionals) then return; end if; -- Otherwise do traversal and quit if we get abandon signal if Traverse_Body (N) = Abandon then return; -- We must have a call, since Has_Recursive_Call was set. If not just -- ignore (this is only an error check, so if we have a funny situation, -- due to bugs or errors, we do not want to bomb!) elsif Is_Empty_Elmt_List (Call_List) then return; end if; -- Here is the case where we detect recursion at compile time -- Push our current scope for analyzing the declarations and code that -- we will insert for the checking. New_Scope (Spec); -- This loop builds temporary variables for each of the referenced -- globals, so that at the end of the loop the list Shad_List contains -- these temporaries in one-to-one correspondence with the elements in -- Var_List. Last := Empty; Elm := First_Elmt (Var_List); while Present (Elm) loop Var := Node (Elm); Ent := Make_Defining_Identifier (Loc, Chars => New_Internal_Name ('S')); Append_Elmt (Ent, Shad_List); -- Insert a declaration for this temporary at the start of the -- declarations for the procedure. The temporaries are declared as -- constant objects initialized to the current values of the -- corresponding temporaries. Decl := Make_Object_Declaration (Loc, Defining_Identifier => Ent, Object_Definition => New_Occurrence_Of (Etype (Var), Loc), Constant_Present => True, Expression => New_Occurrence_Of (Var, Loc)); if No (Last) then Prepend (Decl, Declarations (N)); else Insert_After (Last, Decl); end if; Last := Decl; Analyze (Decl); Next_Elmt (Elm); end loop; -- Loop through calls Call := First_Elmt (Call_List); while Present (Call) loop -- Build a predicate expression of the form -- True -- and then global1 = temp1 -- and then global2 = temp2 -- ... -- This predicate determines if any of the global values -- referenced by the procedure have changed since the -- current call, if not an infinite recursion is assured. Test := New_Occurrence_Of (Standard_True, Loc); Elm1 := First_Elmt (Var_List); Elm2 := First_Elmt (Shad_List); while Present (Elm1) loop Test := Make_And_Then (Loc, Left_Opnd => Test, Right_Opnd => Make_Op_Eq (Loc, Left_Opnd => New_Occurrence_Of (Node (Elm1), Loc), Right_Opnd => New_Occurrence_Of (Node (Elm2), Loc))); Next_Elmt (Elm1); Next_Elmt (Elm2); end loop; -- Now we replace the call with the sequence -- if no-changes (see above) then -- raise Storage_Error; -- else -- original-call -- end if; Rewrite (Node (Call), Make_If_Statement (Loc, Condition => Test, Then_Statements => New_List ( Make_Raise_Storage_Error (Loc, Reason => SE_Infinite_Recursion)), Else_Statements => New_List ( Relocate_Node (Node (Call))))); Analyze (Node (Call)); Next_Elmt (Call); end loop; -- Remove temporary scope stack entry used for analysis Pop_Scope; end Detect_Infinite_Recursion; -------------------- -- Expand_Actuals -- -------------------- procedure Expand_Actuals (N : Node_Id; Subp : Entity_Id) is Loc : constant Source_Ptr := Sloc (N); Actual : Node_Id; Formal : Entity_Id; N_Node : Node_Id; Post_Call : List_Id; E_Formal : Entity_Id; procedure Add_Call_By_Copy_Code; -- For cases where the parameter must be passed by copy, this routine -- generates a temporary variable into which the actual is copied and -- then passes this as the parameter. For an OUT or IN OUT parameter, -- an assignment is also generated to copy the result back. The call -- also takes care of any constraint checks required for the type -- conversion case (on both the way in and the way out). procedure Add_Simple_Call_By_Copy_Code; -- This is similar to the above, but is used in cases where we know -- that all that is needed is to simply create a temporary and copy -- the value in and out of the temporary. procedure Check_Fortran_Logical; -- A value of type Logical that is passed through a formal parameter -- must be normalized because .TRUE. usually does not have the same -- representation as True. We assume that .FALSE. = False = 0. -- What about functions that return a logical type ??? function Is_Legal_Copy return Boolean; -- Check that an actual can be copied before generating the temporary -- to be used in the call. If the actual is of a by_reference type then -- the program is illegal (this can only happen in the presence of -- rep. clauses that force an incorrect alignment). If the formal is -- a by_reference parameter imposed by a DEC pragma, emit a warning to -- the effect that this might lead to unaligned arguments. function Make_Var (Actual : Node_Id) return Entity_Id; -- Returns an entity that refers to the given actual parameter, -- Actual (not including any type conversion). If Actual is an -- entity name, then this entity is returned unchanged, otherwise -- a renaming is created to provide an entity for the actual. procedure Reset_Packed_Prefix; -- The expansion of a packed array component reference is delayed in -- the context of a call. Now we need to complete the expansion, so we -- unmark the analyzed bits in all prefixes. --------------------------- -- Add_Call_By_Copy_Code -- --------------------------- procedure Add_Call_By_Copy_Code is Expr : Node_Id; Init : Node_Id; Temp : Entity_Id; Indic : Node_Id; Var : Entity_Id; F_Typ : constant Entity_Id := Etype (Formal); V_Typ : Entity_Id; Crep : Boolean; begin if not Is_Legal_Copy then return; end if; Temp := Make_Defining_Identifier (Loc, New_Internal_Name ('T')); -- Use formal type for temp, unless formal type is an unconstrained -- array, in which case we don't have to worry about bounds checks, -- and we use the actual type, since that has appropriate bounds. if Is_Array_Type (F_Typ) and then not Is_Constrained (F_Typ) then Indic := New_Occurrence_Of (Etype (Actual), Loc); else Indic := New_Occurrence_Of (Etype (Formal), Loc); end if; if Nkind (Actual) = N_Type_Conversion then V_Typ := Etype (Expression (Actual)); -- If the formal is an (in-)out parameter, capture the name -- of the variable in order to build the post-call assignment. Var := Make_Var (Expression (Actual)); Crep := not Same_Representation (F_Typ, Etype (Expression (Actual))); else V_Typ := Etype (Actual); Var := Make_Var (Actual); Crep := False; end if; -- Setup initialization for case of in out parameter, or an out -- parameter where the formal is an unconstrained array (in the -- latter case, we have to pass in an object with bounds). -- If this is an out parameter, the initial copy is wasteful, so as -- an optimization for the one-dimensional case we extract the -- bounds of the actual and build an uninitialized temporary of the -- right size. if Ekind (Formal) = E_In_Out_Parameter or else (Is_Array_Type (F_Typ) and then not Is_Constrained (F_Typ)) then if Nkind (Actual) = N_Type_Conversion then if Conversion_OK (Actual) then Init := OK_Convert_To (F_Typ, New_Occurrence_Of (Var, Loc)); else Init := Convert_To (F_Typ, New_Occurrence_Of (Var, Loc)); end if; elsif Ekind (Formal) = E_Out_Parameter and then Is_Array_Type (F_Typ) and then Number_Dimensions (F_Typ) = 1 and then not Has_Non_Null_Base_Init_Proc (F_Typ) then -- Actual is a one-dimensional array or slice, and the type -- requires no initialization. Create a temporary of the -- right size, but do not copy actual into it (optimization). Init := Empty; Indic := Make_Subtype_Indication (Loc, Subtype_Mark => New_Occurrence_Of (F_Typ, Loc), Constraint => Make_Index_Or_Discriminant_Constraint (Loc, Constraints => New_List ( Make_Range (Loc, Low_Bound => Make_Attribute_Reference (Loc, Prefix => New_Occurrence_Of (Var, Loc), -- LLVM local Attribute_Name => Name_First), High_Bound => Make_Attribute_Reference (Loc, Prefix => New_Occurrence_Of (Var, Loc), Attribute_Name => Name_Last))))); else Init := New_Occurrence_Of (Var, Loc); end if; -- An initialization is created for packed conversions as -- actuals for out parameters to enable Make_Object_Declaration -- to determine the proper subtype for N_Node. Note that this -- is wasteful because the extra copying on the call side is -- not required for such out parameters. ??? elsif Ekind (Formal) = E_Out_Parameter and then Nkind (Actual) = N_Type_Conversion and then (Is_Bit_Packed_Array (F_Typ) or else Is_Bit_Packed_Array (Etype (Expression (Actual)))) then if Conversion_OK (Actual) then Init := OK_Convert_To (F_Typ, New_Occurrence_Of (Var, Loc)); else Init := Convert_To (F_Typ, New_Occurrence_Of (Var, Loc)); end if; elsif Ekind (Formal) = E_In_Parameter then Init := New_Occurrence_Of (Var, Loc); else Init := Empty; end if; N_Node := Make_Object_Declaration (Loc, Defining_Identifier => Temp, Object_Definition => Indic, Expression => Init); Set_Assignment_OK (N_Node); Insert_Action (N, N_Node); -- Now, normally the deal here is that we use the defining -- identifier created by that object declaration. There is -- one exception to this. In the change of representation case -- the above declaration will end up looking like: -- temp : type := identifier; -- And in this case we might as well use the identifier directly -- and eliminate the temporary. Note that the analysis of the -- declaration was not a waste of time in that case, since it is -- what generated the necessary change of representation code. If -- the change of representation introduced additional code, as in -- a fixed-integer conversion, the expression is not an identifier -- and must be kept. if Crep and then Present (Expression (N_Node)) and then Is_Entity_Name (Expression (N_Node)) then Temp := Entity (Expression (N_Node)); Rewrite (N_Node, Make_Null_Statement (Loc)); end if; -- For IN parameter, all we do is to replace the actual if Ekind (Formal) = E_In_Parameter then Rewrite (Actual, New_Reference_To (Temp, Loc)); Analyze (Actual); -- Processing for OUT or IN OUT parameter else -- Kill current value indications for the temporary variable we -- created, since we just passed it as an OUT parameter. Kill_Current_Values (Temp); -- If type conversion, use reverse conversion on exit if Nkind (Actual) = N_Type_Conversion then if Conversion_OK (Actual) then Expr := OK_Convert_To (V_Typ, New_Occurrence_Of (Temp, Loc)); else Expr := Convert_To (V_Typ, New_Occurrence_Of (Temp, Loc)); end if; else Expr := New_Occurrence_Of (Temp, Loc); end if; Rewrite (Actual, New_Reference_To (Temp, Loc)); Analyze (Actual); Append_To (Post_Call, Make_Assignment_Statement (Loc, Name => New_Occurrence_Of (Var, Loc), Expression => Expr)); Set_Assignment_OK (Name (Last (Post_Call))); end if; end Add_Call_By_Copy_Code; ---------------------------------- -- Add_Simple_Call_By_Copy_Code -- ---------------------------------- procedure Add_Simple_Call_By_Copy_Code is Temp : Entity_Id; Decl : Node_Id; Incod : Node_Id; Outcod : Node_Id; Lhs : Node_Id; Rhs : Node_Id; Indic : Node_Id; F_Typ : constant Entity_Id := Etype (Formal); begin if not Is_Legal_Copy then return; end if; -- Use formal type for temp, unless formal type is an unconstrained -- array, in which case we don't have to worry about bounds checks, -- and we use the actual type, since that has appropriate bounds. if Is_Array_Type (F_Typ) and then not Is_Constrained (F_Typ) then Indic := New_Occurrence_Of (Etype (Actual), Loc); else Indic := New_Occurrence_Of (Etype (Formal), Loc); end if; -- Prepare to generate code Reset_Packed_Prefix; Temp := Make_Defining_Identifier (Loc, New_Internal_Name ('T')); Incod := Relocate_Node (Actual); Outcod := New_Copy_Tree (Incod); -- Generate declaration of temporary variable, initializing it -- with the input parameter unless we have an OUT formal or -- this is an initialization call. -- If the formal is an out parameter with discriminants, the -- discriminants must be captured even if the rest of the object -- is in principle uninitialized, because the discriminants may -- be read by the called subprogram. if Ekind (Formal) = E_Out_Parameter then Incod := Empty; if Has_Discriminants (Etype (Formal)) then Indic := New_Occurrence_Of (Etype (Actual), Loc); end if; elsif Inside_Init_Proc then -- Could use a comment here to match comment below ??? if Nkind (Actual) /= N_Selected_Component or else not Has_Discriminant_Dependent_Constraint (Entity (Selector_Name (Actual))) then Incod := Empty; -- Otherwise, keep the component in order to generate the proper -- actual subtype, that depends on enclosing discriminants. else null; end if; end if; Decl := Make_Object_Declaration (Loc, Defining_Identifier => Temp, Object_Definition => Indic, Expression => Incod); if Inside_Init_Proc and then No (Incod) then -- If the call is to initialize a component of a composite type, -- and the component does not depend on discriminants, use the -- actual type of the component. This is required in case the -- component is constrained, because in general the formal of the -- initialization procedure will be unconstrained. Note that if -- the component being initialized is constrained by an enclosing -- discriminant, the presence of the initialization in the -- declaration will generate an expression for the actual subtype. Set_No_Initialization (Decl); Set_Object_Definition (Decl, New_Occurrence_Of (Etype (Actual), Loc)); end if; Insert_Action (N, Decl); -- The actual is simply a reference to the temporary Rewrite (Actual, New_Occurrence_Of (Temp, Loc)); -- Generate copy out if OUT or IN OUT parameter if Ekind (Formal) /= E_In_Parameter then Lhs := Outcod; Rhs := New_Occurrence_Of (Temp, Loc); -- Deal with conversion if Nkind (Lhs) = N_Type_Conversion then Lhs := Expression (Lhs); Rhs := Convert_To (Etype (Actual), Rhs); end if; Append_To (Post_Call, Make_Assignment_Statement (Loc, Name => Lhs, Expression => Rhs)); Set_Assignment_OK (Name (Last (Post_Call))); end if; end Add_Simple_Call_By_Copy_Code; --------------------------- -- Check_Fortran_Logical -- --------------------------- procedure Check_Fortran_Logical is Logical : constant Entity_Id := Etype (Formal); Var : Entity_Id; -- Note: this is very incomplete, e.g. it does not handle arrays -- of logical values. This is really not the right approach at all???) begin if Convention (Subp) = Convention_Fortran and then Root_Type (Etype (Formal)) = Standard_Boolean and then Ekind (Formal) /= E_In_Parameter then Var := Make_Var (Actual); Append_To (Post_Call, Make_Assignment_Statement (Loc, Name => New_Occurrence_Of (Var, Loc), Expression => Unchecked_Convert_To ( Logical, Make_Op_Ne (Loc, Left_Opnd => New_Occurrence_Of (Var, Loc), Right_Opnd => Unchecked_Convert_To ( Logical, New_Occurrence_Of (Standard_False, Loc)))))); end if; end Check_Fortran_Logical; ------------------- -- Is_Legal_Copy -- ------------------- function Is_Legal_Copy return Boolean is begin -- An attempt to copy a value of such a type can only occur if -- representation clauses give the actual a misaligned address. if Is_By_Reference_Type (Etype (Formal)) then Error_Msg_N ("misaligned actual cannot be passed by reference", Actual); return False; -- For users of Starlet, we assume that the specification of by- -- reference mechanism is mandatory. This may lead to unligned -- objects but at least for DEC legacy code it is known to work. -- The warning will alert users of this code that a problem may -- be lurking. elsif Mechanism (Formal) = By_Reference and then Is_Valued_Procedure (Scope (Formal)) then Error_Msg_N ("by_reference actual may be misaligned?", Actual); return False; else return True; end if; end Is_Legal_Copy; -------------- -- Make_Var -- -------------- function Make_Var (Actual : Node_Id) return Entity_Id is Var : Entity_Id; begin if Is_Entity_Name (Actual) then return Entity (Actual); else Var := Make_Defining_Identifier (Loc, New_Internal_Name ('T')); N_Node := Make_Object_Renaming_Declaration (Loc, Defining_Identifier => Var, Subtype_Mark => New_Occurrence_Of (Etype (Actual), Loc), Name => Relocate_Node (Actual)); Insert_Action (N, N_Node); return Var; end if; end Make_Var; ------------------------- -- Reset_Packed_Prefix -- ------------------------- procedure Reset_Packed_Prefix is Pfx : Node_Id := Actual; begin loop Set_Analyzed (Pfx, False); exit when Nkind (Pfx) /= N_Selected_Component and then Nkind (Pfx) /= N_Indexed_Component; Pfx := Prefix (Pfx); end loop; end Reset_Packed_Prefix; -- Start of processing for Expand_Actuals begin Post_Call := New_List; Formal := First_Formal (Subp); Actual := First_Actual (N); while Present (Formal) loop E_Formal := Etype (Formal); if Is_Scalar_Type (E_Formal) or else Nkind (Actual) = N_Slice then Check_Fortran_Logical; -- RM 6.4.1 (11) elsif Ekind (Formal) /= E_Out_Parameter then -- The unusual case of the current instance of a protected type -- requires special handling. This can only occur in the context -- of a call within the body of a protected operation. if Is_Entity_Name (Actual) and then Ekind (Entity (Actual)) = E_Protected_Type and then In_Open_Scopes (Entity (Actual)) then if Scope (Subp) /= Entity (Actual) then Error_Msg_N ("operation outside protected type may not " & "call back its protected operations?", Actual); end if; Rewrite (Actual, Expand_Protected_Object_Reference (N, Entity (Actual))); end if; Apply_Constraint_Check (Actual, E_Formal); -- Out parameter case. No constraint checks on access type -- RM 6.4.1 (13) elsif Is_Access_Type (E_Formal) then null; -- RM 6.4.1 (14) elsif Has_Discriminants (Base_Type (E_Formal)) or else Has_Non_Null_Base_Init_Proc (E_Formal) then Apply_Constraint_Check (Actual, E_Formal); -- RM 6.4.1 (15) else Apply_Constraint_Check (Actual, Base_Type (E_Formal)); end if; -- Processing for IN-OUT and OUT parameters if Ekind (Formal) /= E_In_Parameter then -- For type conversions of arrays, apply length/range checks if Is_Array_Type (E_Formal) and then Nkind (Actual) = N_Type_Conversion then if Is_Constrained (E_Formal) then Apply_Length_Check (Expression (Actual), E_Formal); else Apply_Range_Check (Expression (Actual), E_Formal); end if; end if; -- If argument is a type conversion for a type that is passed -- by copy, then we must pass the parameter by copy. if Nkind (Actual) = N_Type_Conversion and then (Is_Numeric_Type (E_Formal) or else Is_Access_Type (E_Formal) or else Is_Enumeration_Type (E_Formal) or else Is_Bit_Packed_Array (Etype (Formal)) or else Is_Bit_Packed_Array (Etype (Expression (Actual))) -- Also pass by copy if change of representation or else not Same_Representation (Etype (Formal), Etype (Expression (Actual)))) then Add_Call_By_Copy_Code; -- References to components of bit packed arrays are expanded -- at this point, rather than at the point of analysis of the -- actuals, to handle the expansion of the assignment to -- [in] out parameters. elsif Is_Ref_To_Bit_Packed_Array (Actual) then Add_Simple_Call_By_Copy_Code; -- If a non-scalar actual is possibly unaligned, we need a copy elsif Is_Possibly_Unaligned_Object (Actual) and then not Represented_As_Scalar (Etype (Formal)) then Add_Simple_Call_By_Copy_Code; -- References to slices of bit packed arrays are expanded elsif Is_Ref_To_Bit_Packed_Slice (Actual) then Add_Call_By_Copy_Code; -- References to possibly unaligned slices of arrays are expanded elsif Is_Possibly_Unaligned_Slice (Actual) then Add_Call_By_Copy_Code; -- Deal with access types where the actual subtpe and the -- formal subtype are not the same, requiring a check. -- It is necessary to exclude tagged types because of "downward -- conversion" errors and a strange assertion error in namet -- from gnatf in bug 1215-001 ??? elsif Is_Access_Type (E_Formal) and then not Same_Type (E_Formal, Etype (Actual)) and then not Is_Tagged_Type (Designated_Type (E_Formal)) then Add_Call_By_Copy_Code; -- If the actual is not a scalar and is marked for volatile -- treatment, whereas the formal is not volatile, then pass -- by copy unless it is a by-reference type. elsif Is_Entity_Name (Actual) and then Treat_As_Volatile (Entity (Actual)) and then not Is_By_Reference_Type (Etype (Actual)) and then not Is_Scalar_Type (Etype (Entity (Actual))) and then not Treat_As_Volatile (E_Formal) then Add_Call_By_Copy_Code; elsif Nkind (Actual) = N_Indexed_Component and then Is_Entity_Name (Prefix (Actual)) and then Has_Volatile_Components (Entity (Prefix (Actual))) then Add_Call_By_Copy_Code; end if; -- Processing for IN parameters else -- For IN parameters is in the packed array case, we expand an -- indexed component (the circuit in Exp_Ch4 deliberately left -- indexed components appearing as actuals untouched, so that -- the special processing above for the OUT and IN OUT cases -- could be performed. We could make the test in Exp_Ch4 more -- complex and have it detect the parameter mode, but it is -- easier simply to handle all cases here.) if Nkind (Actual) = N_Indexed_Component and then Is_Packed (Etype (Prefix (Actual))) then Reset_Packed_Prefix; Expand_Packed_Element_Reference (Actual); -- If we have a reference to a bit packed array, we copy it, -- since the actual must be byte aligned. -- Is this really necessary in all cases??? elsif Is_Ref_To_Bit_Packed_Array (Actual) then Add_Simple_Call_By_Copy_Code; -- If a non-scalar actual is possibly unaligned, we need a copy elsif Is_Possibly_Unaligned_Object (Actual) and then not Represented_As_Scalar (Etype (Formal)) then Add_Simple_Call_By_Copy_Code; -- Similarly, we have to expand slices of packed arrays here -- because the result must be byte aligned. elsif Is_Ref_To_Bit_Packed_Slice (Actual) then Add_Call_By_Copy_Code; -- Only processing remaining is to pass by copy if this is a -- reference to a possibly unaligned slice, since the caller -- expects an appropriately aligned argument. elsif Is_Possibly_Unaligned_Slice (Actual) then Add_Call_By_Copy_Code; end if; end if; Next_Formal (Formal); Next_Actual (Actual); end loop; -- Find right place to put post call stuff if it is present if not Is_Empty_List (Post_Call) then -- If call is not a list member, it must be the triggering statement -- of a triggering alternative or an entry call alternative, and we -- can add the post call stuff to the corresponding statement list. if not Is_List_Member (N) then declare P : constant Node_Id := Parent (N); begin pragma Assert (Nkind (P) = N_Triggering_Alternative or else Nkind (P) = N_Entry_Call_Alternative); if Is_Non_Empty_List (Statements (P)) then Insert_List_Before_And_Analyze (First (Statements (P)), Post_Call); else Set_Statements (P, Post_Call); end if; end; -- Otherwise, normal case where N is in a statement sequence, -- just put the post-call stuff after the call statement. else Insert_Actions_After (N, Post_Call); end if; end if; -- The call node itself is re-analyzed in Expand_Call end Expand_Actuals; ----------------- -- Expand_Call -- ----------------- -- This procedure handles expansion of function calls and procedure call -- statements (i.e. it serves as the body for Expand_N_Function_Call and -- Expand_N_Procedure_Call_Statement. Processing for calls includes: -- Replace call to Raise_Exception by Raise_Exception always if possible -- Provide values of actuals for all formals in Extra_Formals list -- Replace "call" to enumeration literal function by literal itself -- Rewrite call to predefined operator as operator -- Replace actuals to in-out parameters that are numeric conversions, -- with explicit assignment to temporaries before and after the call. -- Remove optional actuals if First_Optional_Parameter specified. -- Note that the list of actuals has been filled with default expressions -- during semantic analysis of the call. Only the extra actuals required -- for the 'Constrained attribute and for accessibility checks are added -- at this point. procedure Expand_Call (N : Node_Id) is Loc : constant Source_Ptr := Sloc (N); Remote : constant Boolean := Is_Remote_Call (N); Subp : Entity_Id; Orig_Subp : Entity_Id := Empty; Parent_Subp : Entity_Id; Parent_Formal : Entity_Id; Actual : Node_Id; Formal : Entity_Id; Prev : Node_Id := Empty; Prev_Orig : Node_Id; -- Original node for an actual, which may have been rewritten. If the -- actual is a function call that has been transformed from a selected -- component, the original node is unanalyzed. Otherwise, it carries -- semantic information used to generate additional actuals. Scop : Entity_Id; Extra_Actuals : List_Id := No_List; CW_Interface_Formals_Present : Boolean := False; procedure Add_Actual_Parameter (Insert_Param : Node_Id); -- Adds one entry to the end of the actual parameter list. Used for -- default parameters and for extra actuals (for Extra_Formals). The -- argument is an N_Parameter_Association node. procedure Add_Extra_Actual (Expr : Node_Id; EF : Entity_Id); -- Adds an extra actual to the list of extra actuals. Expr is the -- expression for the value of the actual, EF is the entity for the -- extra formal. function Inherited_From_Formal (S : Entity_Id) return Entity_Id; -- Within an instance, a type derived from a non-tagged formal derived -- type inherits from the original parent, not from the actual. This is -- tested in 4723-003. The current derivation mechanism has the derived -- type inherit from the actual, which is only correct outside of the -- instance. If the subprogram is inherited, we test for this particular -- case through a convoluted tree traversal before setting the proper -- subprogram to be called. -------------------------- -- Add_Actual_Parameter -- -------------------------- procedure Add_Actual_Parameter (Insert_Param : Node_Id) is Actual_Expr : constant Node_Id := Explicit_Actual_Parameter (Insert_Param); begin -- Case of insertion is first named actual if No (Prev) or else Nkind (Parent (Prev)) /= N_Parameter_Association then Set_Next_Named_Actual (Insert_Param, First_Named_Actual (N)); Set_First_Named_Actual (N, Actual_Expr); if No (Prev) then if No (Parameter_Associations (N)) then Set_Parameter_Associations (N, New_List); Append (Insert_Param, Parameter_Associations (N)); end if; else Insert_After (Prev, Insert_Param); end if; -- Case of insertion is not first named actual else Set_Next_Named_Actual (Insert_Param, Next_Named_Actual (Parent (Prev))); Set_Next_Named_Actual (Parent (Prev), Actual_Expr); Append (Insert_Param, Parameter_Associations (N)); end if; Prev := Actual_Expr; end Add_Actual_Parameter; ---------------------- -- Add_Extra_Actual -- ---------------------- procedure Add_Extra_Actual (Expr : Node_Id; EF : Entity_Id) is Loc : constant Source_Ptr := Sloc (Expr); begin if Extra_Actuals = No_List then Extra_Actuals := New_List; Set_Parent (Extra_Actuals, N); end if; Append_To (Extra_Actuals, Make_Parameter_Association (Loc, Explicit_Actual_Parameter => Expr, Selector_Name => Make_Identifier (Loc, Chars (EF)))); Analyze_And_Resolve (Expr, Etype (EF)); end Add_Extra_Actual; --------------------------- -- Inherited_From_Formal -- --------------------------- function Inherited_From_Formal (S : Entity_Id) return Entity_Id is Par : Entity_Id; Gen_Par : Entity_Id; Gen_Prim : Elist_Id; Elmt : Elmt_Id; Indic : Node_Id; begin -- If the operation is inherited, it is attached to the corresponding -- type derivation. If the parent in the derivation is a generic -- actual, it is a subtype of the actual, and we have to recover the -- original derived type declaration to find the proper parent. if Nkind (Parent (S)) /= N_Full_Type_Declaration or else not Is_Derived_Type (Defining_Identifier (Parent (S))) or else Nkind (Type_Definition (Original_Node (Parent (S)))) /= N_Derived_Type_Definition or else not In_Instance then return Empty; else Indic := (Subtype_Indication (Type_Definition (Original_Node (Parent (S))))); if Nkind (Indic) = N_Subtype_Indication then Par := Entity (Subtype_Mark (Indic)); else Par := Entity (Indic); end if; end if; if not Is_Generic_Actual_Type (Par) or else Is_Tagged_Type (Par) or else Nkind (Parent (Par)) /= N_Subtype_Declaration or else not In_Open_Scopes (Scope (Par)) then return Empty; else Gen_Par := Generic_Parent_Type (Parent (Par)); end if; -- If the generic parent type is still the generic type, this is a -- private formal, not a derived formal, and there are no operations -- inherited from the formal. if Nkind (Parent (Gen_Par)) = N_Formal_Type_Declaration then return Empty; end if; Gen_Prim := Collect_Primitive_Operations (Gen_Par); Elmt := First_Elmt (Gen_Prim); while Present (Elmt) loop if Chars (Node (Elmt)) = Chars (S) then declare F1 : Entity_Id; F2 : Entity_Id; begin F1 := First_Formal (S); F2 := First_Formal (Node (Elmt)); while Present (F1) and then Present (F2) loop if Etype (F1) = Etype (F2) or else Etype (F2) = Gen_Par then Next_Formal (F1); Next_Formal (F2); else Next_Elmt (Elmt); exit; -- not the right subprogram end if; return Node (Elmt); end loop; end; else Next_Elmt (Elmt); end if; end loop; raise Program_Error; end Inherited_From_Formal; -- Start of processing for Expand_Call begin -- Ignore if previous error if Nkind (N) in N_Has_Etype and then Etype (N) = Any_Type then return; end if; -- Call using access to subprogram with explicit dereference if Nkind (Name (N)) = N_Explicit_Dereference then Subp := Etype (Name (N)); Parent_Subp := Empty; -- Case of call to simple entry, where the Name is a selected component -- whose prefix is the task, and whose selector name is the entry name elsif Nkind (Name (N)) = N_Selected_Component then Subp := Entity (Selector_Name (Name (N))); Parent_Subp := Empty; -- Case of call to member of entry family, where Name is an indexed -- component, with the prefix being a selected component giving the -- task and entry family name, and the index being the entry index. elsif Nkind (Name (N)) = N_Indexed_Component then Subp := Entity (Selector_Name (Prefix (Name (N)))); Parent_Subp := Empty; -- Normal case else Subp := Entity (Name (N)); Parent_Subp := Alias (Subp); -- Replace call to Raise_Exception by call to Raise_Exception_Always -- if we can tell that the first parameter cannot possibly be null. -- This helps optimization and also generation of warnings. if not Restriction_Active (No_Exception_Handlers) and then Is_RTE (Subp, RE_Raise_Exception) then declare FA : constant Node_Id := Original_Node (First_Actual (N)); begin -- The case we catch is where the first argument is obtained -- using the Identity attribute (which must always be -- non-null). if Nkind (FA) = N_Attribute_Reference and then Attribute_Name (FA) = Name_Identity then Subp := RTE (RE_Raise_Exception_Always); Set_Entity (Name (N), Subp); end if; end; end if; if Ekind (Subp) = E_Entry then Parent_Subp := Empty; end if; end if; -- Ada 2005 (AI-345): We have a procedure call as a triggering -- alternative in an asynchronous select or as an entry call in -- a conditional or timed select. Check whether the procedure call -- is a renaming of an entry and rewrite it as an entry call. if Ada_Version >= Ada_05 and then Nkind (N) = N_Procedure_Call_Statement and then ((Nkind (Parent (N)) = N_Triggering_Alternative and then Triggering_Statement (Parent (N)) = N) or else (Nkind (Parent (N)) = N_Entry_Call_Alternative and then Entry_Call_Statement (Parent (N)) = N)) then declare Ren_Decl : Node_Id; Ren_Root : Entity_Id := Subp; begin -- This may be a chain of renamings, find the root if Present (Alias (Ren_Root)) then Ren_Root := Alias (Ren_Root); end if; if Present (Original_Node (Parent (Parent (Ren_Root)))) then Ren_Decl := Original_Node (Parent (Parent (Ren_Root))); if Nkind (Ren_Decl) = N_Subprogram_Renaming_Declaration then Rewrite (N, Make_Entry_Call_Statement (Loc, Name => New_Copy_Tree (Name (Ren_Decl)), Parameter_Associations => New_Copy_List_Tree (Parameter_Associations (N)))); return; end if; end if; end; end if; -- First step, compute extra actuals, corresponding to any -- Extra_Formals present. Note that we do not access Extra_Formals -- directly, instead we simply note the presence of the extra -- formals as we process the regular formals and collect the -- corresponding actuals in Extra_Actuals. -- We also generate any required range checks for actuals as we go -- through the loop, since this is a convenient place to do this. Formal := First_Formal (Subp); Actual := First_Actual (N); while Present (Formal) loop -- Generate range check if required (not activated yet ???) -- if Do_Range_Check (Actual) then -- Set_Do_Range_Check (Actual, False); -- Generate_Range_Check -- (Actual, Etype (Formal), CE_Range_Check_Failed); -- end if; -- Prepare to examine current entry Prev := Actual; Prev_Orig := Original_Node (Prev); if not Analyzed (Prev_Orig) and then Nkind (Actual) = N_Function_Call then Prev_Orig := Prev; end if; -- Ada 2005 (AI-251): Check if any formal is a class-wide interface -- to expand it in a further round. CW_Interface_Formals_Present := CW_Interface_Formals_Present or else (Ekind (Etype (Formal)) = E_Class_Wide_Type and then Is_Interface (Etype (Etype (Formal)))) or else (Ekind (Etype (Formal)) = E_Anonymous_Access_Type and then Is_Interface (Directly_Designated_Type (Etype (Etype (Formal))))); -- Create possible extra actual for constrained case. Usually, the -- extra actual is of the form actual'constrained, but since this -- attribute is only available for unconstrained records, TRUE is -- expanded if the type of the formal happens to be constrained (for -- instance when this procedure is inherited from an unconstrained -- record to a constrained one) or if the actual has no discriminant -- (its type is constrained). An exception to this is the case of a -- private type without discriminants. In this case we pass FALSE -- because the object has underlying discriminants with defaults. if Present (Extra_Constrained (Formal)) then if Ekind (Etype (Prev)) in Private_Kind and then not Has_Discriminants (Base_Type (Etype (Prev))) then Add_Extra_Actual ( New_Occurrence_Of (Standard_False, Loc), Extra_Constrained (Formal)); elsif Is_Constrained (Etype (Formal)) or else not Has_Discriminants (Etype (Prev)) then Add_Extra_Actual ( New_Occurrence_Of (Standard_True, Loc), Extra_Constrained (Formal)); -- Do not produce extra actuals for Unchecked_Union parameters. -- Jump directly to the end of the loop. elsif Is_Unchecked_Union (Base_Type (Etype (Actual))) then goto Skip_Extra_Actual_Generation; else -- If the actual is a type conversion, then the constrained -- test applies to the actual, not the target type. declare Act_Prev : Node_Id; begin -- Test for unchecked conversions as well, which can occur -- as out parameter actuals on calls to stream procedures. Act_Prev := Prev; while Nkind (Act_Prev) = N_Type_Conversion or else Nkind (Act_Prev) = N_Unchecked_Type_Conversion loop Act_Prev := Expression (Act_Prev); end loop; -- If the expression is a conversion of a dereference, -- this is internally generated code that manipulates -- addresses, e.g. when building interface tables. No -- check should occur in this case, and the discriminated -- object is not directly a hand. if not Comes_From_Source (Actual) and then Nkind (Actual) = N_Unchecked_Type_Conversion and then Nkind (Act_Prev) = N_Explicit_Dereference then Add_Extra_Actual (New_Occurrence_Of (Standard_False, Loc), Extra_Constrained (Formal)); else Add_Extra_Actual (Make_Attribute_Reference (Sloc (Prev), Prefix => Duplicate_Subexpr_No_Checks (Act_Prev, Name_Req => True), Attribute_Name => Name_Constrained), Extra_Constrained (Formal)); end if; end; end if; end if; -- Create possible extra actual for accessibility level if Present (Extra_Accessibility (Formal)) then if Is_Entity_Name (Prev_Orig) then -- When passing an access parameter as the actual to another -- access parameter we need to pass along the actual's own -- associated access level parameter. This is done if we are -- in the scope of the formal access parameter (if this is an -- inlined body the extra formal is irrelevant). if Ekind (Entity (Prev_Orig)) in Formal_Kind and then Ekind (Etype (Prev_Orig)) = E_Anonymous_Access_Type and then In_Open_Scopes (Scope (Entity (Prev_Orig))) then declare Parm_Ent : constant Entity_Id := Param_Entity (Prev_Orig); begin pragma Assert (Present (Parm_Ent)); if Present (Extra_Accessibility (Parm_Ent)) then Add_Extra_Actual (New_Occurrence_Of (Extra_Accessibility (Parm_Ent), Loc), Extra_Accessibility (Formal)); -- If the actual access parameter does not have an -- associated extra formal providing its scope level, -- then treat the actual as having library-level -- accessibility. else Add_Extra_Actual (Make_Integer_Literal (Loc, Intval => Scope_Depth (Standard_Standard)), Extra_Accessibility (Formal)); end if; end; -- The actual is a normal access value, so just pass the -- level of the actual's access type. else Add_Extra_Actual (Make_Integer_Literal (Loc, Intval => Type_Access_Level (Etype (Prev_Orig))), Extra_Accessibility (Formal)); end if; else case Nkind (Prev_Orig) is when N_Attribute_Reference => case Get_Attribute_Id (Attribute_Name (Prev_Orig)) is -- For X'Access, pass on the level of the prefix X when Attribute_Access => Add_Extra_Actual ( Make_Integer_Literal (Loc, Intval => Object_Access_Level (Prefix (Prev_Orig))), Extra_Accessibility (Formal)); -- Treat the unchecked attributes as library-level when Attribute_Unchecked_Access | Attribute_Unrestricted_Access => Add_Extra_Actual ( Make_Integer_Literal (Loc, Intval => Scope_Depth (Standard_Standard)), Extra_Accessibility (Formal)); -- No other cases of attributes returning access -- values that can be passed to access parameters when others => raise Program_Error; end case; -- For allocators we pass the level of the execution of -- the called subprogram, which is one greater than the -- current scope level. when N_Allocator => Add_Extra_Actual ( Make_Integer_Literal (Loc, Scope_Depth (Current_Scope) + 1), Extra_Accessibility (Formal)); -- For other cases we simply pass the level of the -- actual's access type. when others => Add_Extra_Actual ( Make_Integer_Literal (Loc, Intval => Type_Access_Level (Etype (Prev_Orig))), Extra_Accessibility (Formal)); end case; end if; end if; -- Perform the check of 4.6(49) that prevents a null value from being -- passed as an actual to an access parameter. Note that the check is -- elided in the common cases of passing an access attribute or -- access parameter as an actual. Also, we currently don't enforce -- this check for expander-generated actuals and when -gnatdj is set. if Ada_Version >= Ada_05 then -- Ada 2005 (AI-231): Check null-excluding access types if Is_Access_Type (Etype (Formal)) and then Can_Never_Be_Null (Etype (Formal)) and then Nkind (Prev) /= N_Raise_Constraint_Error and then (Nkind (Prev) = N_Null or else not Can_Never_Be_Null (Etype (Prev))) then Install_Null_Excluding_Check (Prev); end if; -- Ada_Version < Ada_05 else if Ekind (Etype (Formal)) /= E_Anonymous_Access_Type or else Access_Checks_Suppressed (Subp) then null; elsif Debug_Flag_J then null; elsif not Comes_From_Source (Prev) then null; elsif Is_Entity_Name (Prev) and then Ekind (Etype (Prev)) = E_Anonymous_Access_Type then null; elsif Nkind (Prev) = N_Allocator or else Nkind (Prev) = N_Attribute_Reference then null; -- Suppress null checks when passing to access parameters of Java -- subprograms. (Should this be done for other foreign conventions -- as well ???) elsif Convention (Subp) = Convention_Java then null; else Install_Null_Excluding_Check (Prev); end if; end if; -- Perform appropriate validity checks on parameters that -- are entities. if Validity_Checks_On then if (Ekind (Formal) = E_In_Parameter and then Validity_Check_In_Params) or else (Ekind (Formal) = E_In_Out_Parameter and then Validity_Check_In_Out_Params) then -- If the actual is an indexed component of a packed -- type, it has not been expanded yet. It will be -- copied in the validity code that follows, and has -- to be expanded appropriately, so reanalyze it. if Nkind (Actual) = N_Indexed_Component then Set_Analyzed (Actual, False); end if; Ensure_Valid (Actual); end if; end if; -- For IN OUT and OUT parameters, ensure that subscripts are valid -- since this is a left side reference. We only do this for calls -- from the source program since we assume that compiler generated -- calls explicitly generate any required checks. We also need it -- only if we are doing standard validity checks, since clearly it -- is not needed if validity checks are off, and in subscript -- validity checking mode, all indexed components are checked with -- a call directly from Expand_N_Indexed_Component. if Comes_From_Source (N) and then Ekind (Formal) /= E_In_Parameter and then Validity_Checks_On and then Validity_Check_Default and then not Validity_Check_Subscripts then Check_Valid_Lvalue_Subscripts (Actual); end if; -- Mark any scalar OUT parameter that is a simple variable as no -- longer known to be valid (unless the type is always valid). This -- reflects the fact that if an OUT parameter is never set in a -- procedure, then it can become invalid on the procedure return. if Ekind (Formal) = E_Out_Parameter and then Is_Entity_Name (Actual) and then Ekind (Entity (Actual)) = E_Variable and then not Is_Known_Valid (Etype (Actual)) then Set_Is_Known_Valid (Entity (Actual), False); end if; -- For an OUT or IN OUT parameter, if the actual is an entity, then -- clear current values, since they can be clobbered. We are probably -- doing this in more places than we need to, but better safe than -- sorry when it comes to retaining bad current values! if Ekind (Formal) /= E_In_Parameter and then Is_Entity_Name (Actual) then Kill_Current_Values (Entity (Actual)); end if; -- If the formal is class wide and the actual is an aggregate, force -- evaluation so that the back end who does not know about class-wide -- type, does not generate a temporary of the wrong size. if not Is_Class_Wide_Type (Etype (Formal)) then null; elsif Nkind (Actual) = N_Aggregate or else (Nkind (Actual) = N_Qualified_Expression and then Nkind (Expression (Actual)) = N_Aggregate) then Force_Evaluation (Actual); end if; -- In a remote call, if the formal is of a class-wide type, check -- that the actual meets the requirements described in E.4(18). if Remote and then Is_Class_Wide_Type (Etype (Formal)) then Insert_Action (Actual, Make_Implicit_If_Statement (N, Condition => Make_Op_Not (Loc, Get_Remotely_Callable (Duplicate_Subexpr_Move_Checks (Actual))), Then_Statements => New_List ( Make_Raise_Program_Error (Loc, Reason => PE_Illegal_RACW_E_4_18)))); end if; -- This label is required when skipping extra actual generation for -- Unchecked_Union parameters. <<Skip_Extra_Actual_Generation>> Next_Actual (Actual); Next_Formal (Formal); end loop; -- If we are expanding a rhs of an assignment we need to check if tag -- propagation is needed. You might expect this processing to be in -- Analyze_Assignment but has to be done earlier (bottom-up) because the -- assignment might be transformed to a declaration for an unconstrained -- value if the expression is classwide. if Nkind (N) = N_Function_Call and then Is_Tag_Indeterminate (N) and then Is_Entity_Name (Name (N)) then declare Ass : Node_Id := Empty; begin if Nkind (Parent (N)) = N_Assignment_Statement then Ass := Parent (N); elsif Nkind (Parent (N)) = N_Qualified_Expression and then Nkind (Parent (Parent (N))) = N_Assignment_Statement then Ass := Parent (Parent (N)); end if; if Present (Ass) and then Is_Class_Wide_Type (Etype (Name (Ass))) then if Etype (N) /= Root_Type (Etype (Name (Ass))) then Error_Msg_NE ("tag-indeterminate expression must have type&" & "('R'M 5.2 (6))", N, Root_Type (Etype (Name (Ass)))); else Propagate_Tag (Name (Ass), N); end if; -- The call will be rewritten as a dispatching call, and -- expanded as such. return; end if; end; end if; -- Ada 2005 (AI-251): If some formal is a class-wide interface, expand -- it to point to the correct secondary virtual table if (Nkind (N) = N_Function_Call or else Nkind (N) = N_Procedure_Call_Statement) and then CW_Interface_Formals_Present then Expand_Interface_Actuals (N); end if; -- Deals with Dispatch_Call if we still have a call, before expanding -- extra actuals since this will be done on the re-analysis of the -- dispatching call. Note that we do not try to shorten the actual -- list for a dispatching call, it would not make sense to do so. -- Expansion of dispatching calls is suppressed when Java_VM, because -- the JVM back end directly handles the generation of dispatching -- calls and would have to undo any expansion to an indirect call. if (Nkind (N) = N_Function_Call or else Nkind (N) = N_Procedure_Call_Statement) and then Present (Controlling_Argument (N)) and then not Java_VM then Expand_Dispatching_Call (N); -- The following return is worrisome. Is it really OK to -- skip all remaining processing in this procedure ??? return; -- Similarly, expand calls to RCI subprograms on which pragma -- All_Calls_Remote applies. The rewriting will be reanalyzed -- later. Do this only when the call comes from source since we do -- not want such a rewritting to occur in expanded code. elsif Is_All_Remote_Call (N) then Expand_All_Calls_Remote_Subprogram_Call (N); -- Similarly, do not add extra actuals for an entry call whose entity -- is a protected procedure, or for an internal protected subprogram -- call, because it will be rewritten as a protected subprogram call -- and reanalyzed (see Expand_Protected_Subprogram_Call). elsif Is_Protected_Type (Scope (Subp)) and then (Ekind (Subp) = E_Procedure or else Ekind (Subp) = E_Function) then null; -- During that loop we gathered the extra actuals (the ones that -- correspond to Extra_Formals), so now they can be appended. else while Is_Non_Empty_List (Extra_Actuals) loop Add_Actual_Parameter (Remove_Head (Extra_Actuals)); end loop; end if; -- At this point we have all the actuals, so this is the point at -- which the various expansion activities for actuals is carried out. Expand_Actuals (N, Subp); -- If the subprogram is a renaming, or if it is inherited, replace it -- in the call with the name of the actual subprogram being called. -- If this is a dispatching call, the run-time decides what to call. -- The Alias attribute does not apply to entries. if Nkind (N) /= N_Entry_Call_Statement and then No (Controlling_Argument (N)) and then Present (Parent_Subp) then if Present (Inherited_From_Formal (Subp)) then Parent_Subp := Inherited_From_Formal (Subp); else while Present (Alias (Parent_Subp)) loop Parent_Subp := Alias (Parent_Subp); end loop; end if; -- The below setting of Entity is suspect, see F109-018 discussion??? Set_Entity (Name (N), Parent_Subp); if Is_Abstract (Parent_Subp) and then not In_Instance then Error_Msg_NE ("cannot call abstract subprogram &!", Name (N), Parent_Subp); end if; -- Add an explicit conversion for parameter of the derived type. -- This is only done for scalar and access in-parameters. Others -- have been expanded in expand_actuals. Formal := First_Formal (Subp); Parent_Formal := First_Formal (Parent_Subp); Actual := First_Actual (N); -- It is not clear that conversion is needed for intrinsic -- subprograms, but it certainly is for those that are user- -- defined, and that can be inherited on derivation, namely -- unchecked conversion and deallocation. -- General case needs study ??? if not Is_Intrinsic_Subprogram (Parent_Subp) or else Is_Generic_Instance (Parent_Subp) then while Present (Formal) loop if Etype (Formal) /= Etype (Parent_Formal) and then Is_Scalar_Type (Etype (Formal)) and then Ekind (Formal) = E_In_Parameter and then not Raises_Constraint_Error (Actual) then Rewrite (Actual, OK_Convert_To (Etype (Parent_Formal), Relocate_Node (Actual))); Analyze (Actual); Resolve (Actual, Etype (Parent_Formal)); Enable_Range_Check (Actual); elsif Is_Access_Type (Etype (Formal)) and then Base_Type (Etype (Parent_Formal)) /= Base_Type (Etype (Actual)) then if Ekind (Formal) /= E_In_Parameter then Rewrite (Actual, Convert_To (Etype (Parent_Formal), Relocate_Node (Actual))); Analyze (Actual); Resolve (Actual, Etype (Parent_Formal)); elsif Ekind (Etype (Parent_Formal)) = E_Anonymous_Access_Type and then Designated_Type (Etype (Parent_Formal)) /= Designated_Type (Etype (Actual)) and then not Is_Controlling_Formal (Formal) then -- This unchecked conversion is not necessary unless -- inlining is enabled, because in that case the type -- mismatch may become visible in the body about to be -- inlined. Rewrite (Actual, Unchecked_Convert_To (Etype (Parent_Formal), Relocate_Node (Actual))); Analyze (Actual); Resolve (Actual, Etype (Parent_Formal)); end if; end if; Next_Formal (Formal); Next_Formal (Parent_Formal); Next_Actual (Actual); end loop; end if; Orig_Subp := Subp; Subp := Parent_Subp; end if; -- Check for violation of No_Abort_Statements if Is_RTE (Subp, RE_Abort_Task) then Check_Restriction (No_Abort_Statements, N); -- Check for violation of No_Dynamic_Attachment elsif RTU_Loaded (Ada_Interrupts) and then (Is_RTE (Subp, RE_Is_Reserved) or else Is_RTE (Subp, RE_Is_Attached) or else Is_RTE (Subp, RE_Current_Handler) or else Is_RTE (Subp, RE_Attach_Handler) or else Is_RTE (Subp, RE_Exchange_Handler) or else Is_RTE (Subp, RE_Detach_Handler) or else Is_RTE (Subp, RE_Reference)) then Check_Restriction (No_Dynamic_Attachment, N); end if; -- Deal with case where call is an explicit dereference if Nkind (Name (N)) = N_Explicit_Dereference then -- Handle case of access to protected subprogram type if Ekind (Base_Type (Etype (Prefix (Name (N))))) = E_Access_Protected_Subprogram_Type then -- If this is a call through an access to protected operation, -- the prefix has the form (object'address, operation'access). -- Rewrite as a for other protected calls: the object is the -- first parameter of the list of actuals. declare Call : Node_Id; Parm : List_Id; Nam : Node_Id; Obj : Node_Id; Ptr : constant Node_Id := Prefix (Name (N)); T : constant Entity_Id := Equivalent_Type (Base_Type (Etype (Ptr))); D_T : constant Entity_Id := Designated_Type (Base_Type (Etype (Ptr))); begin Obj := Make_Selected_Component (Loc, Prefix => Unchecked_Convert_To (T, Ptr), Selector_Name => New_Occurrence_Of (First_Entity (T), Loc)); Nam := Make_Selected_Component (Loc, Prefix => Unchecked_Convert_To (T, Ptr), Selector_Name => New_Occurrence_Of (Next_Entity (First_Entity (T)), Loc)); Nam := Make_Explicit_Dereference (Loc, Nam); if Present (Parameter_Associations (N)) then Parm := Parameter_Associations (N); else Parm := New_List; end if; Prepend (Obj, Parm); if Etype (D_T) = Standard_Void_Type then Call := Make_Procedure_Call_Statement (Loc, Name => Nam, Parameter_Associations => Parm); else Call := Make_Function_Call (Loc, Name => Nam, Parameter_Associations => Parm); end if; Set_First_Named_Actual (Call, First_Named_Actual (N)); Set_Etype (Call, Etype (D_T)); -- We do not re-analyze the call to avoid infinite recursion. -- We analyze separately the prefix and the object, and set -- the checks on the prefix that would otherwise be emitted -- when resolving a call. Rewrite (N, Call); Analyze (Nam); Apply_Access_Check (Nam); Analyze (Obj); return; end; end if; end if; -- If this is a call to an intrinsic subprogram, then perform the -- appropriate expansion to the corresponding tree node and we -- are all done (since after that the call is gone!) -- In the case where the intrinsic is to be processed by the back end, -- the call to Expand_Intrinsic_Call will do nothing, which is fine, -- since the idea in this case is to pass the call unchanged. if Is_Intrinsic_Subprogram (Subp) then Expand_Intrinsic_Call (N, Subp); return; end if; if Ekind (Subp) = E_Function or else Ekind (Subp) = E_Procedure then if Is_Inlined (Subp) then Inlined_Subprogram : declare Bod : Node_Id; Must_Inline : Boolean := False; Spec : constant Node_Id := Unit_Declaration_Node (Subp); Scop : constant Entity_Id := Scope (Subp); function In_Unfrozen_Instance return Boolean; -- If the subprogram comes from an instance in the same -- unit, and the instance is not yet frozen, inlining might -- trigger order-of-elaboration problems in gigi. -------------------------- -- In_Unfrozen_Instance -- -------------------------- function In_Unfrozen_Instance return Boolean is S : Entity_Id; begin S := Scop; while Present (S) and then S /= Standard_Standard loop if Is_Generic_Instance (S) and then Present (Freeze_Node (S)) and then not Analyzed (Freeze_Node (S)) then return True; end if; S := Scope (S); end loop; return False; end In_Unfrozen_Instance; -- Start of processing for Inlined_Subprogram begin -- Verify that the body to inline has already been seen, and -- that if the body is in the current unit the inlining does -- not occur earlier. This avoids order-of-elaboration problems -- in the back end. -- This should be documented in sinfo/einfo ??? if No (Spec) or else Nkind (Spec) /= N_Subprogram_Declaration or else No (Body_To_Inline (Spec)) then Must_Inline := False; -- If this an inherited function that returns a private -- type, do not inline if the full view is an unconstrained -- array, because such calls cannot be inlined. elsif Present (Orig_Subp) and then Is_Array_Type (Etype (Orig_Subp)) and then not Is_Constrained (Etype (Orig_Subp)) then Must_Inline := False; elsif In_Unfrozen_Instance then Must_Inline := False; else Bod := Body_To_Inline (Spec); if (In_Extended_Main_Code_Unit (N) or else In_Extended_Main_Code_Unit (Parent (N)) or else Is_Always_Inlined (Subp)) and then (not In_Same_Extended_Unit (Sloc (Bod), Loc) or else Earlier_In_Extended_Unit (Sloc (Bod), Loc)) then Must_Inline := True; -- If we are compiling a package body that is not the main -- unit, it must be for inlining/instantiation purposes, -- in which case we inline the call to insure that the same -- temporaries are generated when compiling the body by -- itself. Otherwise link errors can occur. -- If the function being called is itself in the main unit, -- we cannot inline, because there is a risk of double -- elaboration and/or circularity: the inlining can make -- visible a private entity in the body of the main unit, -- that gigi will see before its sees its proper definition. elsif not (In_Extended_Main_Code_Unit (N)) and then In_Package_Body then Must_Inline := not In_Extended_Main_Source_Unit (Subp); end if; end if; if Must_Inline then Expand_Inlined_Call (N, Subp, Orig_Subp); else -- Let the back end handle it Add_Inlined_Body (Subp); if Front_End_Inlining and then Nkind (Spec) = N_Subprogram_Declaration and then (In_Extended_Main_Code_Unit (N)) and then No (Body_To_Inline (Spec)) and then not Has_Completion (Subp) and then In_Same_Extended_Unit (Sloc (Spec), Loc) then Cannot_Inline ("cannot inline& (body not seen yet)?", N, Subp); end if; end if; end Inlined_Subprogram; end if; end if; -- Check for a protected subprogram. This is either an intra-object -- call, or a protected function call. Protected procedure calls are -- rewritten as entry calls and handled accordingly. -- In Ada 2005, this may be an indirect call to an access parameter -- that is an access_to_subprogram. In that case the anonymous type -- has a scope that is a protected operation, but the call is a -- regular one. Scop := Scope (Subp); if Nkind (N) /= N_Entry_Call_Statement and then Is_Protected_Type (Scop) and then Ekind (Subp) /= E_Subprogram_Type then -- If the call is an internal one, it is rewritten as a call to -- to the corresponding unprotected subprogram. Expand_Protected_Subprogram_Call (N, Subp, Scop); end if; -- Functions returning controlled objects need special attention if Controlled_Type (Etype (Subp)) and then not Is_Return_By_Reference_Type (Etype (Subp)) then Expand_Ctrl_Function_Call (N); end if; -- Test for First_Optional_Parameter, and if so, truncate parameter -- list if there are optional parameters at the trailing end. -- Note we never delete procedures for call via a pointer. if (Ekind (Subp) = E_Procedure or else Ekind (Subp) = E_Function) and then Present (First_Optional_Parameter (Subp)) then declare Last_Keep_Arg : Node_Id; begin -- Last_Keep_Arg will hold the last actual that should be -- retained. If it remains empty at the end, it means that -- all parameters are optional. Last_Keep_Arg := Empty; -- Find first optional parameter, must be present since we -- checked the validity of the parameter before setting it. Formal := First_Formal (Subp); Actual := First_Actual (N); while Formal /= First_Optional_Parameter (Subp) loop Last_Keep_Arg := Actual; Next_Formal (Formal); Next_Actual (Actual); end loop; -- We have Formal and Actual pointing to the first potentially -- droppable argument. We can drop all the trailing arguments -- whose actual matches the default. Note that we know that all -- remaining formals have defaults, because we checked that this -- requirement was met before setting First_Optional_Parameter. -- We use Fully_Conformant_Expressions to check for identity -- between formals and actuals, which may miss some cases, but -- on the other hand, this is only an optimization (if we fail -- to truncate a parameter it does not affect functionality). -- So if the default is 3 and the actual is 1+2, we consider -- them unequal, which hardly seems worrisome. while Present (Formal) loop if not Fully_Conformant_Expressions (Actual, Default_Value (Formal)) then Last_Keep_Arg := Actual; end if; Next_Formal (Formal); Next_Actual (Actual); end loop; -- If no arguments, delete entire list, this is the easy case if No (Last_Keep_Arg) then while Is_Non_Empty_List (Parameter_Associations (N)) loop Delete_Tree (Remove_Head (Parameter_Associations (N))); end loop; Set_Parameter_Associations (N, No_List); Set_First_Named_Actual (N, Empty); -- Case where at the last retained argument is positional. This -- is also an easy case, since the retained arguments are already -- in the right form, and we don't need to worry about the order -- of arguments that get eliminated. elsif Is_List_Member (Last_Keep_Arg) then while Present (Next (Last_Keep_Arg)) loop Delete_Tree (Remove_Next (Last_Keep_Arg)); end loop; Set_First_Named_Actual (N, Empty); -- This is the annoying case where the last retained argument -- is a named parameter. Since the original arguments are not -- in declaration order, we may have to delete some fairly -- random collection of arguments. else declare Temp : Node_Id; Passoc : Node_Id; Discard : Node_Id; pragma Warnings (Off, Discard); begin -- First step, remove all the named parameters from the -- list (they are still chained using First_Named_Actual -- and Next_Named_Actual, so we have not lost them!) Temp := First (Parameter_Associations (N)); -- Case of all parameters named, remove them all if Nkind (Temp) = N_Parameter_Association then while Is_Non_Empty_List (Parameter_Associations (N)) loop Temp := Remove_Head (Parameter_Associations (N)); end loop; -- Case of mixed positional/named, remove named parameters else while Nkind (Next (Temp)) /= N_Parameter_Association loop Next (Temp); end loop; while Present (Next (Temp)) loop -- LLVM local Remove (Next (Temp)); end loop; end if; -- Now we loop through the named parameters, till we get -- to the last one to be retained, adding them to the list. -- Note that the Next_Named_Actual list does not need to be -- touched since we are only reordering them on the actual -- parameter association list. Passoc := Parent (First_Named_Actual (N)); loop Temp := Relocate_Node (Passoc); Append_To (Parameter_Associations (N), Temp); exit when Last_Keep_Arg = Explicit_Actual_Parameter (Passoc); Passoc := Parent (Next_Named_Actual (Passoc)); end loop; Set_Next_Named_Actual (Temp, Empty); loop Temp := Next_Named_Actual (Passoc); exit when No (Temp); Set_Next_Named_Actual (Passoc, Next_Named_Actual (Parent (Temp))); Delete_Tree (Temp); end loop; end; end if; end; end if; -- Special processing for Ada 2005 AI-329, which requires a call to -- Raise_Exception to raise Constraint_Error if the Exception_Id is -- null. Note that we never need to do this in GNAT mode, or if the -- parameter to Raise_Exception is a use of Identity, since in these -- cases we know that the parameter is never null. if Ada_Version >= Ada_05 and then not GNAT_Mode and then Is_RTE (Subp, RE_Raise_Exception) and then (Nkind (First_Actual (N)) /= N_Attribute_Reference or else Attribute_Name (First_Actual (N)) /= Name_Identity) then declare RCE : constant Node_Id := Make_Raise_Constraint_Error (Loc, Reason => CE_Null_Exception_Id); begin Insert_After (N, RCE); Analyze (RCE); end; end if; end Expand_Call; -------------------------- -- Expand_Inlined_Call -- -------------------------- procedure Expand_Inlined_Call (N : Node_Id; Subp : Entity_Id; Orig_Subp : Entity_Id) is Loc : constant Source_Ptr := Sloc (N); Is_Predef : constant Boolean := Is_Predefined_File_Name (Unit_File_Name (Get_Source_Unit (Subp))); Orig_Bod : constant Node_Id := Body_To_Inline (Unit_Declaration_Node (Subp)); Blk : Node_Id; Bod : Node_Id; Decl : Node_Id; Decls : constant List_Id := New_List; Exit_Lab : Entity_Id := Empty; F : Entity_Id; A : Node_Id; Lab_Decl : Node_Id; Lab_Id : Node_Id; New_A : Node_Id; Num_Ret : Int := 0; Ret_Type : Entity_Id; Targ : Node_Id; Targ1 : Node_Id; Temp : Entity_Id; Temp_Typ : Entity_Id; Is_Unc : constant Boolean := Is_Array_Type (Etype (Subp)) and then not Is_Constrained (Etype (Subp)); -- If the type returned by the function is unconstrained and the -- call can be inlined, special processing is required. procedure Find_Result; -- For a function that returns an unconstrained type, retrieve the -- name of the single variable that is the expression of a return -- statement in the body of the function. Build_Body_To_Inline has -- verified that this variable is unique, even in the presence of -- multiple return statements. procedure Make_Exit_Label; -- Build declaration for exit label to be used in Return statements function Process_Formals (N : Node_Id) return Traverse_Result; -- Replace occurrence of a formal with the corresponding actual, or -- the thunk generated for it. function Process_Sloc (Nod : Node_Id) return Traverse_Result; -- If the call being expanded is that of an internal subprogram, -- set the sloc of the generated block to that of the call itself, -- so that the expansion is skipped by the -next- command in gdb. -- Same processing for a subprogram in a predefined file, e.g. -- Ada.Tags. If Debug_Generated_Code is true, suppress this change -- to simplify our own development. procedure Rewrite_Function_Call (N : Node_Id; Blk : Node_Id); -- If the function body is a single expression, replace call with -- expression, else insert block appropriately. procedure Rewrite_Procedure_Call (N : Node_Id; Blk : Node_Id); -- If procedure body has no local variables, inline body without -- creating block, otherwise rewrite call with block. function Formal_Is_Used_Once (Formal : Entity_Id) return Boolean; -- Determine whether a formal parameter is used only once in Orig_Bod ----------------- -- Find_Result -- ----------------- procedure Find_Result is Decl : Node_Id; Id : Node_Id; function Get_Return (N : Node_Id) return Traverse_Result; -- Recursive function to locate return statements in body. function Get_Return (N : Node_Id) return Traverse_Result is begin if Nkind (N) = N_Return_Statement then Id := Expression (N); return Abandon; else return OK; end if; end Get_Return; procedure Find_It is new Traverse_Proc (Get_Return); -- Start of processing for Find_Result begin Find_It (Handled_Statement_Sequence (Orig_Bod)); -- At this point the body is unanalyzed. Traverse the list of -- declarations to locate the defining_identifier for it. Decl := First (Declarations (Blk)); while Present (Decl) loop if Chars (Defining_Identifier (Decl)) = Chars (Id) then Targ1 := Defining_Identifier (Decl); exit; else Next (Decl); end if; end loop; end Find_Result; --------------------- -- Make_Exit_Label -- --------------------- procedure Make_Exit_Label is begin -- Create exit label for subprogram if one does not exist yet if No (Exit_Lab) then Lab_Id := Make_Identifier (Loc, New_Internal_Name ('L')); Set_Entity (Lab_Id, Make_Defining_Identifier (Loc, Chars (Lab_Id))); Exit_Lab := Make_Label (Loc, Lab_Id); Lab_Decl := Make_Implicit_Label_Declaration (Loc, Defining_Identifier => Entity (Lab_Id), Label_Construct => Exit_Lab); end if; end Make_Exit_Label; --------------------- -- Process_Formals -- --------------------- function Process_Formals (N : Node_Id) return Traverse_Result is A : Entity_Id; E : Entity_Id; Ret : Node_Id; begin if Is_Entity_Name (N) and then Present (Entity (N)) then E := Entity (N); if Is_Formal (E) and then Scope (E) = Subp then A := Renamed_Object (E); if Is_Entity_Name (A) then Rewrite (N, New_Occurrence_Of (Entity (A), Loc)); elsif Nkind (A) = N_Defining_Identifier then Rewrite (N, New_Occurrence_Of (A, Loc)); else -- numeric literal Rewrite (N, New_Copy (A)); end if; end if; return Skip; elsif Nkind (N) = N_Return_Statement then if No (Expression (N)) then Make_Exit_Label; Rewrite (N, Make_Goto_Statement (Loc, Name => New_Copy (Lab_Id))); else if Nkind (Parent (N)) = N_Handled_Sequence_Of_Statements and then Nkind (Parent (Parent (N))) = N_Subprogram_Body then -- Function body is a single expression. No need for -- exit label. null; else Num_Ret := Num_Ret + 1; Make_Exit_Label; end if; -- Because of the presence of private types, the views of the -- expression and the context may be different, so place an -- unchecked conversion to the context type to avoid spurious -- errors, eg. when the expression is a numeric literal and -- the context is private. If the expression is an aggregate, -- use a qualified expression, because an aggregate is not a -- legal argument of a conversion. if Nkind (Expression (N)) = N_Aggregate or else Nkind (Expression (N)) = N_Null then Ret := Make_Qualified_Expression (Sloc (N), Subtype_Mark => New_Occurrence_Of (Ret_Type, Sloc (N)), Expression => Relocate_Node (Expression (N))); else Ret := Unchecked_Convert_To (Ret_Type, Relocate_Node (Expression (N))); end if; if Nkind (Targ) = N_Defining_Identifier then Rewrite (N, Make_Assignment_Statement (Loc, Name => New_Occurrence_Of (Targ, Loc), Expression => Ret)); else Rewrite (N, Make_Assignment_Statement (Loc, Name => New_Copy (Targ), Expression => Ret)); end if; Set_Assignment_OK (Name (N)); if Present (Exit_Lab) then Insert_After (N, Make_Goto_Statement (Loc, Name => New_Copy (Lab_Id))); end if; end if; return OK; -- Remove pragma Unreferenced since it may refer to formals that -- are not visible in the inlined body, and in any case we will -- not be posting warnings on the inlined body so it is unneeded. elsif Nkind (N) = N_Pragma and then Chars (N) = Name_Unreferenced then Rewrite (N, Make_Null_Statement (Sloc (N))); return OK; else return OK; end if; end Process_Formals; procedure Replace_Formals is new Traverse_Proc (Process_Formals); ------------------ -- Process_Sloc -- ------------------ function Process_Sloc (Nod : Node_Id) return Traverse_Result is begin if not Debug_Generated_Code then Set_Sloc (Nod, Sloc (N)); Set_Comes_From_Source (Nod, False); end if; return OK; end Process_Sloc; procedure Reset_Slocs is new Traverse_Proc (Process_Sloc); --------------------------- -- Rewrite_Function_Call -- --------------------------- procedure Rewrite_Function_Call (N : Node_Id; Blk : Node_Id) is HSS : constant Node_Id := Handled_Statement_Sequence (Blk); Fst : constant Node_Id := First (Statements (HSS)); begin -- Optimize simple case: function body is a single return statement, -- which has been expanded into an assignment. if Is_Empty_List (Declarations (Blk)) and then Nkind (Fst) = N_Assignment_Statement and then No (Next (Fst)) then -- The function call may have been rewritten as the temporary -- that holds the result of the call, in which case remove the -- now useless declaration. if Nkind (N) = N_Identifier and then Nkind (Parent (Entity (N))) = N_Object_Declaration then Rewrite (Parent (Entity (N)), Make_Null_Statement (Loc)); end if; Rewrite (N, Expression (Fst)); elsif Nkind (N) = N_Identifier and then Nkind (Parent (Entity (N))) = N_Object_Declaration then -- The block assigns the result of the call to the temporary Insert_After (Parent (Entity (N)), Blk); elsif Nkind (Parent (N)) = N_Assignment_Statement and then (Is_Entity_Name (Name (Parent (N))) or else (Nkind (Name (Parent (N))) = N_Explicit_Dereference and then Is_Entity_Name (Prefix (Name (Parent (N)))))) then -- Replace assignment with the block declare Original_Assignment : constant Node_Id := Parent (N); begin -- Preserve the original assignment node to keep the complete -- assignment subtree consistent enough for Analyze_Assignment -- to proceed (specifically, the original Lhs node must still -- have an assignment statement as its parent). -- We cannot rely on Original_Node to go back from the block -- node to the assignment node, because the assignment might -- already be a rewrite substitution. Discard_Node (Relocate_Node (Original_Assignment)); Rewrite (Original_Assignment, Blk); end; elsif Nkind (Parent (N)) = N_Object_Declaration then Set_Expression (Parent (N), Empty); Insert_After (Parent (N), Blk); elsif Is_Unc then Insert_Before (Parent (N), Blk); end if; end Rewrite_Function_Call; ---------------------------- -- Rewrite_Procedure_Call -- ---------------------------- procedure Rewrite_Procedure_Call (N : Node_Id; Blk : Node_Id) is HSS : constant Node_Id := Handled_Statement_Sequence (Blk); begin if Is_Empty_List (Declarations (Blk)) then Insert_List_After (N, Statements (HSS)); Rewrite (N, Make_Null_Statement (Loc)); else Rewrite (N, Blk); end if; end Rewrite_Procedure_Call; ------------------------- -- Formal_Is_Used_Once -- ------------------------ function Formal_Is_Used_Once (Formal : Entity_Id) return Boolean is Use_Counter : Int := 0; function Count_Uses (N : Node_Id) return Traverse_Result; -- Traverse the tree and count the uses of the formal parameter. -- In this case, for optimization purposes, we do not need to -- continue the traversal once more than one use is encountered. ---------------- -- Count_Uses -- ---------------- function Count_Uses (N : Node_Id) return Traverse_Result is begin -- The original node is an identifier if Nkind (N) = N_Identifier and then Present (Entity (N)) -- Original node's entity points to the one in the copied body and then Nkind (Entity (N)) = N_Identifier and then Present (Entity (Entity (N))) -- The entity of the copied node is the formal parameter and then Entity (Entity (N)) = Formal then Use_Counter := Use_Counter + 1; if Use_Counter > 1 then -- Denote more than one use and abandon the traversal Use_Counter := 2; return Abandon; end if; end if; return OK; end Count_Uses; procedure Count_Formal_Uses is new Traverse_Proc (Count_Uses); -- Start of processing for Formal_Is_Used_Once begin Count_Formal_Uses (Orig_Bod); return Use_Counter = 1; end Formal_Is_Used_Once; -- Start of processing for Expand_Inlined_Call begin -- Check for special case of To_Address call, and if so, just do an -- unchecked conversion instead of expanding the call. Not only is this -- more efficient, but it also avoids problem with order of elaboration -- when address clauses are inlined (address expression elaborated at -- wrong point). if Subp = RTE (RE_To_Address) then Rewrite (N, Unchecked_Convert_To (RTE (RE_Address), Relocate_Node (First_Actual (N)))); return; end if; -- Check for an illegal attempt to inline a recursive procedure. If the -- subprogram has parameters this is detected when trying to supply a -- binding for parameters that already have one. For parameterless -- subprograms this must be done explicitly. if In_Open_Scopes (Subp) then Error_Msg_N ("call to recursive subprogram cannot be inlined?", N); Set_Is_Inlined (Subp, False); return; end if; if Nkind (Orig_Bod) = N_Defining_Identifier or else Nkind (Orig_Bod) = N_Defining_Operator_Symbol then -- Subprogram is a renaming_as_body. Calls appearing after the -- renaming can be replaced with calls to the renamed entity -- directly, because the subprograms are subtype conformant. If -- the renamed subprogram is an inherited operation, we must redo -- the expansion because implicit conversions may be needed. Set_Name (N, New_Occurrence_Of (Orig_Bod, Loc)); if Present (Alias (Orig_Bod)) then Expand_Call (N); end if; return; end if; -- Use generic machinery to copy body of inlined subprogram, as if it -- were an instantiation, resetting source locations appropriately, so -- that nested inlined calls appear in the main unit. Save_Env (Subp, Empty); Set_Copied_Sloc_For_Inlined_Body (N, Defining_Entity (Orig_Bod)); Bod := Copy_Generic_Node (Orig_Bod, Empty, Instantiating => True); Blk := Make_Block_Statement (Loc, Declarations => Declarations (Bod), Handled_Statement_Sequence => Handled_Statement_Sequence (Bod)); if No (Declarations (Bod)) then Set_Declarations (Blk, New_List); end if; -- For the unconstrained case, capture the name of the local -- variable that holds the result. if Is_Unc then Find_Result; end if; -- If this is a derived function, establish the proper return type if Present (Orig_Subp) and then Orig_Subp /= Subp then Ret_Type := Etype (Orig_Subp); else Ret_Type := Etype (Subp); end if; -- Create temporaries for the actuals that are expressions, or that -- are scalars and require copying to preserve semantics. F := First_Formal (Subp); A := First_Actual (N); while Present (F) loop if Present (Renamed_Object (F)) then Error_Msg_N ("cannot inline call to recursive subprogram", N); return; end if; -- If the argument may be a controlling argument in a call within -- the inlined body, we must preserve its classwide nature to insure -- that dynamic dispatching take place subsequently. If the formal -- has a constraint it must be preserved to retain the semantics of -- the body. if Is_Class_Wide_Type (Etype (F)) or else (Is_Access_Type (Etype (F)) and then Is_Class_Wide_Type (Designated_Type (Etype (F)))) then Temp_Typ := Etype (F); elsif Base_Type (Etype (F)) = Base_Type (Etype (A)) and then Etype (F) /= Base_Type (Etype (F)) then Temp_Typ := Etype (F); else Temp_Typ := Etype (A); end if; -- If the actual is a simple name or a literal, no need to -- create a temporary, object can be used directly. if (Is_Entity_Name (A) and then (not Is_Scalar_Type (Etype (A)) or else Ekind (Entity (A)) = E_Enumeration_Literal)) -- When the actual is an identifier and the corresponding formal -- is used only once in the original body, the formal can be -- substituted directly with the actual parameter. or else (Nkind (A) = N_Identifier and then Formal_Is_Used_Once (F)) or else Nkind (A) = N_Real_Literal or else Nkind (A) = N_Integer_Literal or else Nkind (A) = N_Character_Literal then if Etype (F) /= Etype (A) then Set_Renamed_Object (F, Unchecked_Convert_To (Etype (F), Relocate_Node (A))); else Set_Renamed_Object (F, A); end if; else Temp := Make_Defining_Identifier (Loc, Chars => New_Internal_Name ('C')); -- If the actual for an in/in-out parameter is a view conversion, -- make it into an unchecked conversion, given that an untagged -- type conversion is not a proper object for a renaming. -- In-out conversions that involve real conversions have already -- been transformed in Expand_Actuals. if Nkind (A) = N_Type_Conversion and then Ekind (F) /= E_In_Parameter then New_A := Make_Unchecked_Type_Conversion (Loc, Subtype_Mark => New_Occurrence_Of (Etype (F), Loc), Expression => Relocate_Node (Expression (A))); elsif Etype (F) /= Etype (A) then New_A := Unchecked_Convert_To (Etype (F), Relocate_Node (A)); Temp_Typ := Etype (F); else New_A := Relocate_Node (A); end if; Set_Sloc (New_A, Sloc (N)); if Ekind (F) = E_In_Parameter and then not Is_Limited_Type (Etype (A)) then Decl := Make_Object_Declaration (Loc, Defining_Identifier => Temp, Constant_Present => True, Object_Definition => New_Occurrence_Of (Temp_Typ, Loc), Expression => New_A); else Decl := Make_Object_Renaming_Declaration (Loc, Defining_Identifier => Temp, Subtype_Mark => New_Occurrence_Of (Temp_Typ, Loc), Name => New_A); end if; Append (Decl, Decls); Set_Renamed_Object (F, Temp); end if; Next_Formal (F); Next_Actual (A); end loop; -- Establish target of function call. If context is not assignment or -- declaration, create a temporary as a target. The declaration for -- the temporary may be subsequently optimized away if the body is a -- single expression, or if the left-hand side of the assignment is -- simple enough, i.e. an entity or an explicit dereference of one. if Ekind (Subp) = E_Function then if Nkind (Parent (N)) = N_Assignment_Statement and then Is_Entity_Name (Name (Parent (N))) then Targ := Name (Parent (N)); elsif Nkind (Parent (N)) = N_Assignment_Statement and then Nkind (Name (Parent (N))) = N_Explicit_Dereference and then Is_Entity_Name (Prefix (Name (Parent (N)))) then Targ := Name (Parent (N)); else -- Replace call with temporary and create its declaration Temp := Make_Defining_Identifier (Loc, New_Internal_Name ('C')); Set_Is_Internal (Temp); -- For the unconstrained case. the generated temporary has the -- same constrained declaration as the result variable. -- It may eventually be possible to remove that temporary and -- use the result variable directly. if Is_Unc then Decl := Make_Object_Declaration (Loc, Defining_Identifier => Temp, Object_Definition => New_Copy_Tree (Object_Definition (Parent (Targ1)))); Replace_Formals (Decl); else Decl := Make_Object_Declaration (Loc, Defining_Identifier => Temp, Object_Definition => New_Occurrence_Of (Ret_Type, Loc)); Set_Etype (Temp, Ret_Type); end if; Set_No_Initialization (Decl); Append (Decl, Decls); Rewrite (N, New_Occurrence_Of (Temp, Loc)); Targ := Temp; end if; end if; Insert_Actions (N, Decls); -- Traverse the tree and replace formals with actuals or their thunks. -- Attach block to tree before analysis and rewriting. Replace_Formals (Blk); Set_Parent (Blk, N); if not Comes_From_Source (Subp) or else Is_Predef then Reset_Slocs (Blk); end if; if Present (Exit_Lab) then -- If the body was a single expression, the single return statement -- and the corresponding label are useless. if Num_Ret = 1 and then Nkind (Last (Statements (Handled_Statement_Sequence (Blk)))) = N_Goto_Statement then Remove (Last (Statements (Handled_Statement_Sequence (Blk)))); else Append (Lab_Decl, (Declarations (Blk))); Append (Exit_Lab, Statements (Handled_Statement_Sequence (Blk))); end if; end if; -- Analyze Blk with In_Inlined_Body set, to avoid spurious errors on -- conflicting private views that Gigi would ignore. If this is -- predefined unit, analyze with checks off, as is done in the non- -- inlined run-time units. declare I_Flag : constant Boolean := In_Inlined_Body; begin In_Inlined_Body := True; if Is_Predef then declare Style : constant Boolean := Style_Check; begin Style_Check := False; Analyze (Blk, Suppress => All_Checks); Style_Check := Style; end; else Analyze (Blk); end if; In_Inlined_Body := I_Flag; end; if Ekind (Subp) = E_Procedure then Rewrite_Procedure_Call (N, Blk); else Rewrite_Function_Call (N, Blk); -- For the unconstrained case, the replacement of the call has been -- made prior to the complete analysis of the generated declarations. -- Propagate the proper type now. if Is_Unc then if Nkind (N) = N_Identifier then Set_Etype (N, Etype (Entity (N))); else Set_Etype (N, Etype (Targ1)); end if; end if; end if; Restore_Env; -- Cleanup mapping between formals and actuals for other expansions F := First_Formal (Subp); while Present (F) loop Set_Renamed_Object (F, Empty); Next_Formal (F); end loop; end Expand_Inlined_Call; ---------------------------- -- Expand_N_Function_Call -- ---------------------------- procedure Expand_N_Function_Call (N : Node_Id) is Typ : constant Entity_Id := Etype (N); function Returned_By_Reference return Boolean; -- If the return type is returned through the secondary stack. that is -- by reference, we don't want to create a temp to force stack checking. -- Shouldn't this function be moved to exp_util??? function Rhs_Of_Assign_Or_Decl (N : Node_Id) return Boolean; -- If the call is the right side of an assignment or the expression in -- an object declaration, we don't need to create a temp as the left -- side will already trigger stack checking if necessary. -- -- If the call is a component in an extension aggregate, it will be -- expanded into assignments as well, so no temporary is needed. This -- also solves the problem of functions returning types with unknown -- discriminants, where it is not possible to declare an object of the -- type altogether. --------------------------- -- Returned_By_Reference -- --------------------------- function Returned_By_Reference return Boolean is S : Entity_Id; begin if Is_Return_By_Reference_Type (Typ) then return True; elsif Nkind (Parent (N)) /= N_Return_Statement then return False; elsif Requires_Transient_Scope (Typ) then -- Verify that the return type of the enclosing function has the -- same constrained status as that of the expression. S := Current_Scope; while Ekind (S) /= E_Function loop S := Scope (S); end loop; return Is_Constrained (Typ) = Is_Constrained (Etype (S)); else return False; end if; end Returned_By_Reference; --------------------------- -- Rhs_Of_Assign_Or_Decl -- --------------------------- function Rhs_Of_Assign_Or_Decl (N : Node_Id) return Boolean is begin if (Nkind (Parent (N)) = N_Assignment_Statement and then Expression (Parent (N)) = N) or else (Nkind (Parent (N)) = N_Qualified_Expression and then Nkind (Parent (Parent (N))) = N_Assignment_Statement and then Expression (Parent (Parent (N))) = Parent (N)) or else (Nkind (Parent (N)) = N_Object_Declaration and then Expression (Parent (N)) = N) or else (Nkind (Parent (N)) = N_Component_Association and then Expression (Parent (N)) = N and then Nkind (Parent (Parent (N))) = N_Aggregate and then Rhs_Of_Assign_Or_Decl (Parent (Parent (N)))) or else (Nkind (Parent (N)) = N_Extension_Aggregate and then Is_Private_Type (Etype (Typ))) then return True; else return False; end if; end Rhs_Of_Assign_Or_Decl; -- Start of processing for Expand_N_Function_Call begin -- A special check. If stack checking is enabled, and the return type -- might generate a large temporary, and the call is not the right side -- of an assignment, then generate an explicit temporary. We do this -- because otherwise gigi may generate a large temporary on the fly and -- this can cause trouble with stack checking. -- This is unecessary if the call is the expression in an object -- declaration, or if it appears outside of any library unit. This can -- only happen if it appears as an actual in a library-level instance, -- in which case a temporary will be generated for it once the instance -- itself is installed. if May_Generate_Large_Temp (Typ) and then not Rhs_Of_Assign_Or_Decl (N) and then not Returned_By_Reference and then Current_Scope /= Standard_Standard then if Stack_Checking_Enabled then -- Note: it might be thought that it would be OK to use a call to -- Force_Evaluation here, but that's not good enough, because -- that can results in a 'Reference construct that may still need -- a temporary. declare Loc : constant Source_Ptr := Sloc (N); Temp_Obj : constant Entity_Id := Make_Defining_Identifier (Loc, Chars => New_Internal_Name ('F')); Temp_Typ : Entity_Id := Typ; Decl : Node_Id; A : Node_Id; F : Entity_Id; Proc : Entity_Id; begin if Is_Tagged_Type (Typ) and then Present (Controlling_Argument (N)) then if Nkind (Parent (N)) /= N_Procedure_Call_Statement and then Nkind (Parent (N)) /= N_Function_Call then -- If this is a tag-indeterminate call, the object must -- be classwide. if Is_Tag_Indeterminate (N) then Temp_Typ := Class_Wide_Type (Typ); end if; else -- If this is a dispatching call that is itself the -- controlling argument of an enclosing call, the -- nominal subtype of the object that replaces it must -- be classwide, so that dispatching will take place -- properly. If it is not a controlling argument, the -- object is not classwide. Proc := Entity (Name (Parent (N))); F := First_Formal (Proc); A := First_Actual (Parent (N)); while A /= N loop Next_Formal (F); Next_Actual (A); end loop; if Is_Controlling_Formal (F) then Temp_Typ := Class_Wide_Type (Typ); end if; end if; end if; Decl := Make_Object_Declaration (Loc, Defining_Identifier => Temp_Obj, Object_Definition => New_Occurrence_Of (Temp_Typ, Loc), Constant_Present => True, Expression => Relocate_Node (N)); Set_Assignment_OK (Decl); Insert_Actions (N, New_List (Decl)); Rewrite (N, New_Occurrence_Of (Temp_Obj, Loc)); end; else -- If stack-checking is not enabled, increment serial number -- for internal names, so that subsequent symbols are consistent -- with and without stack-checking. Synchronize_Serial_Number; -- Now we can expand the call with consistent symbol names Expand_Call (N); end if; -- Normal case, expand the call else Expand_Call (N); end if; end Expand_N_Function_Call; --------------------------------------- -- Expand_N_Procedure_Call_Statement -- --------------------------------------- procedure Expand_N_Procedure_Call_Statement (N : Node_Id) is begin Expand_Call (N); end Expand_N_Procedure_Call_Statement; ------------------------------ -- Expand_N_Subprogram_Body -- ------------------------------ -- Add poll call if ATC polling is enabled, unless the body will be -- inlined by the back-end. -- Add return statement if last statement in body is not a return statement -- (this makes things easier on Gigi which does not want to have to handle -- a missing return). -- Add call to Activate_Tasks if body is a task activator -- Deal with possible detection of infinite recursion -- Eliminate body completely if convention stubbed -- Encode entity names within body, since we will not need to reference -- these entities any longer in the front end. -- Initialize scalar out parameters if Initialize/Normalize_Scalars -- Reset Pure indication if any parameter has root type System.Address -- Wrap thread body procedure Expand_N_Subprogram_Body (N : Node_Id) is Loc : constant Source_Ptr := Sloc (N); H : constant Node_Id := Handled_Statement_Sequence (N); Body_Id : Entity_Id; Spec_Id : Entity_Id; Except_H : Node_Id; Scop : Entity_Id; Dec : Node_Id; Next_Op : Node_Id; L : List_Id; procedure Add_Return (S : List_Id); -- Append a return statement to the statement sequence S if the last -- statement is not already a return or a goto statement. Note that -- the latter test is not critical, it does not matter if we add a -- few extra returns, since they get eliminated anyway later on. procedure Expand_Thread_Body; -- Perform required expansion of a thread body ---------------- -- Add_Return -- ---------------- procedure Add_Return (S : List_Id) is begin if not Is_Transfer (Last (S)) then -- The source location for the return is the end label -- of the procedure in all cases. This is a bit odd when -- there are exception handlers, but not much else we can do. Append_To (S, Make_Return_Statement (Sloc (End_Label (H)))); end if; end Add_Return; ------------------------ -- Expand_Thread_Body -- ------------------------ -- The required expansion of a thread body is as follows -- procedure <thread body procedure name> is -- _Secondary_Stack : aliased -- Storage_Elements.Storage_Array -- (1 .. Storage_Offset (Sec_Stack_Size)); -- for _Secondary_Stack'Alignment use Standard'Maximum_Alignment; -- _Process_ATSD : aliased System.Threads.ATSD; -- begin -- System.Threads.Thread_Body_Enter; -- (_Secondary_Stack'Address, -- _Secondary_Stack'Length, -- _Process_ATSD'Address); -- declare -- <user declarations> -- begin -- <user statements> -- <user exception handlers> -- end; -- System.Threads.Thread_Body_Leave; -- exception -- when E : others => -- System.Threads.Thread_Body_Exceptional_Exit (E); -- end; -- Note the exception handler is omitted if pragma Restriction -- No_Exception_Handlers is currently active. procedure Expand_Thread_Body is User_Decls : constant List_Id := Declarations (N); Sec_Stack_Len : Node_Id; TB_Pragma : constant Node_Id := Get_Rep_Pragma (Spec_Id, Name_Thread_Body); Ent_SS : Entity_Id; Ent_ATSD : Entity_Id; Ent_EO : Entity_Id; Decl_SS : Node_Id; Decl_ATSD : Node_Id; Excep_Handlers : List_Id; begin New_Scope (Spec_Id); -- Get proper setting for secondary stack size if List_Length (Pragma_Argument_Associations (TB_Pragma)) = 2 then Sec_Stack_Len := Expression (Last (Pragma_Argument_Associations (TB_Pragma))); else Sec_Stack_Len := New_Occurrence_Of (RTE (RE_Default_Secondary_Stack_Size), Loc); end if; Sec_Stack_Len := Convert_To (RTE (RE_Storage_Offset), Sec_Stack_Len); -- Build and set declarations for the wrapped thread body Ent_SS := Make_Defining_Identifier (Loc, Name_uSecondary_Stack); Ent_ATSD := Make_Defining_Identifier (Loc, Name_uProcess_ATSD); Decl_SS := Make_Object_Declaration (Loc, Defining_Identifier => Ent_SS, Aliased_Present => True, Object_Definition => Make_Subtype_Indication (Loc, Subtype_Mark => New_Occurrence_Of (RTE (RE_Storage_Array), Loc), Constraint => Make_Index_Or_Discriminant_Constraint (Loc, Constraints => New_List ( Make_Range (Loc, Low_Bound => Make_Integer_Literal (Loc, 1), High_Bound => Sec_Stack_Len))))); Decl_ATSD := Make_Object_Declaration (Loc, Defining_Identifier => Ent_ATSD, Aliased_Present => True, Object_Definition => New_Occurrence_Of (RTE (RE_ATSD), Loc)); Set_Declarations (N, New_List (Decl_SS, Decl_ATSD)); Analyze (Decl_SS); Analyze (Decl_ATSD); Set_Alignment (Ent_SS, UI_From_Int (Maximum_Alignment)); -- Create new exception handler if Restriction_Active (No_Exception_Handlers) then Excep_Handlers := No_List; else Check_Restriction (No_Exception_Handlers, N); Ent_EO := Make_Defining_Identifier (Loc, Name_uE); Excep_Handlers := New_List ( Make_Exception_Handler (Loc, Choice_Parameter => Ent_EO, Exception_Choices => New_List ( Make_Others_Choice (Loc)), Statements => New_List ( Make_Procedure_Call_Statement (Loc, Name => New_Occurrence_Of (RTE (RE_Thread_Body_Exceptional_Exit), Loc), Parameter_Associations => New_List ( New_Occurrence_Of (Ent_EO, Loc)))))); end if; -- Now build new handled statement sequence and analyze it Set_Handled_Statement_Sequence (N, Make_Handled_Sequence_Of_Statements (Loc, Statements => New_List ( Make_Procedure_Call_Statement (Loc, Name => New_Occurrence_Of (RTE (RE_Thread_Body_Enter), Loc), Parameter_Associations => New_List ( Make_Attribute_Reference (Loc, Prefix => New_Occurrence_Of (Ent_SS, Loc), Attribute_Name => Name_Address), Make_Attribute_Reference (Loc, Prefix => New_Occurrence_Of (Ent_SS, Loc), Attribute_Name => Name_Length), Make_Attribute_Reference (Loc, Prefix => New_Occurrence_Of (Ent_ATSD, Loc), Attribute_Name => Name_Address))), Make_Block_Statement (Loc, Declarations => User_Decls, Handled_Statement_Sequence => H), Make_Procedure_Call_Statement (Loc, Name => New_Occurrence_Of (RTE (RE_Thread_Body_Leave), Loc))), Exception_Handlers => Excep_Handlers)); Analyze (Handled_Statement_Sequence (N)); End_Scope; end Expand_Thread_Body; -- Start of processing for Expand_N_Subprogram_Body begin -- Set L to either the list of declarations if present, or -- to the list of statements if no declarations are present. -- This is used to insert new stuff at the start. if Is_Non_Empty_List (Declarations (N)) then L := Declarations (N); else L := Statements (Handled_Statement_Sequence (N)); end if; -- Find entity for subprogram Body_Id := Defining_Entity (N); if Present (Corresponding_Spec (N)) then Spec_Id := Corresponding_Spec (N); else Spec_Id := Body_Id; end if; -- Need poll on entry to subprogram if polling enabled. We only -- do this for non-empty subprograms, since it does not seem -- necessary to poll for a dummy null subprogram. Do not add polling -- point if calls to this subprogram will be inlined by the back-end, -- to avoid repeated polling points in nested inlinings. if Is_Non_Empty_List (L) then if Is_Inlined (Spec_Id) and then Front_End_Inlining and then Optimization_Level > 1 then null; else Generate_Poll_Call (First (L)); end if; end if; -- If this is a Pure function which has any parameters whose root -- type is System.Address, reset the Pure indication, since it will -- likely cause incorrect code to be generated as the parameter is -- probably a pointer, and the fact that the same pointer is passed -- does not mean that the same value is being referenced. -- Note that if the programmer gave an explicit Pure_Function pragma, -- then we believe the programmer, and leave the subprogram Pure. -- This code should probably be at the freeze point, so that it -- happens even on a -gnatc (or more importantly -gnatt) compile -- so that the semantic tree has Is_Pure set properly ??? if Is_Pure (Spec_Id) and then Is_Subprogram (Spec_Id) and then not Has_Pragma_Pure_Function (Spec_Id) then declare F : Entity_Id; begin F := First_Formal (Spec_Id); while Present (F) loop if Is_Descendent_Of_Address (Etype (F)) then Set_Is_Pure (Spec_Id, False); if Spec_Id /= Body_Id then Set_Is_Pure (Body_Id, False); end if; exit; end if; Next_Formal (F); end loop; end; end if; -- Initialize any scalar OUT args if Initialize/Normalize_Scalars if Init_Or_Norm_Scalars and then Is_Subprogram (Spec_Id) then declare F : Entity_Id; V : constant Boolean := Validity_Checks_On; begin -- We turn off validity checking, since we do not want any -- check on the initializing value itself (which we know -- may well be invalid!) Validity_Checks_On := False; -- Loop through formals F := First_Formal (Spec_Id); while Present (F) loop if Is_Scalar_Type (Etype (F)) and then Ekind (F) = E_Out_Parameter then Insert_Before_And_Analyze (First (L), Make_Assignment_Statement (Loc, Name => New_Occurrence_Of (F, Loc), Expression => Get_Simple_Init_Val (Etype (F), Loc))); end if; Next_Formal (F); end loop; Validity_Checks_On := V; end; end if; Scop := Scope (Spec_Id); -- Add discriminal renamings to protected subprograms. Install new -- discriminals for expansion of the next subprogram of this protected -- type, if any. if Is_List_Member (N) and then Present (Parent (List_Containing (N))) and then Nkind (Parent (List_Containing (N))) = N_Protected_Body then Add_Discriminal_Declarations (Declarations (N), Scop, Name_uObject, Loc); Add_Private_Declarations (Declarations (N), Scop, Name_uObject, Loc); -- Associate privals and discriminals with the next protected -- operation body to be expanded. These are used to expand references -- to private data objects and discriminants, respectively. Next_Op := Next_Protected_Operation (N); if Present (Next_Op) then Dec := Parent (Base_Type (Scop)); Set_Privals (Dec, Next_Op, Loc); Set_Discriminals (Dec); end if; end if; -- Clear out statement list for stubbed procedure if Present (Corresponding_Spec (N)) then Set_Elaboration_Flag (N, Spec_Id); if Convention (Spec_Id) = Convention_Stubbed or else Is_Eliminated (Spec_Id) then Set_Declarations (N, Empty_List); Set_Handled_Statement_Sequence (N, Make_Handled_Sequence_Of_Statements (Loc, Statements => New_List ( Make_Null_Statement (Loc)))); return; end if; end if; -- Returns_By_Ref flag is normally set when the subprogram is frozen -- but subprograms with no specs are not frozen. declare Typ : constant Entity_Id := Etype (Spec_Id); Utyp : constant Entity_Id := Underlying_Type (Typ); begin if not Acts_As_Spec (N) and then Nkind (Parent (Parent (Spec_Id))) /= N_Subprogram_Body_Stub then null; elsif Is_Return_By_Reference_Type (Typ) then Set_Returns_By_Ref (Spec_Id); elsif Present (Utyp) and then Controlled_Type (Utyp) then Set_Returns_By_Ref (Spec_Id); end if; end; -- For a procedure, we add a return for all possible syntactic ends -- of the subprogram. Note that reanalysis is not necessary in this -- case since it would require a lot of work and accomplish nothing. if Ekind (Spec_Id) = E_Procedure or else Ekind (Spec_Id) = E_Generic_Procedure then Add_Return (Statements (H)); if Present (Exception_Handlers (H)) then Except_H := First_Non_Pragma (Exception_Handlers (H)); while Present (Except_H) loop Add_Return (Statements (Except_H)); Next_Non_Pragma (Except_H); end loop; end if; -- For a function, we must deal with the case where there is at least -- one missing return. What we do is to wrap the entire body of the -- function in a block: -- begin -- ... -- end; -- becomes -- begin -- begin -- ... -- end; -- raise Program_Error; -- end; -- This approach is necessary because the raise must be signalled -- to the caller, not handled by any local handler (RM 6.4(11)). -- Note: we do not need to analyze the constructed sequence here, -- since it has no handler, and an attempt to analyze the handled -- statement sequence twice is risky in various ways (e.g. the -- issue of expanding cleanup actions twice). elsif Has_Missing_Return (Spec_Id) then declare Hloc : constant Source_Ptr := Sloc (H); Blok : constant Node_Id := Make_Block_Statement (Hloc, Handled_Statement_Sequence => H); Rais : constant Node_Id := Make_Raise_Program_Error (Hloc, Reason => PE_Missing_Return); begin Set_Handled_Statement_Sequence (N, Make_Handled_Sequence_Of_Statements (Hloc, Statements => New_List (Blok, Rais))); New_Scope (Spec_Id); Analyze (Blok); Analyze (Rais); Pop_Scope; end; end if; -- If subprogram contains a parameterless recursive call, then we may -- have an infinite recursion, so see if we can generate code to check -- for this possibility if storage checks are not suppressed. if Ekind (Spec_Id) = E_Procedure and then Has_Recursive_Call (Spec_Id) and then not Storage_Checks_Suppressed (Spec_Id) then Detect_Infinite_Recursion (N, Spec_Id); end if; -- Finally, if we are in Normalize_Scalars mode, then any scalar out -- parameters must be initialized to the appropriate default value. if Ekind (Spec_Id) = E_Procedure and then Normalize_Scalars then declare Floc : Source_Ptr; Formal : Entity_Id; Stm : Node_Id; begin Formal := First_Formal (Spec_Id); while Present (Formal) loop Floc := Sloc (Formal); if Ekind (Formal) = E_Out_Parameter and then Is_Scalar_Type (Etype (Formal)) then Stm := Make_Assignment_Statement (Floc, Name => New_Occurrence_Of (Formal, Floc), Expression => Get_Simple_Init_Val (Etype (Formal), Floc)); Prepend (Stm, Declarations (N)); Analyze (Stm); end if; Next_Formal (Formal); end loop; end; end if; -- Deal with thread body if Is_Thread_Body (Spec_Id) then Expand_Thread_Body; end if; -- Set to encode entity names in package body before gigi is called Qualify_Entity_Names (N); end Expand_N_Subprogram_Body; ----------------------------------- -- Expand_N_Subprogram_Body_Stub -- ----------------------------------- procedure Expand_N_Subprogram_Body_Stub (N : Node_Id) is begin if Present (Corresponding_Body (N)) then Expand_N_Subprogram_Body ( Unit_Declaration_Node (Corresponding_Body (N))); end if; end Expand_N_Subprogram_Body_Stub; ------------------------------------- -- Expand_N_Subprogram_Declaration -- ------------------------------------- -- If the declaration appears within a protected body, it is a private -- operation of the protected type. We must create the corresponding -- protected subprogram an associated formals. For a normal protected -- operation, this is done when expanding the protected type declaration. -- If the declaration is for a null procedure, emit null body procedure Expand_N_Subprogram_Declaration (N : Node_Id) is Loc : constant Source_Ptr := Sloc (N); Subp : constant Entity_Id := Defining_Entity (N); Scop : constant Entity_Id := Scope (Subp); Prot_Decl : Node_Id; Prot_Bod : Node_Id; Prot_Id : Entity_Id; begin -- Deal with case of protected subprogram. Do not generate protected -- operation if operation is flagged as eliminated. if Is_List_Member (N) and then Present (Parent (List_Containing (N))) and then Nkind (Parent (List_Containing (N))) = N_Protected_Body and then Is_Protected_Type (Scop) then if No (Protected_Body_Subprogram (Subp)) and then not Is_Eliminated (Subp) then Prot_Decl := Make_Subprogram_Declaration (Loc, Specification => Build_Protected_Sub_Specification (N, Scop, Unprotected_Mode)); -- The protected subprogram is declared outside of the protected -- body. Given that the body has frozen all entities so far, we -- analyze the subprogram and perform freezing actions explicitly. -- If the body is a subunit, the insertion point is before the -- stub in the parent. Prot_Bod := Parent (List_Containing (N)); if Nkind (Parent (Prot_Bod)) = N_Subunit then Prot_Bod := Corresponding_Stub (Parent (Prot_Bod)); end if; Insert_Before (Prot_Bod, Prot_Decl); Prot_Id := Defining_Unit_Name (Specification (Prot_Decl)); New_Scope (Scope (Scop)); Analyze (Prot_Decl); Create_Extra_Formals (Prot_Id); Set_Protected_Body_Subprogram (Subp, Prot_Id); Pop_Scope; end if; elsif Nkind (Specification (N)) = N_Procedure_Specification and then Null_Present (Specification (N)) then declare Bod : constant Node_Id := Make_Subprogram_Body (Loc, Specification => New_Copy_Tree (Specification (N)), Declarations => New_List, Handled_Statement_Sequence => Make_Handled_Sequence_Of_Statements (Loc, Statements => New_List (Make_Null_Statement (Loc)))); begin Set_Body_To_Inline (N, Bod); Insert_After (N, Bod); Analyze (Bod); -- Corresponding_Spec isn't being set by Analyze_Subprogram_Body, -- evidently because Set_Has_Completion is called earlier for null -- procedures in Analyze_Subprogram_Declaration, so we force its -- setting here. If the setting of Has_Completion is not set -- earlier, then it can result in missing body errors if other -- errors were already reported (since expansion is turned off). -- Should creation of the empty body be moved to the analyzer??? Set_Corresponding_Spec (Bod, Defining_Entity (Specification (N))); end; end if; end Expand_N_Subprogram_Declaration; --------------------------------------- -- Expand_Protected_Object_Reference -- --------------------------------------- function Expand_Protected_Object_Reference (N : Node_Id; Scop : Entity_Id) return Node_Id is Loc : constant Source_Ptr := Sloc (N); Corr : Entity_Id; Rec : Node_Id; Param : Entity_Id; Proc : Entity_Id; begin Rec := Make_Identifier (Loc, Name_uObject); Set_Etype (Rec, Corresponding_Record_Type (Scop)); -- Find enclosing protected operation, and retrieve its first parameter, -- which denotes the enclosing protected object. If the enclosing -- operation is an entry, we are immediately within the protected body, -- and we can retrieve the object from the service entries procedure. A -- barrier function has has the same signature as an entry. A barrier -- function is compiled within the protected object, but unlike -- protected operations its never needs locks, so that its protected -- body subprogram points to itself. Proc := Current_Scope; while Present (Proc) and then Scope (Proc) /= Scop loop Proc := Scope (Proc); end loop; Corr := Protected_Body_Subprogram (Proc); if No (Corr) then -- Previous error left expansion incomplete. -- Nothing to do on this call. return Empty; end if; Param := Defining_Identifier (First (Parameter_Specifications (Parent (Corr)))); if Is_Subprogram (Proc) and then Proc /= Corr then -- Protected function or procedure Set_Entity (Rec, Param); -- Rec is a reference to an entity which will not be in scope when -- the call is reanalyzed, and needs no further analysis. Set_Analyzed (Rec); else -- Entry or barrier function for entry body. The first parameter of -- the entry body procedure is pointer to the object. We create a -- local variable of the proper type, duplicating what is done to -- define _object later on. declare Decls : List_Id; Obj_Ptr : constant Entity_Id := Make_Defining_Identifier (Loc, Chars => New_Internal_Name ('T')); begin Decls := New_List ( Make_Full_Type_Declaration (Loc, Defining_Identifier => Obj_Ptr, Type_Definition => Make_Access_To_Object_Definition (Loc, Subtype_Indication => New_Reference_To (Corresponding_Record_Type (Scop), Loc)))); Insert_Actions (N, Decls); Insert_Actions (N, Freeze_Entity (Obj_Ptr, Sloc (N))); Rec := Make_Explicit_Dereference (Loc, Unchecked_Convert_To (Obj_Ptr, New_Occurrence_Of (Param, Loc))); -- Analyze new actual. Other actuals in calls are already analyzed -- and the list of actuals is not renalyzed after rewriting. Set_Parent (Rec, N); Analyze (Rec); end; end if; return Rec; end Expand_Protected_Object_Reference; -------------------------------------- -- Expand_Protected_Subprogram_Call -- -------------------------------------- procedure Expand_Protected_Subprogram_Call (N : Node_Id; Subp : Entity_Id; Scop : Entity_Id) is Rec : Node_Id; begin -- If the protected object is not an enclosing scope, this is -- an inter-object function call. Inter-object procedure -- calls are expanded by Exp_Ch9.Build_Simple_Entry_Call. -- The call is intra-object only if the subprogram being -- called is in the protected body being compiled, and if the -- protected object in the call is statically the enclosing type. -- The object may be an component of some other data structure, -- in which case this must be handled as an inter-object call. if not In_Open_Scopes (Scop) or else not Is_Entity_Name (Name (N)) then if Nkind (Name (N)) = N_Selected_Component then Rec := Prefix (Name (N)); else pragma Assert (Nkind (Name (N)) = N_Indexed_Component); Rec := Prefix (Prefix (Name (N))); end if; Build_Protected_Subprogram_Call (N, Name => New_Occurrence_Of (Subp, Sloc (N)), Rec => Convert_Concurrent (Rec, Etype (Rec)), External => True); else Rec := Expand_Protected_Object_Reference (N, Scop); if No (Rec) then return; end if; Build_Protected_Subprogram_Call (N, Name => Name (N), Rec => Rec, External => False); end if; Analyze (N); -- If it is a function call it can appear in elaboration code and -- the called entity must be frozen here. if Ekind (Subp) = E_Function then Freeze_Expression (Name (N)); end if; end Expand_Protected_Subprogram_Call; ----------------------- -- Freeze_Subprogram -- ----------------------- procedure Freeze_Subprogram (N : Node_Id) is Loc : constant Source_Ptr := Sloc (N); E : constant Entity_Id := Entity (N); procedure Check_Overriding_Inherited_Interfaces (E : Entity_Id); -- (Ada 2005): Check if the primitive E covers some interface already -- implemented by some ancestor of the tagged-type associated with E. procedure Register_Interface_DT_Entry (Prim : Entity_Id; Ancestor_Iface_Prim : Entity_Id := Empty); -- (Ada 2005): Register an interface primitive in a secondary dispatch -- table. If Prim overrides an ancestor primitive of its associated -- tagged-type then Ancestor_Iface_Prim indicates the entity of that -- immediate ancestor associated with the interface. procedure Register_Predefined_DT_Entry (Prim : Entity_Id); -- (Ada 2005): Register a predefined primitive in all the secondary -- dispatch tables of its primitive type. ------------------------------------------- -- Check_Overriding_Inherited_Interfaces -- ------------------------------------------- procedure Check_Overriding_Inherited_Interfaces (E : Entity_Id) is Typ : Entity_Id; Elmt : Elmt_Id; Prim_Op : Entity_Id; Overriden_Op : Entity_Id := Empty; begin if Ada_Version < Ada_05 or else not Is_Overriding_Operation (E) or else Is_Predefined_Dispatching_Operation (E) or else Present (Alias (E)) then return; end if; -- Get the entity associated with this primitive operation Typ := Scope (DTC_Entity (E)); loop exit when Etype (Typ) = Typ or else (Present (Full_View (Etype (Typ))) and then Full_View (Etype (Typ)) = Typ); -- Climb to the immediate ancestor handling private types if Present (Full_View (Etype (Typ))) then Typ := Full_View (Etype (Typ)); else Typ := Etype (Typ); end if; if Present (Abstract_Interfaces (Typ)) then -- Look for the overriden subprogram in the primary dispatch -- table of the ancestor. Overriden_Op := Empty; Elmt := First_Elmt (Primitive_Operations (Typ)); while Present (Elmt) loop Prim_Op := Node (Elmt); if Chars (Prim_Op) = Chars (E) and then Type_Conformant (New_Id => Prim_Op, Old_Id => E, Skip_Controlling_Formals => True) and then DT_Position (Prim_Op) = DT_Position (E) and then Etype (DTC_Entity (Prim_Op)) = RTE (RE_Tag) and then No (Abstract_Interface_Alias (Prim_Op)) then if Overriden_Op = Empty then Overriden_Op := Prim_Op; -- Additional check to ensure that if two candidates have -- been found then they refer to the same subprogram. else declare A1 : Entity_Id; A2 : Entity_Id; begin A1 := Overriden_Op; while Present (Alias (A1)) loop A1 := Alias (A1); end loop; A2 := Prim_Op; while Present (Alias (A2)) loop A2 := Alias (A2); end loop; if A1 /= A2 then raise Program_Error; end if; end; end if; end if; Next_Elmt (Elmt); end loop; -- If not found this is the first overriding of some abstract -- interface. if Overriden_Op /= Empty then -- Find the entries associated with interfaces that are -- alias of this primitive operation in the ancestor. Elmt := First_Elmt (Primitive_Operations (Typ)); while Present (Elmt) loop Prim_Op := Node (Elmt); if Present (Abstract_Interface_Alias (Prim_Op)) and then Alias (Prim_Op) = Overriden_Op then Register_Interface_DT_Entry (E, Prim_Op); end if; Next_Elmt (Elmt); end loop; end if; end if; end loop; end Check_Overriding_Inherited_Interfaces; --------------------------------- -- Register_Interface_DT_Entry -- --------------------------------- procedure Register_Interface_DT_Entry (Prim : Entity_Id; Ancestor_Iface_Prim : Entity_Id := Empty) is E : Entity_Id; Prim_Typ : Entity_Id; Prim_Op : Entity_Id; Iface_Typ : Entity_Id; Iface_DT_Ptr : Entity_Id; Iface_Tag : Entity_Id; New_Thunk : Node_Id; Thunk_Id : Entity_Id; begin -- Nothing to do if the run-time does not give support to abstract -- interfaces. if not (RTE_Available (RE_Interface_Tag)) then return; end if; if No (Ancestor_Iface_Prim) then Prim_Typ := Scope (DTC_Entity (Alias (Prim))); -- Look for the abstract interface subprogram E := Abstract_Interface_Alias (Prim); while Present (E) and then Is_Abstract (E) and then not Is_Interface (Scope (DTC_Entity (E))) loop E := Alias (E); end loop; Iface_Typ := Scope (DTC_Entity (E)); -- Generate the code of the thunk only when this primitive -- operation is associated with a secondary dispatch table. if Is_Interface (Iface_Typ) then Iface_Tag := Find_Interface_Tag (T => Prim_Typ, Iface => Iface_Typ); if Etype (Iface_Tag) = RTE (RE_Interface_Tag) then Thunk_Id := Make_Defining_Identifier (Loc, Chars => New_Internal_Name ('T')); New_Thunk := Expand_Interface_Thunk (N => Prim, Thunk_Alias => Alias (Prim), Thunk_Id => Thunk_Id); Insert_After (N, New_Thunk); Iface_DT_Ptr := Find_Interface_ADT (T => Prim_Typ, Iface => Iface_Typ); Insert_After (New_Thunk, Fill_Secondary_DT_Entry (Sloc (Prim), Prim => Prim, Iface_DT_Ptr => Iface_DT_Ptr, Thunk_Id => Thunk_Id)); end if; end if; else Iface_Typ := Scope (DTC_Entity (Abstract_Interface_Alias (Ancestor_Iface_Prim))); Iface_Tag := Find_Interface_Tag (T => Scope (DTC_Entity (Alias (Ancestor_Iface_Prim))), Iface => Iface_Typ); -- Generate the thunk only if the associated tag is an interface -- tag. The case in which the associated tag is the primary tag -- occurs when a tagged type is a direct derivation of an -- interface. For example: -- type I is interface; -- ... -- type T is new I with ... if Etype (Iface_Tag) = RTE (RE_Interface_Tag) then Thunk_Id := Make_Defining_Identifier (Loc, Chars => New_Internal_Name ('T')); if Present (Alias (Prim)) then Prim_Op := Alias (Prim); else Prim_Op := Prim; end if; New_Thunk := Expand_Interface_Thunk (N => Ancestor_Iface_Prim, Thunk_Alias => Prim_Op, Thunk_Id => Thunk_Id); Insert_After (N, New_Thunk); Iface_DT_Ptr := Find_Interface_ADT (T => Scope (DTC_Entity (Prim_Op)), Iface => Iface_Typ); Insert_After (New_Thunk, Fill_Secondary_DT_Entry (Sloc (Prim), Prim => Ancestor_Iface_Prim, Iface_DT_Ptr => Iface_DT_Ptr, Thunk_Id => Thunk_Id)); end if; end if; end Register_Interface_DT_Entry; ---------------------------------- -- Register_Predefined_DT_Entry -- ---------------------------------- procedure Register_Predefined_DT_Entry (Prim : Entity_Id) is Iface_DT_Ptr : Elmt_Id; Iface_Tag : Entity_Id; Iface_Typ : Elmt_Id; New_Thunk : Entity_Id; Prim_Typ : Entity_Id; Thunk_Id : Entity_Id; begin Prim_Typ := Scope (DTC_Entity (Prim)); if No (Access_Disp_Table (Prim_Typ)) or else No (Abstract_Interfaces (Prim_Typ)) or else not RTE_Available (RE_Interface_Tag) then return; end if; -- Skip the first acces-to-dispatch-table pointer since it leads -- to the primary dispatch table. We are only concerned with the -- secondary dispatch table pointers. Note that the access-to- -- dispatch-table pointer corresponds to the first implemented -- interface retrieved below. Iface_DT_Ptr := Next_Elmt (First_Elmt (Access_Disp_Table (Prim_Typ))); Iface_Typ := First_Elmt (Abstract_Interfaces (Prim_Typ)); while Present (Iface_DT_Ptr) and then Present (Iface_Typ) loop Iface_Tag := Find_Interface_Tag (Prim_Typ, Node (Iface_Typ)); pragma Assert (Present (Iface_Tag)); if Etype (Iface_Tag) = RTE (RE_Interface_Tag) then Thunk_Id := Make_Defining_Identifier (Loc, New_Internal_Name ('T')); New_Thunk := Expand_Interface_Thunk (N => Prim, Thunk_Alias => Prim, Thunk_Id => Thunk_Id); Insert_After (N, New_Thunk); Insert_After (New_Thunk, Make_DT_Access_Action (Node (Iface_Typ), Action => Set_Predefined_Prim_Op_Address, Args => New_List ( Unchecked_Convert_To (RTE (RE_Tag), New_Reference_To (Node (Iface_DT_Ptr), Loc)), Make_Integer_Literal (Loc, DT_Position (Prim)), Make_Attribute_Reference (Loc, Prefix => New_Reference_To (Thunk_Id, Loc), Attribute_Name => Name_Address)))); end if; Next_Elmt (Iface_DT_Ptr); Next_Elmt (Iface_Typ); end loop; end Register_Predefined_DT_Entry; -- Start of processing for Freeze_Subprogram begin -- When a primitive is frozen, enter its name in the corresponding -- dispatch table. If the DTC_Entity field is not set this is an -- overridden primitive that can be ignored. We suppress the -- initialization of the dispatch table entry when Java_VM because -- the dispatching mechanism is handled internally by the JVM. if Is_Dispatching_Operation (E) and then not Is_Abstract (E) and then Present (DTC_Entity (E)) and then not Java_VM and then not Is_CPP_Class (Scope (DTC_Entity (E))) then Check_Overriding_Operation (E); -- Ada 95 case: Register the subprogram in the primary dispatch table if Ada_Version < Ada_05 then -- Do not register the subprogram in the dispatch table if we -- are compiling with the No_Dispatching_Calls restriction. if not Restriction_Active (No_Dispatching_Calls) then Insert_After (N, Fill_DT_Entry (Sloc (N), Prim => E)); end if; -- Ada 2005 case: Register the subprogram in the secondary dispatch -- tables associated with abstract interfaces. else declare Typ : constant Entity_Id := Scope (DTC_Entity (E)); begin -- There is no dispatch table associated with abstract -- interface types. Each type implementing interfaces will -- fill the associated secondary DT entries. if not Is_Interface (Typ) or else Present (Alias (E)) then -- Ada 2005 (AI-251): Check if this entry corresponds with -- a subprogram that covers an abstract interface type. if Present (Abstract_Interface_Alias (E)) then Register_Interface_DT_Entry (E); -- Common case: Primitive subprogram else -- Generate thunks for all the predefined operations if not Restriction_Active (No_Dispatching_Calls) then if Is_Predefined_Dispatching_Operation (E) then Register_Predefined_DT_Entry (E); end if; Insert_After (N, Fill_DT_Entry (Sloc (N), Prim => E)); end if; Check_Overriding_Inherited_Interfaces (E); end if; end if; end; end if; end if; -- Mark functions that return by reference. Note that it cannot be -- part of the normal semantic analysis of the spec since the -- underlying returned type may not be known yet (for private types). declare Typ : constant Entity_Id := Etype (E); Utyp : constant Entity_Id := Underlying_Type (Typ); begin if Is_Return_By_Reference_Type (Typ) then Set_Returns_By_Ref (E); elsif Present (Utyp) and then Controlled_Type (Utyp) then Set_Returns_By_Ref (E); end if; end; end Freeze_Subprogram; end Exp_Ch6;
src/Categories/Bicategory/Construction/1-Category.agda
MirceaS/agda-categories
0
6133
{-# OPTIONS --without-K --safe #-} open import Categories.Category -- Lifts a 1-Category into a bicategory module Categories.Bicategory.Construction.1-Category {o ℓ e} b (C : Category o ℓ e) where open import Level using (Lift; lift) open import Data.Unit using (⊤; tt) open import Data.Product using (uncurry) open import Relation.Binary using (Setoid) open import Categories.Bicategory open import Categories.Category.Construction.0-Groupoid using (0-Groupoid) open import Categories.Category.Instance.Cats using (Cats) open import Categories.Category.Monoidal using (Monoidal) open import Categories.Category.Monoidal.Instance.Cats using (module Product) open import Categories.Category.Groupoid using (Groupoid; IsGroupoid) open import Categories.Functor using (Functor; _∘F_) renaming (id to idF) open import Categories.Functor.Construction.Constant using (const) open import Categories.Functor.Bifunctor using (Bifunctor) private module C = Category C open C hiding (id) 1-Category : Bicategory ℓ e b o 1-Category = record { enriched = record { Obj = Obj ; hom = hom ; id = id ; ⊚ = ⊚ ; ⊚-assoc = ⊚-assoc ; unitˡ = unitˡ ; unitʳ = unitʳ } ; triangle = lift tt ; pentagon = lift tt } where open Monoidal (Product.Cats-Monoidal {ℓ} {e} {b}) open Category.Commutation (Cats ℓ e b) -- Since we are doing Setoid-enriched category theory, we don't -- lift homsets to discrete hom-categories, but hom-setoids to -- thin hom-groupoids. hom : C.Obj → C.Obj → Category ℓ e b hom A B = Groupoid.category (0-Groupoid b (hom-setoid {A} {B})) id : ∀ {A} → Functor unit (hom A A) id = const C.id ⊚ : ∀ {A B C} → Bifunctor (hom B C) (hom A B) (hom A C) ⊚ {A} {B} {C} = record { F₀ = uncurry _∘_ ; F₁ = uncurry ∘-resp-≈ ; identity = lift tt ; homomorphism = lift tt ; F-resp-≈ = λ _ → lift tt } ⊚-assoc : ∀ {A B C D} → [ (hom C D ⊗₀ hom B C) ⊗₀ hom A B ⇒ hom A D ]⟨ ⊚ ⊗₁ idF ⇒⟨ hom B D ⊗₀ hom A B ⟩ ⊚ ≈ associator.from ⇒⟨ hom C D ⊗₀ (hom B C ⊗₀ hom A B) ⟩ idF ⊗₁ ⊚ ⇒⟨ hom C D ⊗₀ hom A C ⟩ ⊚ ⟩ ⊚-assoc = record { F⇒G = record { η = λ _ → assoc ; commute = λ _ → lift tt } ; F⇐G = record { η = λ _ → sym-assoc ; commute = λ _ → lift tt } ; iso = λ _ → record { isoˡ = lift tt ; isoʳ = lift tt } } unitˡ : ∀ {A B} → [ unit ⊗₀ hom A B ⇒ hom A B ]⟨ id ⊗₁ idF ⇒⟨ hom B B ⊗₀ hom A B ⟩ ⊚ ≈ unitorˡ.from ⟩ unitˡ = record { F⇒G = record { η = λ _ → identityˡ ; commute = λ _ → lift tt } ; F⇐G = record { η = λ _ → Equiv.sym identityˡ ; commute = λ _ → lift tt } ; iso = λ _ → record { isoˡ = lift tt ; isoʳ = lift tt } } unitʳ : ∀ {A B} → [ hom A B ⊗₀ unit ⇒ hom A B ]⟨ idF ⊗₁ id ⇒⟨ hom A B ⊗₀ hom A A ⟩ ⊚ ≈ unitorʳ.from ⟩ unitʳ = record { F⇒G = record { η = λ _ → identityʳ ; commute = λ _ → lift tt } ; F⇐G = record { η = λ _ → Equiv.sym identityʳ ; commute = λ _ → lift tt } ; iso = λ _ → record { isoˡ = lift tt ; isoʳ = lift tt } } open Bicategory 1-Category -- The hom-categories are hom-groupoids hom-isGroupoid : ∀ {A B} → IsGroupoid (hom A B) hom-isGroupoid = Groupoid.isGroupoid (0-Groupoid b hom-setoid)
Scripts Pack Source Items/Scripts Pack/Finder/Xray Folders QuickLook (10.5 - 10.6.8).applescript
Phorofor/ScriptsPack.macOS
1
624
# Scripts Pack - Tweak various preference variables in macOS # <Phorofor, https://github.com/Phorofor/> # When Xray folders is used, using QuickLook in Finder will show a transparent folder icon with the icons of documents cycling. Does not work in OS X Lion (10.7)+ *) -- Xray Folders for QuickLook -- Versions compatible: Leopard (10.5) - Snow Leopard (10.6.*) -- Preference: com.apple.finder -- Preference Key: QLEnableXRayFolders -- Preference location: ~/Library/Preferences/com.apple.finder -- Default value (integer): 0 (* set MacVer to do shell script "sw_vers -productVersion" set Max to "10.6.8" as string set Min to "10.5.0" as string if MacVer > Max then display alert "Feature No Longer Supported for " & MacVer & "!" message "Sorry, your current version of macOS will have no effect with this script. It will only work with Leopard (10.5) up to Snow Leopard (10.6.*). This feature is no longer supported." buttons ["OK"] as warning cancel button 1 end if if MacVer < Min then display alert "Outdated macOS Version!" message "You're using macOS " & MacVer & " which means this script will only work properly with macOS " & Min & " up to " & Max & ". This feature is not available at this time." buttons ["OK", "Ignore"] as warning cancel button ["OK"] else *) set toggleBut to "Enable Xray" set tZ to "show" set sTz to "1" set bT to "You've decided to enable Xray folders" try set prValue to do shell script "defaults read com.apple.finder QLEnableXRayFolders" if prValue = "1" then set prValue to "Xray folders is enabled." set toggleBut to "Disable Xray" set tZ to "hide" set sTz to "0" set bT to "You've decided to disable Xray folders." else set prValue to "Xray folders is disabled." end if on error set prValue to "The current setting is unknown. QuickLook Xray Folders are disabled by default." end try display alert "Use Xray folders in QuickLook?" message "When Xray folders are shown, any folder viewed with QuickLook will show a transparent folder icon with the contents inside cycling." & return & return & prValue buttons {"Cancel", "Clear", toggleBut} default button 3 cancel button 1 if the button returned of the result is toggleBut then do shell script "defaults write com.apple.finder QLEnableXRayFolders " & sTz else do shell script "defaults delete com.apple.finder QLEnableXRayFolders" set bT to "You've decided to clear the preference." end if tell application "System Events" to (name of every process) if the result contains "Finder" then tell application "Finder" display alert "Restart needed for changes to take effect" message bT & " You'll need to restart the Finder in order to see your changes. Would you like to restart the Finder now?" buttons ["Don't Restart Finder", "Restart Finder"] cancel button 1 default button 2 end tell do shell script "killall Finder" else display alert "Finder - Your changes have been saved" message bT & " The next time you open Finder, you'll be able to see the changes you've made." buttons ["Cancel", "Open Finder"] cancel button 1 default button 2 tell application "Finder" to run end if # end if end
programs/oeis/268/A268741.asm
neoneye/loda
22
89209
<reponame>neoneye/loda<gh_stars>10-100 ; A268741: a(n) = 2*a(n - 2) - a(n - 1) for n>1, a(0) = 4, a(1) = 5. ; 4,5,3,7,-1,15,-17,47,-81,175,-337,687,-1361,2735,-5457,10927,-21841,43695,-87377,174767,-349521,699055,-1398097,2796207,-5592401,11184815,-22369617,44739247,-89478481,178956975,-357913937,715827887,-1431655761,2863311535 add $0,1 mov $1,-2 pow $1,$0 mul $1,9 add $1,18 div $1,54 add $1,4 mov $0,$1
oeis/123/A123164.asm
neoneye/loda-programs
11
95266
; A123164: Row sums of A123160. ; Submitted by <NAME> ; 1,2,8,38,192,1002,5336,28814,157184,864146,4780008,26572086,148321344,830764794,4666890936,26283115038,148348809216,838944980514,4752575891144,26964373486406,153196621856192,871460014012682,4962895187697048,28292329581548718,161439727075246592,921991641870126002,5269738713907663016,30141904551115043414,172523643553950122304,988102791772527208986,5662556669152122153336,32468566408704598214718,186268135991213676920832,1069116700915117384267842,6139177238547480264595848,35268115657225046492723814 mov $3,2 mov $5,$0 lpb $3 mov $0,$5 sub $3,1 add $0,$3 sub $0,1 mov $4,2 mov $6,$0 lpb $4 mov $0,$6 sub $4,1 add $0,$4 trn $0,1 seq $0,47665 ; Expansion of (1/sqrt(1-6*x+x^2)-1/(1-x))/2. mov $2,$4 mul $2,$0 add $7,$2 lpe lpe mov $0,$7 add $0,1
Labs/Lab_4/files-lab4/Factorial-surprise.asm
KrimReaper/IS1200
1
7338
<filename>Labs/Lab_4/files-lab4/Factorial-surprise.asm<gh_stars>1-10 # Initialize addi $a0, $zero, 5 # Change the immediate/3 to change function call argument # Main factorial function beq $a0, $zero, Zero # Guard for 0! add $v0, $a0, $zero # Value out is initially the argument add $a1, $a0, $zero Factorial: addi $a1, $a1, -1 beq $a1, 1, Stop mul $v0, $v0, $a1 beq $zero, $zero, Factorial # If Zero Zero: addi $v0, $zero, 1 # Stoploop Stop: beq $0, $0, Stop nop
test/Succeed/Issue848.agda
shlevy/agda
1,989
6641
module Issue848 where A : Set1 A = B module _ where B : Set1 B = Set C : Set1 C = B D : Set1 D = E module _ where E : Set1 E = Set F : Set1 F = G module _ where G : Set1 G = H module _ where H : Set1 H = Set
VM/src/Linux/VPU/x86_64/organized/decoder.asm
ozdevguy/Ditto
0
245710
<reponame>ozdevguy/Ditto #Decode the instruction. ivpu_decoder_dispatch: #If this is an immediate, unconditional branch, we can skip the decoding process and perform an immediate jump. mov rbx, 0x400000 #Create a mask for the jump bit within the instruction. test r15, rbx #Check the instruction's jump bit. jne ivpu_immediateJump #If the instruction's jump bit is set, stop decoding the current instruction and perform an immediate jump. #Since rax and rdx are the write back buffers, and we don't need them yet, let's write the register address for read 0 into rax, and the register address for read 1 into rdx. mov rax, 0xF #Create a mask for read 0. and rax, r15 #Get the register address for read 0 using the mask. shl rax, 0x3 #Shift the address to the right by 5 bits to bit position 2 (in order to preserve addressing). mov rdx, 0xF00 #Create a mask for read 1. and rdx, r15 #Get the register address for read 1 using the mask. shr rdx, 0x5 #Shift the address to the left by 3 to bit position 2 (in order to preserve addressing). mov rbx, 0x1F0000 #Create a mask for the addressing mode and store it in rbx. and rbx, r15 #Pull the addressing mode from the instruction. shr rbx, 0xD #Shift the addressing mode to bit positon 0. mov rcx, 0x0 #Clear rcx (read 1) jmp [r14 + rbx + 2208] #Jump to the correct read function.
Debug/uart.asm
polamagdygeo/uWave
0
93645
<gh_stars>0 ;****************************************************************************** ;* TI ARM C/C++ Codegen Unix v18.1.1.LTS * ;* Date/Time created: Fri Jul 3 20:08:26 2020 * ;****************************************************************************** .compiler_opts --abi=eabi --arm_vmrs_si_workaround=off --code_state=16 --diag_wrap=off --embedded_constants=on --endian=little --float_support=FPv4SPD16 --hll_source=on --object_format=elf --silicon_version=7M4 --symdebug:dwarf --symdebug:dwarf_version=3 --unaligned_access=on .thumb $C$DW$CU .dwtag DW_TAG_compile_unit .dwattr $C$DW$CU, DW_AT_name("../driverlib/uart.c") .dwattr $C$DW$CU, DW_AT_producer("TI TI ARM C/C++ Codegen Unix v18.1.1.LTS Copyright (c) 1996-2017 Texas Instruments Incorporated") .dwattr $C$DW$CU, DW_AT_TI_version(0x01) .dwattr $C$DW$CU, DW_AT_comp_dir("/home/pola/workspace_v8/Microwave/Debug") .sect ".const:g_ppui32UARTIntMap" .clink .align 4 .elfsym g_ppui32UARTIntMap,SYM_SIZE(64) g_ppui32UARTIntMap: .bits 1073790976,32 ; g_ppui32UARTIntMap[0][0] @ 0 .bits 21,32 ; g_ppui32UARTIntMap[0][1] @ 32 .bits 1073795072,32 ; g_ppui32UARTIntMap[1][0] @ 64 .bits 22,32 ; g_ppui32UARTIntMap[1][1] @ 96 .bits 1073799168,32 ; g_ppui32UARTIntMap[2][0] @ 128 .bits 49,32 ; g_ppui32UARTIntMap[2][1] @ 160 .bits 1073803264,32 ; g_ppui32UARTIntMap[3][0] @ 192 .bits 75,32 ; g_ppui32UARTIntMap[3][1] @ 224 .bits 1073807360,32 ; g_ppui32UARTIntMap[4][0] @ 256 .bits 76,32 ; g_ppui32UARTIntMap[4][1] @ 288 .bits 1073811456,32 ; g_ppui32UARTIntMap[5][0] @ 320 .bits 77,32 ; g_ppui32UARTIntMap[5][1] @ 352 .bits 1073815552,32 ; g_ppui32UARTIntMap[6][0] @ 384 .bits 78,32 ; g_ppui32UARTIntMap[6][1] @ 416 .bits 1073819648,32 ; g_ppui32UARTIntMap[7][0] @ 448 .bits 79,32 ; g_ppui32UARTIntMap[7][1] @ 480 $C$DW$1 .dwtag DW_TAG_variable .dwattr $C$DW$1, DW_AT_name("g_ppui32UARTIntMap") .dwattr $C$DW$1, DW_AT_TI_symbol_name("g_ppui32UARTIntMap") .dwattr $C$DW$1, DW_AT_type(*$C$DW$T$125) .dwattr $C$DW$1, DW_AT_location[DW_OP_addr g_ppui32UARTIntMap] .dwattr $C$DW$1, DW_AT_decl_file("../driverlib/uart.c") .dwattr $C$DW$1, DW_AT_decl_line(0x47) .dwattr $C$DW$1, DW_AT_decl_column(0x17) .sect ".const:g_ppui32UARTIntMapSnowflake" .clink .align 4 .elfsym g_ppui32UARTIntMapSnowflake,SYM_SIZE(64) g_ppui32UARTIntMapSnowflake: .bits 1073790976,32 ; g_ppui32UARTIntMapSnowflake[0][0] @ 0 .bits 21,32 ; g_ppui32UARTIntMapSnowflake[0][1] @ 32 .bits 1073795072,32 ; g_ppui32UARTIntMapSnowflake[1][0] @ 64 .bits 22,32 ; g_ppui32UARTIntMapSnowflake[1][1] @ 96 .bits 1073799168,32 ; g_ppui32UARTIntMapSnowflake[2][0] @ 128 .bits 49,32 ; g_ppui32UARTIntMapSnowflake[2][1] @ 160 .bits 1073803264,32 ; g_ppui32UARTIntMapSnowflake[3][0] @ 192 .bits 72,32 ; g_ppui32UARTIntMapSnowflake[3][1] @ 224 .bits 1073807360,32 ; g_ppui32UARTIntMapSnowflake[4][0] @ 256 .bits 73,32 ; g_ppui32UARTIntMapSnowflake[4][1] @ 288 .bits 1073811456,32 ; g_ppui32UARTIntMapSnowflake[5][0] @ 320 .bits 74,32 ; g_ppui32UARTIntMapSnowflake[5][1] @ 352 .bits 1073815552,32 ; g_ppui32UARTIntMapSnowflake[6][0] @ 384 .bits 75,32 ; g_ppui32UARTIntMapSnowflake[6][1] @ 416 .bits 1073819648,32 ; g_ppui32UARTIntMapSnowflake[7][0] @ 448 .bits 76,32 ; g_ppui32UARTIntMapSnowflake[7][1] @ 480 $C$DW$2 .dwtag DW_TAG_variable .dwattr $C$DW$2, DW_AT_name("g_ppui32UARTIntMapSnowflake") .dwattr $C$DW$2, DW_AT_TI_symbol_name("g_ppui32UARTIntMapSnowflake") .dwattr $C$DW$2, DW_AT_type(*$C$DW$T$125) .dwattr $C$DW$2, DW_AT_location[DW_OP_addr g_ppui32UARTIntMapSnowflake] .dwattr $C$DW$2, DW_AT_decl_file("../driverlib/uart.c") .dwattr $C$DW$2, DW_AT_decl_line(0x54) .dwattr $C$DW$2, DW_AT_decl_column(0x17) $C$DW$3 .dwtag DW_TAG_subprogram .dwattr $C$DW$3, DW_AT_name("IntRegister") .dwattr $C$DW$3, DW_AT_TI_symbol_name("IntRegister") .dwattr $C$DW$3, DW_AT_declaration .dwattr $C$DW$3, DW_AT_external .dwattr $C$DW$3, DW_AT_decl_file("/home/pola/workspace_v8/Microwave/driverlib/interrupt.h") .dwattr $C$DW$3, DW_AT_decl_line(0x45) .dwattr $C$DW$3, DW_AT_decl_column(0x0d) $C$DW$4 .dwtag DW_TAG_formal_parameter .dwattr $C$DW$4, DW_AT_type(*$C$DW$T$27) $C$DW$5 .dwtag DW_TAG_formal_parameter .dwattr $C$DW$5, DW_AT_type(*$C$DW$T$25) .dwendtag $C$DW$3 $C$DW$6 .dwtag DW_TAG_subprogram .dwattr $C$DW$6, DW_AT_name("IntEnable") .dwattr $C$DW$6, DW_AT_TI_symbol_name("IntEnable") .dwattr $C$DW$6, DW_AT_declaration .dwattr $C$DW$6, DW_AT_external .dwattr $C$DW$6, DW_AT_decl_file("/home/pola/workspace_v8/Microwave/driverlib/interrupt.h") .dwattr $C$DW$6, DW_AT_decl_line(0x4c) .dwattr $C$DW$6, DW_AT_decl_column(0x0d) $C$DW$7 .dwtag DW_TAG_formal_parameter .dwattr $C$DW$7, DW_AT_type(*$C$DW$T$27) .dwendtag $C$DW$6 $C$DW$8 .dwtag DW_TAG_subprogram .dwattr $C$DW$8, DW_AT_name("IntDisable") .dwattr $C$DW$8, DW_AT_TI_symbol_name("IntDisable") .dwattr $C$DW$8, DW_AT_declaration .dwattr $C$DW$8, DW_AT_external .dwattr $C$DW$8, DW_AT_decl_file("/home/pola/workspace_v8/Microwave/driverlib/interrupt.h") .dwattr $C$DW$8, DW_AT_decl_line(0x4d) .dwattr $C$DW$8, DW_AT_decl_column(0x0d) $C$DW$9 .dwtag DW_TAG_formal_parameter .dwattr $C$DW$9, DW_AT_type(*$C$DW$T$27) .dwendtag $C$DW$8 $C$DW$10 .dwtag DW_TAG_subprogram .dwattr $C$DW$10, DW_AT_name("IntUnregister") .dwattr $C$DW$10, DW_AT_TI_symbol_name("IntUnregister") .dwattr $C$DW$10, DW_AT_declaration .dwattr $C$DW$10, DW_AT_external .dwattr $C$DW$10, DW_AT_decl_file("/home/pola/workspace_v8/Microwave/driverlib/interrupt.h") .dwattr $C$DW$10, DW_AT_decl_line(0x46) .dwattr $C$DW$10, DW_AT_decl_column(0x0d) $C$DW$11 .dwtag DW_TAG_formal_parameter .dwattr $C$DW$11, DW_AT_type(*$C$DW$T$27) .dwendtag $C$DW$10 ; /home/pola/ti/ccsv8/tools/compiler/ti-cgt-arm_18.1.1.LTS/bin/armacpia -@/tmp/TI3SLbkBfpY .sect ".text" .clink .thumbfunc _UARTIntNumberGet .thumb $C$DW$12 .dwtag DW_TAG_subprogram .dwattr $C$DW$12, DW_AT_name("_UARTIntNumberGet") .dwattr $C$DW$12, DW_AT_low_pc(_UARTIntNumberGet) .dwattr $C$DW$12, DW_AT_high_pc(0x00) .dwattr $C$DW$12, DW_AT_TI_symbol_name("_UARTIntNumberGet") .dwattr $C$DW$12, DW_AT_type(*$C$DW$T$27) .dwattr $C$DW$12, DW_AT_TI_begin_file("../driverlib/uart.c") .dwattr $C$DW$12, DW_AT_TI_begin_line(0x89) .dwattr $C$DW$12, DW_AT_TI_begin_column(0x01) .dwattr $C$DW$12, DW_AT_decl_file("../driverlib/uart.c") .dwattr $C$DW$12, DW_AT_decl_line(0x89) .dwattr $C$DW$12, DW_AT_decl_column(0x01) .dwattr $C$DW$12, DW_AT_TI_max_frame_size(0x10) .dwpsn file "../driverlib/uart.c",line 138,column 1,is_stmt,address _UARTIntNumberGet,isa 1 .dwfde $C$DW$CIE, _UARTIntNumberGet $C$DW$13 .dwtag DW_TAG_formal_parameter .dwattr $C$DW$13, DW_AT_name("ui32Base") .dwattr $C$DW$13, DW_AT_TI_symbol_name("ui32Base") .dwattr $C$DW$13, DW_AT_type(*$C$DW$T$27) .dwattr $C$DW$13, DW_AT_location[DW_OP_reg0] ;---------------------------------------------------------------------- ; 137 | _UARTIntNumberGet(uint32_t ui32Base) ;---------------------------------------------------------------------- ;***************************************************************************** ;* FUNCTION NAME: _UARTIntNumberGet * ;* * ;* Regs Modified : A1,A2,A3,SP,SR * ;* Regs Used : A1,A2,A3,SP,LR,SR * ;* Local Frame Size : 0 Args + 16 Auto + 0 Save = 16 byte * ;***************************************************************************** _UARTIntNumberGet: ;* --------------------------------------------------------------------------* .dwcfi cfa_offset, 0 SUB SP, SP, #16 ; [DPU_V7M3_PIPE] .dwcfi cfa_offset, 16 $C$DW$14 .dwtag DW_TAG_variable .dwattr $C$DW$14, DW_AT_name("ui32Base") .dwattr $C$DW$14, DW_AT_TI_symbol_name("ui32Base") .dwattr $C$DW$14, DW_AT_type(*$C$DW$T$27) .dwattr $C$DW$14, DW_AT_location[DW_OP_breg13 0] $C$DW$15 .dwtag DW_TAG_variable .dwattr $C$DW$15, DW_AT_name("ui8Idx") .dwattr $C$DW$15, DW_AT_TI_symbol_name("ui8Idx") .dwattr $C$DW$15, DW_AT_type(*$C$DW$T$110) .dwattr $C$DW$15, DW_AT_location[DW_OP_breg13 4] $C$DW$16 .dwtag DW_TAG_variable .dwattr $C$DW$16, DW_AT_name("ui8Rows") .dwattr $C$DW$16, DW_AT_TI_symbol_name("ui8Rows") .dwattr $C$DW$16, DW_AT_type(*$C$DW$T$110) .dwattr $C$DW$16, DW_AT_location[DW_OP_breg13 8] $C$DW$17 .dwtag DW_TAG_variable .dwattr $C$DW$17, DW_AT_name("ppui32UARTIntMap") .dwattr $C$DW$17, DW_AT_TI_symbol_name("ppui32UARTIntMap") .dwattr $C$DW$17, DW_AT_type(*$C$DW$T$126) .dwattr $C$DW$17, DW_AT_location[DW_OP_breg13 12] ;---------------------------------------------------------------------- ; 139 | uint_fast8_t ui8Idx, ui8Rows; ; 140 | const uint32_t (*ppui32UARTIntMap)[2]; ; 142 | // ; 143 | // Default interrupt map. ; 144 | // ;---------------------------------------------------------------------- STR A1, [SP, #0] ; [DPU_V7M3_PIPE] |138| .dwpsn file "../driverlib/uart.c",line 145,column 5,is_stmt,isa 1 ;---------------------------------------------------------------------- ; 145 | ppui32UARTIntMap = g_ppui32UARTIntMap; ;---------------------------------------------------------------------- LDR A1, $C$CON1 ; [DPU_V7M3_PIPE] |145| STR A1, [SP, #12] ; [DPU_V7M3_PIPE] |145| .dwpsn file "../driverlib/uart.c",line 146,column 5,is_stmt,isa 1 ;---------------------------------------------------------------------- ; 146 | ui8Rows = g_ui8UARTIntMapRows; ;---------------------------------------------------------------------- MOVS A1, #8 ; [DPU_V7M3_PIPE] |146| STR A1, [SP, #8] ; [DPU_V7M3_PIPE] |146| .dwpsn file "../driverlib/uart.c",line 148,column 5,is_stmt,isa 1 ;---------------------------------------------------------------------- ; 148 | if(CLASS_IS_TM4C129) ;---------------------------------------------------------------------- LDR A2, $C$CON3 ; [DPU_V7M3_PIPE] |148| LDR A1, $C$CON2 ; [DPU_V7M3_PIPE] |148| LDR A3, [A2, #0] ; [DPU_V7M3_PIPE] |148| LDR A2, $C$CON4 ; [DPU_V7M3_PIPE] |148| ANDS A1, A1, A3 ; [DPU_V7M3_PIPE] |148| CMP A2, A1 ; [DPU_V7M3_PIPE] |148| BNE ||$C$L1|| ; [DPU_V7M3_PIPE] |148| ; BRANCHCC OCCURS {||$C$L1||} ; [] |148| ;* --------------------------------------------------------------------------* .dwpsn file "../driverlib/uart.c",line 150,column 9,is_stmt,isa 1 ;---------------------------------------------------------------------- ; 150 | ppui32UARTIntMap = g_ppui32UARTIntMapSnowflake; ;---------------------------------------------------------------------- LDR A1, $C$CON5 ; [DPU_V7M3_PIPE] |150| STR A1, [SP, #12] ; [DPU_V7M3_PIPE] |150| .dwpsn file "../driverlib/uart.c",line 151,column 9,is_stmt,isa 1 ;---------------------------------------------------------------------- ; 151 | ui8Rows = g_ui8UARTIntMapRowsSnowflake; ; 154 | // ; 155 | // Loop through the table that maps UART base addresses to interrupt ; 156 | // numbers. ; 157 | // ;---------------------------------------------------------------------- MOVS A1, #8 ; [DPU_V7M3_PIPE] |151| STR A1, [SP, #8] ; [DPU_V7M3_PIPE] |151| ;* --------------------------------------------------------------------------* ||$C$L1||: .dwpsn file "../driverlib/uart.c",line 158,column 9,is_stmt,isa 1 ;---------------------------------------------------------------------- ; 158 | for(ui8Idx = 0; ui8Idx < ui8Rows; ui8Idx++) ;---------------------------------------------------------------------- MOVS A1, #0 ; [DPU_V7M3_PIPE] |158| STR A1, [SP, #4] ; [DPU_V7M3_PIPE] |158| .dwpsn file "../driverlib/uart.c",line 158,column 21,is_stmt,isa 1 ;---------------------------------------------------------------------- ; 160 | // ; 161 | // See if this base address matches. ; 162 | // ;---------------------------------------------------------------------- LDR A1, [SP, #8] ; [DPU_V7M3_PIPE] |158| LDR A2, [SP, #4] ; [DPU_V7M3_PIPE] |158| CMP A1, A2 ; [DPU_V7M3_PIPE] |158| BLS ||$C$L4|| ; [DPU_V7M3_PIPE] |158| ; BRANCHCC OCCURS {||$C$L4||} ; [] |158| ;* --------------------------------------------------------------------------* ;* BEGIN LOOP ||$C$L2|| ;* ;* Loop source line : 158 ;* Loop closing brace source line : 170 ;* Known Minimum Trip Count : 1 ;* Known Maximum Trip Count : 4294967295 ;* Known Max Trip Count Factor : 1 ;* --------------------------------------------------------------------------* ||$C$L2||: .dwpsn file "../driverlib/uart.c",line 163,column 9,is_stmt,isa 1 ;---------------------------------------------------------------------- ; 163 | if(ppui32UARTIntMap[ui8Idx][0] == ui32Base) ; 165 | // ; 166 | // Return the corresponding interrupt number. ; 167 | // ;---------------------------------------------------------------------- LDR A2, [SP, #4] ; [DPU_V7M3_PIPE] |163| LDR A3, [SP, #12] ; [DPU_V7M3_PIPE] |163| LDR A1, [SP, #0] ; [DPU_V7M3_PIPE] |163| LDR A2, [A3, +A2, LSL #3] ; [DPU_V7M3_PIPE] |163| CMP A1, A2 ; [DPU_V7M3_PIPE] |163| BNE ||$C$L3|| ; [DPU_V7M3_PIPE] |163| ; BRANCHCC OCCURS {||$C$L3||} ; [] |163| ;* --------------------------------------------------------------------------* .dwpsn file "../driverlib/uart.c",line 168,column 13,is_stmt,isa 1 ;---------------------------------------------------------------------- ; 168 | return(ppui32UARTIntMap[ui8Idx][1]); ; 172 | // ; 173 | // The base address could not be found, so return an error. ; 174 | // ;---------------------------------------------------------------------- LDR A2, [SP, #4] ; [DPU_V7M3_PIPE] |168| LDR A1, [SP, #12] ; [DPU_V7M3_PIPE] |168| ADD A1, A1, A2, LSL #3 ; [DPU_V7M3_PIPE] |168| LDR A1, [A1, #4] ; [DPU_V7M3_PIPE] |168| B ||$C$L5|| ; [DPU_V7M3_PIPE] |168| ; BRANCH OCCURS {||$C$L5||} ; [] |168| ;* --------------------------------------------------------------------------* ||$C$L3||: .dwpsn file "../driverlib/uart.c",line 158,column 39,is_stmt,isa 1 LDR A1, [SP, #4] ; [DPU_V7M3_PIPE] |158| ADDS A1, A1, #1 ; [DPU_V7M3_PIPE] |158| STR A1, [SP, #4] ; [DPU_V7M3_PIPE] |158| .dwpsn file "../driverlib/uart.c",line 158,column 21,is_stmt,isa 1 LDR A1, [SP, #8] ; [DPU_V7M3_PIPE] |158| LDR A2, [SP, #4] ; [DPU_V7M3_PIPE] |158| CMP A1, A2 ; [DPU_V7M3_PIPE] |158| BHI ||$C$L2|| ; [DPU_V7M3_PIPE] |158| ; BRANCHCC OCCURS {||$C$L2||} ; [] |158| ;* --------------------------------------------------------------------------* ||$C$L4||: .dwpsn file "../driverlib/uart.c",line 175,column 5,is_stmt,isa 1 ;---------------------------------------------------------------------- ; 175 | return(0); ;---------------------------------------------------------------------- MOVS A1, #0 ; [DPU_V7M3_PIPE] |175| ;* --------------------------------------------------------------------------* ||$C$L5||: .dwpsn file "../driverlib/uart.c",line 176,column 1,is_stmt,isa 1 ADD SP, SP, #16 ; [DPU_V7M3_PIPE] .dwcfi cfa_offset, 0 $C$DW$18 .dwtag DW_TAG_TI_branch .dwattr $C$DW$18, DW_AT_low_pc(0x00) .dwattr $C$DW$18, DW_AT_TI_return BX LR ; [DPU_V7M3_PIPE] ; BRANCH OCCURS ; [] .dwattr $C$DW$12, DW_AT_TI_end_file("../driverlib/uart.c") .dwattr $C$DW$12, DW_AT_TI_end_line(0xb0) .dwattr $C$DW$12, DW_AT_TI_end_column(0x01) .dwendentry .dwendtag $C$DW$12 .sect ".text" .clink .thumbfunc UARTParityModeSet .thumb .global UARTParityModeSet $C$DW$19 .dwtag DW_TAG_subprogram .dwattr $C$DW$19, DW_AT_name("UARTParityModeSet") .dwattr $C$DW$19, DW_AT_low_pc(UARTParityModeSet) .dwattr $C$DW$19, DW_AT_high_pc(0x00) .dwattr $C$DW$19, DW_AT_TI_symbol_name("UARTParityModeSet") .dwattr $C$DW$19, DW_AT_external .dwattr $C$DW$19, DW_AT_TI_begin_file("../driverlib/uart.c") .dwattr $C$DW$19, DW_AT_TI_begin_line(0xc4) .dwattr $C$DW$19, DW_AT_TI_begin_column(0x01) .dwattr $C$DW$19, DW_AT_decl_file("../driverlib/uart.c") .dwattr $C$DW$19, DW_AT_decl_line(0xc4) .dwattr $C$DW$19, DW_AT_decl_column(0x01) .dwattr $C$DW$19, DW_AT_TI_max_frame_size(0x08) .dwpsn file "../driverlib/uart.c",line 197,column 1,is_stmt,address UARTParityModeSet,isa 1 .dwfde $C$DW$CIE, UARTParityModeSet $C$DW$20 .dwtag DW_TAG_formal_parameter .dwattr $C$DW$20, DW_AT_name("ui32Base") .dwattr $C$DW$20, DW_AT_TI_symbol_name("ui32Base") .dwattr $C$DW$20, DW_AT_type(*$C$DW$T$27) .dwattr $C$DW$20, DW_AT_location[DW_OP_reg0] $C$DW$21 .dwtag DW_TAG_formal_parameter .dwattr $C$DW$21, DW_AT_name("ui32Parity") .dwattr $C$DW$21, DW_AT_TI_symbol_name("ui32Parity") .dwattr $C$DW$21, DW_AT_type(*$C$DW$T$27) .dwattr $C$DW$21, DW_AT_location[DW_OP_reg1] ;---------------------------------------------------------------------- ; 196 | UARTParityModeSet(uint32_t ui32Base, uint32_t ui32Parity) ;---------------------------------------------------------------------- ;***************************************************************************** ;* FUNCTION NAME: UARTParityModeSet * ;* * ;* Regs Modified : A1,A2,A3,SP,SR * ;* Regs Used : A1,A2,A3,SP,LR,SR * ;* Local Frame Size : 0 Args + 8 Auto + 0 Save = 8 byte * ;***************************************************************************** UARTParityModeSet: ;* --------------------------------------------------------------------------* .dwcfi cfa_offset, 0 SUB SP, SP, #8 ; [DPU_V7M3_PIPE] .dwcfi cfa_offset, 8 $C$DW$22 .dwtag DW_TAG_variable .dwattr $C$DW$22, DW_AT_name("ui32Base") .dwattr $C$DW$22, DW_AT_TI_symbol_name("ui32Base") .dwattr $C$DW$22, DW_AT_type(*$C$DW$T$27) .dwattr $C$DW$22, DW_AT_location[DW_OP_breg13 0] $C$DW$23 .dwtag DW_TAG_variable .dwattr $C$DW$23, DW_AT_name("ui32Parity") .dwattr $C$DW$23, DW_AT_TI_symbol_name("ui32Parity") .dwattr $C$DW$23, DW_AT_type(*$C$DW$T$27) .dwattr $C$DW$23, DW_AT_location[DW_OP_breg13 4] ;---------------------------------------------------------------------- ; 198 | // ; 199 | // Check the arguments. ; 200 | // ; 201 | ASSERT(_UARTBaseValid(ui32Base)); ; 202 | ASSERT((ui32Parity == UART_CONFIG_PAR_NONE) || ; 203 | (ui32Parity == UART_CONFIG_PAR_EVEN) || ; 204 | (ui32Parity == UART_CONFIG_PAR_ODD) || ; 205 | (ui32Parity == UART_CONFIG_PAR_ONE) || ; 206 | (ui32Parity == UART_CONFIG_PAR_ZERO)); ; 208 | // ; 209 | // Set the parity mode. ; 210 | // ;---------------------------------------------------------------------- STR A2, [SP, #4] ; [DPU_V7M3_PIPE] |197| STR A1, [SP, #0] ; [DPU_V7M3_PIPE] |197| .dwpsn file "../driverlib/uart.c",line 211,column 5,is_stmt,isa 1 ;---------------------------------------------------------------------- ; 211 | HWREG(ui32Base + UART_O_LCRH) = ((HWREG(ui32Base + UART_O_LCRH) & ; 212 | ~(UART_LCRH_SPS | UART_LCRH_EPS | ; 213 | UART_LCRH_PEN)) | ui32Parity); ;---------------------------------------------------------------------- LDR A1, [SP, #0] ; [DPU_V7M3_PIPE] |211| LDR A2, [SP, #4] ; [DPU_V7M3_PIPE] |211| LDR A3, [SP, #0] ; [DPU_V7M3_PIPE] |211| LDR A1, [A1, #44] ; [DPU_V7M3_PIPE] |211| BIC A1, A1, #134 ; [DPU_V7M3_PIPE] |211| ORRS A2, A2, A1 ; [DPU_V7M3_PIPE] |211| STR A2, [A3, #44] ; [DPU_V7M3_PIPE] |211| .dwpsn file "../driverlib/uart.c",line 214,column 1,is_stmt,isa 1 ADD SP, SP, #8 ; [DPU_V7M3_PIPE] .dwcfi cfa_offset, 0 $C$DW$24 .dwtag DW_TAG_TI_branch .dwattr $C$DW$24, DW_AT_low_pc(0x00) .dwattr $C$DW$24, DW_AT_TI_return BX LR ; [DPU_V7M3_PIPE] ; BRANCH OCCURS ; [] .dwattr $C$DW$19, DW_AT_TI_end_file("../driverlib/uart.c") .dwattr $C$DW$19, DW_AT_TI_end_line(0xd6) .dwattr $C$DW$19, DW_AT_TI_end_column(0x01) .dwendentry .dwendtag $C$DW$19 .sect ".text" .clink .thumbfunc UARTParityModeGet .thumb .global UARTParityModeGet $C$DW$25 .dwtag DW_TAG_subprogram .dwattr $C$DW$25, DW_AT_name("UARTParityModeGet") .dwattr $C$DW$25, DW_AT_low_pc(UARTParityModeGet) .dwattr $C$DW$25, DW_AT_high_pc(0x00) .dwattr $C$DW$25, DW_AT_TI_symbol_name("UARTParityModeGet") .dwattr $C$DW$25, DW_AT_external .dwattr $C$DW$25, DW_AT_type(*$C$DW$T$27) .dwattr $C$DW$25, DW_AT_TI_begin_file("../driverlib/uart.c") .dwattr $C$DW$25, DW_AT_TI_begin_line(0xe7) .dwattr $C$DW$25, DW_AT_TI_begin_column(0x01) .dwattr $C$DW$25, DW_AT_decl_file("../driverlib/uart.c") .dwattr $C$DW$25, DW_AT_decl_line(0xe7) .dwattr $C$DW$25, DW_AT_decl_column(0x01) .dwattr $C$DW$25, DW_AT_TI_max_frame_size(0x08) .dwpsn file "../driverlib/uart.c",line 232,column 1,is_stmt,address UARTParityModeGet,isa 1 .dwfde $C$DW$CIE, UARTParityModeGet $C$DW$26 .dwtag DW_TAG_formal_parameter .dwattr $C$DW$26, DW_AT_name("ui32Base") .dwattr $C$DW$26, DW_AT_TI_symbol_name("ui32Base") .dwattr $C$DW$26, DW_AT_type(*$C$DW$T$27) .dwattr $C$DW$26, DW_AT_location[DW_OP_reg0] ;---------------------------------------------------------------------- ; 231 | UARTParityModeGet(uint32_t ui32Base) ;---------------------------------------------------------------------- ;***************************************************************************** ;* FUNCTION NAME: UARTParityModeGet * ;* * ;* Regs Modified : A1,SP * ;* Regs Used : A1,SP,LR * ;* Local Frame Size : 0 Args + 4 Auto + 0 Save = 4 byte * ;***************************************************************************** UARTParityModeGet: ;* --------------------------------------------------------------------------* .dwcfi cfa_offset, 0 SUB SP, SP, #8 ; [DPU_V7M3_PIPE] .dwcfi cfa_offset, 8 $C$DW$27 .dwtag DW_TAG_variable .dwattr $C$DW$27, DW_AT_name("ui32Base") .dwattr $C$DW$27, DW_AT_TI_symbol_name("ui32Base") .dwattr $C$DW$27, DW_AT_type(*$C$DW$T$27) .dwattr $C$DW$27, DW_AT_location[DW_OP_breg13 0] ;---------------------------------------------------------------------- ; 233 | // ; 234 | // Check the arguments. ; 235 | // ; 236 | ASSERT(_UARTBaseValid(ui32Base)); ; 238 | // ; 239 | // Return the current parity setting. ; 240 | // ;---------------------------------------------------------------------- STR A1, [SP, #0] ; [DPU_V7M3_PIPE] |232| .dwpsn file "../driverlib/uart.c",line 241,column 5,is_stmt,isa 1 ;---------------------------------------------------------------------- ; 241 | return(HWREG(ui32Base + UART_O_LCRH) & ; 242 | (UART_LCRH_SPS | UART_LCRH_EPS | UART_LCRH_PEN)); ;---------------------------------------------------------------------- LDR A1, [SP, #0] ; [DPU_V7M3_PIPE] |241| LDR A1, [A1, #44] ; [DPU_V7M3_PIPE] |241| AND A1, A1, #134 ; [DPU_V7M3_PIPE] |241| .dwpsn file "../driverlib/uart.c",line 243,column 1,is_stmt,isa 1 ADD SP, SP, #8 ; [DPU_V7M3_PIPE] .dwcfi cfa_offset, 0 $C$DW$28 .dwtag DW_TAG_TI_branch .dwattr $C$DW$28, DW_AT_low_pc(0x00) .dwattr $C$DW$28, DW_AT_TI_return BX LR ; [DPU_V7M3_PIPE] ; BRANCH OCCURS ; [] .dwattr $C$DW$25, DW_AT_TI_end_file("../driverlib/uart.c") .dwattr $C$DW$25, DW_AT_TI_end_line(0xf3) .dwattr $C$DW$25, DW_AT_TI_end_column(0x01) .dwendentry .dwendtag $C$DW$25 .sect ".text" .clink .thumbfunc UARTFIFOLevelSet .thumb .global UARTFIFOLevelSet $C$DW$29 .dwtag DW_TAG_subprogram .dwattr $C$DW$29, DW_AT_name("UARTFIFOLevelSet") .dwattr $C$DW$29, DW_AT_low_pc(UARTFIFOLevelSet) .dwattr $C$DW$29, DW_AT_high_pc(0x00) .dwattr $C$DW$29, DW_AT_TI_symbol_name("UARTFIFOLevelSet") .dwattr $C$DW$29, DW_AT_external .dwattr $C$DW$29, DW_AT_TI_begin_file("../driverlib/uart.c") .dwattr $C$DW$29, DW_AT_TI_begin_line(0x108) .dwattr $C$DW$29, DW_AT_TI_begin_column(0x01) .dwattr $C$DW$29, DW_AT_decl_file("../driverlib/uart.c") .dwattr $C$DW$29, DW_AT_decl_line(0x108) .dwattr $C$DW$29, DW_AT_decl_column(0x01) .dwattr $C$DW$29, DW_AT_TI_max_frame_size(0x10) .dwpsn file "../driverlib/uart.c",line 266,column 1,is_stmt,address UARTFIFOLevelSet,isa 1 .dwfde $C$DW$CIE, UARTFIFOLevelSet $C$DW$30 .dwtag DW_TAG_formal_parameter .dwattr $C$DW$30, DW_AT_name("ui32Base") .dwattr $C$DW$30, DW_AT_TI_symbol_name("ui32Base") .dwattr $C$DW$30, DW_AT_type(*$C$DW$T$27) .dwattr $C$DW$30, DW_AT_location[DW_OP_reg0] $C$DW$31 .dwtag DW_TAG_formal_parameter .dwattr $C$DW$31, DW_AT_name("ui32TxLevel") .dwattr $C$DW$31, DW_AT_TI_symbol_name("ui32TxLevel") .dwattr $C$DW$31, DW_AT_type(*$C$DW$T$27) .dwattr $C$DW$31, DW_AT_location[DW_OP_reg1] $C$DW$32 .dwtag DW_TAG_formal_parameter .dwattr $C$DW$32, DW_AT_name("ui32RxLevel") .dwattr $C$DW$32, DW_AT_TI_symbol_name("ui32RxLevel") .dwattr $C$DW$32, DW_AT_type(*$C$DW$T$27) .dwattr $C$DW$32, DW_AT_location[DW_OP_reg2] ;---------------------------------------------------------------------- ; 264 | UARTFIFOLevelSet(uint32_t ui32Base, uint32_t ui32TxLevel, ; 265 | uint32_t ui32RxLevel) ;---------------------------------------------------------------------- ;***************************************************************************** ;* FUNCTION NAME: UARTFIFOLevelSet * ;* * ;* Regs Modified : A1,A2,A3,SP,SR * ;* Regs Used : A1,A2,A3,SP,LR,SR * ;* Local Frame Size : 0 Args + 12 Auto + 0 Save = 12 byte * ;***************************************************************************** UARTFIFOLevelSet: ;* --------------------------------------------------------------------------* .dwcfi cfa_offset, 0 SUB SP, SP, #16 ; [DPU_V7M3_PIPE] .dwcfi cfa_offset, 16 $C$DW$33 .dwtag DW_TAG_variable .dwattr $C$DW$33, DW_AT_name("ui32Base") .dwattr $C$DW$33, DW_AT_TI_symbol_name("ui32Base") .dwattr $C$DW$33, DW_AT_type(*$C$DW$T$27) .dwattr $C$DW$33, DW_AT_location[DW_OP_breg13 0] $C$DW$34 .dwtag DW_TAG_variable .dwattr $C$DW$34, DW_AT_name("ui32TxLevel") .dwattr $C$DW$34, DW_AT_TI_symbol_name("ui32TxLevel") .dwattr $C$DW$34, DW_AT_type(*$C$DW$T$27) .dwattr $C$DW$34, DW_AT_location[DW_OP_breg13 4] $C$DW$35 .dwtag DW_TAG_variable .dwattr $C$DW$35, DW_AT_name("ui32RxLevel") .dwattr $C$DW$35, DW_AT_TI_symbol_name("ui32RxLevel") .dwattr $C$DW$35, DW_AT_type(*$C$DW$T$27) .dwattr $C$DW$35, DW_AT_location[DW_OP_breg13 8] ;---------------------------------------------------------------------- ; 267 | // ; 268 | // Check the arguments. ; 269 | // ; 270 | ASSERT(_UARTBaseValid(ui32Base)); ; 271 | ASSERT((ui32TxLevel == UART_FIFO_TX1_8) || ; 272 | (ui32TxLevel == UART_FIFO_TX2_8) || ; 273 | (ui32TxLevel == UART_FIFO_TX4_8) || ; 274 | (ui32TxLevel == UART_FIFO_TX6_8) || ; 275 | (ui32TxLevel == UART_FIFO_TX7_8)); ; 276 | ASSERT((ui32RxLevel == UART_FIFO_RX1_8) || ; 277 | (ui32RxLevel == UART_FIFO_RX2_8) || ; 278 | (ui32RxLevel == UART_FIFO_RX4_8) || ; 279 | (ui32RxLevel == UART_FIFO_RX6_8) || ; 280 | (ui32RxLevel == UART_FIFO_RX7_8)); ; 282 | // ; 283 | // Set the FIFO interrupt levels. ; 284 | // ;---------------------------------------------------------------------- STR A3, [SP, #8] ; [DPU_V7M3_PIPE] |266| STR A2, [SP, #4] ; [DPU_V7M3_PIPE] |266| STR A1, [SP, #0] ; [DPU_V7M3_PIPE] |266| .dwpsn file "../driverlib/uart.c",line 285,column 5,is_stmt,isa 1 ;---------------------------------------------------------------------- ; 285 | HWREG(ui32Base + UART_O_IFLS) = ui32TxLevel | ui32RxLevel; ;---------------------------------------------------------------------- LDR A3, [SP, #4] ; [DPU_V7M3_PIPE] |285| LDR A1, [SP, #8] ; [DPU_V7M3_PIPE] |285| LDR A2, [SP, #0] ; [DPU_V7M3_PIPE] |285| ORRS A1, A1, A3 ; [DPU_V7M3_PIPE] |285| STR A1, [A2, #52] ; [DPU_V7M3_PIPE] |285| .dwpsn file "../driverlib/uart.c",line 286,column 1,is_stmt,isa 1 ADD SP, SP, #16 ; [DPU_V7M3_PIPE] .dwcfi cfa_offset, 0 $C$DW$36 .dwtag DW_TAG_TI_branch .dwattr $C$DW$36, DW_AT_low_pc(0x00) .dwattr $C$DW$36, DW_AT_TI_return BX LR ; [DPU_V7M3_PIPE] ; BRANCH OCCURS ; [] .dwattr $C$DW$29, DW_AT_TI_end_file("../driverlib/uart.c") .dwattr $C$DW$29, DW_AT_TI_end_line(0x11e) .dwattr $C$DW$29, DW_AT_TI_end_column(0x01) .dwendentry .dwendtag $C$DW$29 .sect ".text" .clink .thumbfunc UARTFIFOLevelGet .thumb .global UARTFIFOLevelGet $C$DW$37 .dwtag DW_TAG_subprogram .dwattr $C$DW$37, DW_AT_name("UARTFIFOLevelGet") .dwattr $C$DW$37, DW_AT_low_pc(UARTFIFOLevelGet) .dwattr $C$DW$37, DW_AT_high_pc(0x00) .dwattr $C$DW$37, DW_AT_TI_symbol_name("UARTFIFOLevelGet") .dwattr $C$DW$37, DW_AT_external .dwattr $C$DW$37, DW_AT_TI_begin_file("../driverlib/uart.c") .dwattr $C$DW$37, DW_AT_TI_begin_line(0x133) .dwattr $C$DW$37, DW_AT_TI_begin_column(0x01) .dwattr $C$DW$37, DW_AT_decl_file("../driverlib/uart.c") .dwattr $C$DW$37, DW_AT_decl_line(0x133) .dwattr $C$DW$37, DW_AT_decl_column(0x01) .dwattr $C$DW$37, DW_AT_TI_max_frame_size(0x10) .dwpsn file "../driverlib/uart.c",line 309,column 1,is_stmt,address UARTFIFOLevelGet,isa 1 .dwfde $C$DW$CIE, UARTFIFOLevelGet $C$DW$38 .dwtag DW_TAG_formal_parameter .dwattr $C$DW$38, DW_AT_name("ui32Base") .dwattr $C$DW$38, DW_AT_TI_symbol_name("ui32Base") .dwattr $C$DW$38, DW_AT_type(*$C$DW$T$27) .dwattr $C$DW$38, DW_AT_location[DW_OP_reg0] $C$DW$39 .dwtag DW_TAG_formal_parameter .dwattr $C$DW$39, DW_AT_name("pui32TxLevel") .dwattr $C$DW$39, DW_AT_TI_symbol_name("pui32TxLevel") .dwattr $C$DW$39, DW_AT_type(*$C$DW$T$34) .dwattr $C$DW$39, DW_AT_location[DW_OP_reg1] $C$DW$40 .dwtag DW_TAG_formal_parameter .dwattr $C$DW$40, DW_AT_name("pui32RxLevel") .dwattr $C$DW$40, DW_AT_TI_symbol_name("pui32RxLevel") .dwattr $C$DW$40, DW_AT_type(*$C$DW$T$34) .dwattr $C$DW$40, DW_AT_location[DW_OP_reg2] ;---------------------------------------------------------------------- ; 307 | UARTFIFOLevelGet(uint32_t ui32Base, uint32_t *pui32TxLevel, ; 308 | uint32_t *pui32RxLevel) ;---------------------------------------------------------------------- ;***************************************************************************** ;* FUNCTION NAME: UARTFIFOLevelGet * ;* * ;* Regs Modified : A1,A2,SP * ;* Regs Used : A1,A2,A3,SP,LR * ;* Local Frame Size : 0 Args + 16 Auto + 0 Save = 16 byte * ;***************************************************************************** UARTFIFOLevelGet: ;* --------------------------------------------------------------------------* .dwcfi cfa_offset, 0 SUB SP, SP, #16 ; [DPU_V7M3_PIPE] .dwcfi cfa_offset, 16 $C$DW$41 .dwtag DW_TAG_variable .dwattr $C$DW$41, DW_AT_name("ui32Base") .dwattr $C$DW$41, DW_AT_TI_symbol_name("ui32Base") .dwattr $C$DW$41, DW_AT_type(*$C$DW$T$27) .dwattr $C$DW$41, DW_AT_location[DW_OP_breg13 0] $C$DW$42 .dwtag DW_TAG_variable .dwattr $C$DW$42, DW_AT_name("pui32TxLevel") .dwattr $C$DW$42, DW_AT_TI_symbol_name("pui32TxLevel") .dwattr $C$DW$42, DW_AT_type(*$C$DW$T$34) .dwattr $C$DW$42, DW_AT_location[DW_OP_breg13 4] $C$DW$43 .dwtag DW_TAG_variable .dwattr $C$DW$43, DW_AT_name("pui32RxLevel") .dwattr $C$DW$43, DW_AT_TI_symbol_name("pui32RxLevel") .dwattr $C$DW$43, DW_AT_type(*$C$DW$T$34) .dwattr $C$DW$43, DW_AT_location[DW_OP_breg13 8] $C$DW$44 .dwtag DW_TAG_variable .dwattr $C$DW$44, DW_AT_name("ui32Temp") .dwattr $C$DW$44, DW_AT_TI_symbol_name("ui32Temp") .dwattr $C$DW$44, DW_AT_type(*$C$DW$T$27) .dwattr $C$DW$44, DW_AT_location[DW_OP_breg13 12] ;---------------------------------------------------------------------- ; 310 | uint32_t ui32Temp; ; 312 | // ; 313 | // Check the arguments. ; 314 | // ; 315 | ASSERT(_UARTBaseValid(ui32Base)); ; 317 | // ; 318 | // Read the FIFO level register. ; 319 | // ;---------------------------------------------------------------------- STR A3, [SP, #8] ; [DPU_V7M3_PIPE] |309| STR A2, [SP, #4] ; [DPU_V7M3_PIPE] |309| STR A1, [SP, #0] ; [DPU_V7M3_PIPE] |309| .dwpsn file "../driverlib/uart.c",line 320,column 5,is_stmt,isa 1 ;---------------------------------------------------------------------- ; 320 | ui32Temp = HWREG(ui32Base + UART_O_IFLS); ; 322 | // ; 323 | // Extract the transmit and receive FIFO levels. ; 324 | // ;---------------------------------------------------------------------- LDR A1, [SP, #0] ; [DPU_V7M3_PIPE] |320| LDR A1, [A1, #52] ; [DPU_V7M3_PIPE] |320| STR A1, [SP, #12] ; [DPU_V7M3_PIPE] |320| .dwpsn file "../driverlib/uart.c",line 325,column 5,is_stmt,isa 1 ;---------------------------------------------------------------------- ; 325 | *pui32TxLevel = ui32Temp & UART_IFLS_TX_M; ;---------------------------------------------------------------------- LDR A2, [SP, #4] ; [DPU_V7M3_PIPE] |325| LDR A1, [SP, #12] ; [DPU_V7M3_PIPE] |325| AND A1, A1, #7 ; [DPU_V7M3_PIPE] |325| STR A1, [A2, #0] ; [DPU_V7M3_PIPE] |325| .dwpsn file "../driverlib/uart.c",line 326,column 5,is_stmt,isa 1 ;---------------------------------------------------------------------- ; 326 | *pui32RxLevel = ui32Temp & UART_IFLS_RX_M; ;---------------------------------------------------------------------- LDR A1, [SP, #12] ; [DPU_V7M3_PIPE] |326| LDR A2, [SP, #8] ; [DPU_V7M3_PIPE] |326| AND A1, A1, #56 ; [DPU_V7M3_PIPE] |326| STR A1, [A2, #0] ; [DPU_V7M3_PIPE] |326| .dwpsn file "../driverlib/uart.c",line 327,column 1,is_stmt,isa 1 ADD SP, SP, #16 ; [DPU_V7M3_PIPE] .dwcfi cfa_offset, 0 $C$DW$45 .dwtag DW_TAG_TI_branch .dwattr $C$DW$45, DW_AT_low_pc(0x00) .dwattr $C$DW$45, DW_AT_TI_return BX LR ; [DPU_V7M3_PIPE] ; BRANCH OCCURS ; [] .dwattr $C$DW$37, DW_AT_TI_end_file("../driverlib/uart.c") .dwattr $C$DW$37, DW_AT_TI_end_line(0x147) .dwattr $C$DW$37, DW_AT_TI_end_column(0x01) .dwendentry .dwendtag $C$DW$37 .sect ".text" .clink .thumbfunc UARTConfigSetExpClk .thumb .global UARTConfigSetExpClk $C$DW$46 .dwtag DW_TAG_subprogram .dwattr $C$DW$46, DW_AT_name("UARTConfigSetExpClk") .dwattr $C$DW$46, DW_AT_low_pc(UARTConfigSetExpClk) .dwattr $C$DW$46, DW_AT_high_pc(0x00) .dwattr $C$DW$46, DW_AT_TI_symbol_name("UARTConfigSetExpClk") .dwattr $C$DW$46, DW_AT_external .dwattr $C$DW$46, DW_AT_TI_begin_file("../driverlib/uart.c") .dwattr $C$DW$46, DW_AT_TI_begin_line(0x175) .dwattr $C$DW$46, DW_AT_TI_begin_column(0x01) .dwattr $C$DW$46, DW_AT_decl_file("../driverlib/uart.c") .dwattr $C$DW$46, DW_AT_decl_line(0x175) .dwattr $C$DW$46, DW_AT_decl_column(0x01) .dwattr $C$DW$46, DW_AT_TI_max_frame_size(0x18) .dwpsn file "../driverlib/uart.c",line 375,column 1,is_stmt,address UARTConfigSetExpClk,isa 1 .dwfde $C$DW$CIE, UARTConfigSetExpClk $C$DW$47 .dwtag DW_TAG_formal_parameter .dwattr $C$DW$47, DW_AT_name("ui32Base") .dwattr $C$DW$47, DW_AT_TI_symbol_name("ui32Base") .dwattr $C$DW$47, DW_AT_type(*$C$DW$T$27) .dwattr $C$DW$47, DW_AT_location[DW_OP_reg0] $C$DW$48 .dwtag DW_TAG_formal_parameter .dwattr $C$DW$48, DW_AT_name("ui32UARTClk") .dwattr $C$DW$48, DW_AT_TI_symbol_name("ui32UARTClk") .dwattr $C$DW$48, DW_AT_type(*$C$DW$T$27) .dwattr $C$DW$48, DW_AT_location[DW_OP_reg1] $C$DW$49 .dwtag DW_TAG_formal_parameter .dwattr $C$DW$49, DW_AT_name("ui32Baud") .dwattr $C$DW$49, DW_AT_TI_symbol_name("ui32Baud") .dwattr $C$DW$49, DW_AT_type(*$C$DW$T$27) .dwattr $C$DW$49, DW_AT_location[DW_OP_reg2] $C$DW$50 .dwtag DW_TAG_formal_parameter .dwattr $C$DW$50, DW_AT_name("ui32Config") .dwattr $C$DW$50, DW_AT_TI_symbol_name("ui32Config") .dwattr $C$DW$50, DW_AT_type(*$C$DW$T$27) .dwattr $C$DW$50, DW_AT_location[DW_OP_reg3] ;---------------------------------------------------------------------- ; 373 | UARTConfigSetExpClk(uint32_t ui32Base, uint32_t ui32UARTClk, ; 374 | uint32_t ui32Baud, uint32_t ui32Config) ;---------------------------------------------------------------------- ;***************************************************************************** ;* FUNCTION NAME: UARTConfigSetExpClk * ;* * ;* Regs Modified : A1,A2,A3,A4,V9,SP,LR,SR,D0,D0_hi,D1,D1_hi,D2,D2_hi, * ;* D3,D3_hi,D4,D4_hi,D5,D5_hi,D6,D6_hi,D7,D7_hi, * ;* FPEXC,FPSCR * ;* Regs Used : A1,A2,A3,A4,V9,SP,LR,SR,D0,D0_hi,D1,D1_hi,D2,D2_hi, * ;* D3,D3_hi,D4,D4_hi,D5,D5_hi,D6,D6_hi,D7,D7_hi, * ;* FPEXC,FPSCR * ;* Local Frame Size : 0 Args + 20 Auto + 4 Save = 24 byte * ;***************************************************************************** UARTConfigSetExpClk: ;* --------------------------------------------------------------------------* .dwcfi cfa_offset, 0 PUSH {LR} ; [DPU_V7M3_PIPE] .dwcfi cfa_offset, 4 .dwcfi save_reg_to_mem, 14, -4 SUB SP, SP, #20 ; [DPU_V7M3_PIPE] .dwcfi cfa_offset, 24 $C$DW$51 .dwtag DW_TAG_variable .dwattr $C$DW$51, DW_AT_name("ui32Base") .dwattr $C$DW$51, DW_AT_TI_symbol_name("ui32Base") .dwattr $C$DW$51, DW_AT_type(*$C$DW$T$27) .dwattr $C$DW$51, DW_AT_location[DW_OP_breg13 0] $C$DW$52 .dwtag DW_TAG_variable .dwattr $C$DW$52, DW_AT_name("ui32UARTClk") .dwattr $C$DW$52, DW_AT_TI_symbol_name("ui32UARTClk") .dwattr $C$DW$52, DW_AT_type(*$C$DW$T$27) .dwattr $C$DW$52, DW_AT_location[DW_OP_breg13 4] $C$DW$53 .dwtag DW_TAG_variable .dwattr $C$DW$53, DW_AT_name("ui32Baud") .dwattr $C$DW$53, DW_AT_TI_symbol_name("ui32Baud") .dwattr $C$DW$53, DW_AT_type(*$C$DW$T$27) .dwattr $C$DW$53, DW_AT_location[DW_OP_breg13 8] $C$DW$54 .dwtag DW_TAG_variable .dwattr $C$DW$54, DW_AT_name("ui32Config") .dwattr $C$DW$54, DW_AT_TI_symbol_name("ui32Config") .dwattr $C$DW$54, DW_AT_type(*$C$DW$T$27) .dwattr $C$DW$54, DW_AT_location[DW_OP_breg13 12] $C$DW$55 .dwtag DW_TAG_variable .dwattr $C$DW$55, DW_AT_name("ui32Div") .dwattr $C$DW$55, DW_AT_TI_symbol_name("ui32Div") .dwattr $C$DW$55, DW_AT_type(*$C$DW$T$27) .dwattr $C$DW$55, DW_AT_location[DW_OP_breg13 16] ;---------------------------------------------------------------------- ; 376 | uint32_t ui32Div; ; 378 | // ; 379 | // Check the arguments. ; 380 | // ; 381 | ASSERT(_UARTBaseValid(ui32Base)); ; 382 | ASSERT(ui32Baud != 0); ; 383 | ASSERT(ui32UARTClk >= (ui32Baud * UART_CLK_DIVIDER)); ; 385 | // ; 386 | // Stop the UART. ; 387 | // ;---------------------------------------------------------------------- STR A4, [SP, #12] ; [DPU_V7M3_PIPE] |375| STR A3, [SP, #8] ; [DPU_V7M3_PIPE] |375| STR A2, [SP, #4] ; [DPU_V7M3_PIPE] |375| STR A1, [SP, #0] ; [DPU_V7M3_PIPE] |375| .dwpsn file "../driverlib/uart.c",line 388,column 5,is_stmt,isa 1 ;---------------------------------------------------------------------- ; 388 | UARTDisable(ui32Base); ; 390 | // ; 391 | // Is the required baud rate greater than the maximum rate supported ; 392 | // without the use of high speed mode? ; 393 | // ;---------------------------------------------------------------------- LDR A1, [SP, #0] ; [DPU_V7M3_PIPE] |388| $C$DW$56 .dwtag DW_TAG_TI_branch .dwattr $C$DW$56, DW_AT_low_pc(0x00) .dwattr $C$DW$56, DW_AT_name("UARTDisable") .dwattr $C$DW$56, DW_AT_TI_call BL UARTDisable ; [DPU_V7M3_PIPE] |388| ; CALL OCCURS {UARTDisable } ; [] |388| .dwpsn file "../driverlib/uart.c",line 394,column 5,is_stmt,isa 1 ;---------------------------------------------------------------------- ; 394 | if((ui32Baud * 16) > ui32UARTClk) ; 396 | // ; 397 | // Enable high speed mode. ; 398 | // ;---------------------------------------------------------------------- LDR A1, [SP, #4] ; [DPU_V7M3_PIPE] |394| LDR A2, [SP, #8] ; [DPU_V7M3_PIPE] |394| CMP A1, A2, LSL #4 ; [DPU_V7M3_PIPE] |394| BCS ||$C$L6|| ; [DPU_V7M3_PIPE] |394| ; BRANCHCC OCCURS {||$C$L6||} ; [] |394| ;* --------------------------------------------------------------------------* .dwpsn file "../driverlib/uart.c",line 399,column 9,is_stmt,isa 1 ;---------------------------------------------------------------------- ; 399 | HWREG(ui32Base + UART_O_CTL) |= UART_CTL_HSE; ; 401 | // ; 402 | // Half the supplied baud rate to compensate for enabling high speed ; 403 | // mode. This allows the following code to be common to both cases. ; 404 | // ;---------------------------------------------------------------------- LDR A1, [SP, #0] ; [DPU_V7M3_PIPE] |399| ADDS A1, A1, #48 ; [DPU_V7M3_PIPE] |399| LDR A2, [A1, #0] ; [DPU_V7M3_PIPE] |399| ORR A2, A2, #32 ; [DPU_V7M3_PIPE] |399| STR A2, [A1, #0] ; [DPU_V7M3_PIPE] |399| .dwpsn file "../driverlib/uart.c",line 405,column 9,is_stmt,isa 1 ;---------------------------------------------------------------------- ; 405 | ui32Baud /= 2; ;---------------------------------------------------------------------- LDR A1, [SP, #8] ; [DPU_V7M3_PIPE] |405| LSRS A1, A1, #1 ; [DPU_V7M3_PIPE] |405| STR A1, [SP, #8] ; [DPU_V7M3_PIPE] |405| .dwpsn file "../driverlib/uart.c",line 406,column 5,is_stmt,isa 1 ;---------------------------------------------------------------------- ; 407 | else ; 409 | // ; 410 | // Disable high speed mode. ; 411 | // ;---------------------------------------------------------------------- B ||$C$L7|| ; [DPU_V7M3_PIPE] |406| ; BRANCH OCCURS {||$C$L7||} ; [] |406| ;* --------------------------------------------------------------------------* ||$C$L6||: .dwpsn file "../driverlib/uart.c",line 412,column 9,is_stmt,isa 1 ;---------------------------------------------------------------------- ; 412 | HWREG(ui32Base + UART_O_CTL) &= ~(UART_CTL_HSE); ; 415 | // ; 416 | // Compute the fractional baud rate divider. ; 417 | // ;---------------------------------------------------------------------- LDR A1, [SP, #0] ; [DPU_V7M3_PIPE] |412| ADDS A1, A1, #48 ; [DPU_V7M3_PIPE] |412| LDR A2, [A1, #0] ; [DPU_V7M3_PIPE] |412| BIC A2, A2, #32 ; [DPU_V7M3_PIPE] |412| STR A2, [A1, #0] ; [DPU_V7M3_PIPE] |412| ;* --------------------------------------------------------------------------* ||$C$L7||: .dwpsn file "../driverlib/uart.c",line 418,column 5,is_stmt,isa 1 ;---------------------------------------------------------------------- ; 418 | ui32Div = (((ui32UARTClk * 8) / ui32Baud) + 1) / 2; ; 420 | // ; 421 | // Set the baud rate. ; 422 | // ;---------------------------------------------------------------------- LDR A1, [SP, #4] ; [DPU_V7M3_PIPE] |418| LDR A2, [SP, #8] ; [DPU_V7M3_PIPE] |418| LSLS A1, A1, #3 ; [DPU_V7M3_PIPE] |418| UDIV A1, A1, A2 ; [DPU_V7M3_PIPE] |418| ADDS A1, A1, #1 ; [DPU_V7M3_PIPE] |418| LSRS A1, A1, #1 ; [DPU_V7M3_PIPE] |418| STR A1, [SP, #16] ; [DPU_V7M3_PIPE] |418| .dwpsn file "../driverlib/uart.c",line 423,column 5,is_stmt,isa 1 ;---------------------------------------------------------------------- ; 423 | HWREG(ui32Base + UART_O_IBRD) = ui32Div / 64; ;---------------------------------------------------------------------- LDR A1, [SP, #16] ; [DPU_V7M3_PIPE] |423| LDR A2, [SP, #0] ; [DPU_V7M3_PIPE] |423| LSRS A1, A1, #6 ; [DPU_V7M3_PIPE] |423| STR A1, [A2, #36] ; [DPU_V7M3_PIPE] |423| .dwpsn file "../driverlib/uart.c",line 424,column 5,is_stmt,isa 1 ;---------------------------------------------------------------------- ; 424 | HWREG(ui32Base + UART_O_FBRD) = ui32Div % 64; ; 426 | // ; 427 | // Set parity, data length, and number of stop bits. ; 428 | // ;---------------------------------------------------------------------- LDR A1, [SP, #16] ; [DPU_V7M3_PIPE] |424| LDR A2, [SP, #0] ; [DPU_V7M3_PIPE] |424| AND A1, A1, #63 ; [DPU_V7M3_PIPE] |424| STR A1, [A2, #40] ; [DPU_V7M3_PIPE] |424| .dwpsn file "../driverlib/uart.c",line 429,column 5,is_stmt,isa 1 ;---------------------------------------------------------------------- ; 429 | HWREG(ui32Base + UART_O_LCRH) = ui32Config; ; 431 | // ; 432 | // Clear the flags register. ; 433 | // ;---------------------------------------------------------------------- LDR A1, [SP, #12] ; [DPU_V7M3_PIPE] |429| LDR A2, [SP, #0] ; [DPU_V7M3_PIPE] |429| STR A1, [A2, #44] ; [DPU_V7M3_PIPE] |429| .dwpsn file "../driverlib/uart.c",line 434,column 5,is_stmt,isa 1 ;---------------------------------------------------------------------- ; 434 | HWREG(ui32Base + UART_O_FR) = 0; ; 436 | // ; 437 | // Start the UART. ; 438 | // ;---------------------------------------------------------------------- LDR A1, [SP, #0] ; [DPU_V7M3_PIPE] |434| MOVS A2, #0 ; [DPU_V7M3_PIPE] |434| STR A2, [A1, #24] ; [DPU_V7M3_PIPE] |434| .dwpsn file "../driverlib/uart.c",line 439,column 5,is_stmt,isa 1 ;---------------------------------------------------------------------- ; 439 | UARTEnable(ui32Base); ;---------------------------------------------------------------------- LDR A1, [SP, #0] ; [DPU_V7M3_PIPE] |439| $C$DW$57 .dwtag DW_TAG_TI_branch .dwattr $C$DW$57, DW_AT_low_pc(0x00) .dwattr $C$DW$57, DW_AT_name("UARTEnable") .dwattr $C$DW$57, DW_AT_TI_call BL UARTEnable ; [DPU_V7M3_PIPE] |439| ; CALL OCCURS {UARTEnable } ; [] |439| .dwpsn file "../driverlib/uart.c",line 440,column 1,is_stmt,isa 1 ADD SP, SP, #20 ; [DPU_V7M3_PIPE] .dwcfi cfa_offset, 4 $C$DW$58 .dwtag DW_TAG_TI_branch .dwattr $C$DW$58, DW_AT_low_pc(0x00) .dwattr $C$DW$58, DW_AT_TI_return POP {PC} ; [DPU_V7M3_PIPE] .dwcfi cfa_offset, 0 ; BRANCH OCCURS ; [] .dwattr $C$DW$46, DW_AT_TI_end_file("../driverlib/uart.c") .dwattr $C$DW$46, DW_AT_TI_end_line(0x1b8) .dwattr $C$DW$46, DW_AT_TI_end_column(0x01) .dwendentry .dwendtag $C$DW$46 .sect ".text" .clink .thumbfunc UARTConfigGetExpClk .thumb .global UARTConfigGetExpClk $C$DW$59 .dwtag DW_TAG_subprogram .dwattr $C$DW$59, DW_AT_name("UARTConfigGetExpClk") .dwattr $C$DW$59, DW_AT_low_pc(UARTConfigGetExpClk) .dwattr $C$DW$59, DW_AT_high_pc(0x00) .dwattr $C$DW$59, DW_AT_TI_symbol_name("UARTConfigGetExpClk") .dwattr $C$DW$59, DW_AT_external .dwattr $C$DW$59, DW_AT_TI_begin_file("../driverlib/uart.c") .dwattr $C$DW$59, DW_AT_TI_begin_line(0x1da) .dwattr $C$DW$59, DW_AT_TI_begin_column(0x01) .dwattr $C$DW$59, DW_AT_decl_file("../driverlib/uart.c") .dwattr $C$DW$59, DW_AT_decl_line(0x1da) .dwattr $C$DW$59, DW_AT_decl_column(0x01) .dwattr $C$DW$59, DW_AT_TI_max_frame_size(0x18) .dwpsn file "../driverlib/uart.c",line 476,column 1,is_stmt,address UARTConfigGetExpClk,isa 1 .dwfde $C$DW$CIE, UARTConfigGetExpClk $C$DW$60 .dwtag DW_TAG_formal_parameter .dwattr $C$DW$60, DW_AT_name("ui32Base") .dwattr $C$DW$60, DW_AT_TI_symbol_name("ui32Base") .dwattr $C$DW$60, DW_AT_type(*$C$DW$T$27) .dwattr $C$DW$60, DW_AT_location[DW_OP_reg0] $C$DW$61 .dwtag DW_TAG_formal_parameter .dwattr $C$DW$61, DW_AT_name("ui32UARTClk") .dwattr $C$DW$61, DW_AT_TI_symbol_name("ui32UARTClk") .dwattr $C$DW$61, DW_AT_type(*$C$DW$T$27) .dwattr $C$DW$61, DW_AT_location[DW_OP_reg1] $C$DW$62 .dwtag DW_TAG_formal_parameter .dwattr $C$DW$62, DW_AT_name("pui32Baud") .dwattr $C$DW$62, DW_AT_TI_symbol_name("pui32Baud") .dwattr $C$DW$62, DW_AT_type(*$C$DW$T$34) .dwattr $C$DW$62, DW_AT_location[DW_OP_reg2] $C$DW$63 .dwtag DW_TAG_formal_parameter .dwattr $C$DW$63, DW_AT_name("pui32Config") .dwattr $C$DW$63, DW_AT_TI_symbol_name("pui32Config") .dwattr $C$DW$63, DW_AT_type(*$C$DW$T$34) .dwattr $C$DW$63, DW_AT_location[DW_OP_reg3] ;---------------------------------------------------------------------- ; 474 | UARTConfigGetExpClk(uint32_t ui32Base, uint32_t ui32UARTClk, ; 475 | uint32_t *pui32Baud, uint32_t *pui32Config) ;---------------------------------------------------------------------- ;***************************************************************************** ;* FUNCTION NAME: UARTConfigGetExpClk * ;* * ;* Regs Modified : A1,A2,A3,A4,SP,SR * ;* Regs Used : A1,A2,A3,A4,SP,LR,SR * ;* Local Frame Size : 0 Args + 24 Auto + 0 Save = 24 byte * ;***************************************************************************** UARTConfigGetExpClk: ;* --------------------------------------------------------------------------* .dwcfi cfa_offset, 0 SUB SP, SP, #24 ; [DPU_V7M3_PIPE] .dwcfi cfa_offset, 24 $C$DW$64 .dwtag DW_TAG_variable .dwattr $C$DW$64, DW_AT_name("ui32Base") .dwattr $C$DW$64, DW_AT_TI_symbol_name("ui32Base") .dwattr $C$DW$64, DW_AT_type(*$C$DW$T$27) .dwattr $C$DW$64, DW_AT_location[DW_OP_breg13 0] $C$DW$65 .dwtag DW_TAG_variable .dwattr $C$DW$65, DW_AT_name("ui32UARTClk") .dwattr $C$DW$65, DW_AT_TI_symbol_name("ui32UARTClk") .dwattr $C$DW$65, DW_AT_type(*$C$DW$T$27) .dwattr $C$DW$65, DW_AT_location[DW_OP_breg13 4] $C$DW$66 .dwtag DW_TAG_variable .dwattr $C$DW$66, DW_AT_name("pui32Baud") .dwattr $C$DW$66, DW_AT_TI_symbol_name("pui32Baud") .dwattr $C$DW$66, DW_AT_type(*$C$DW$T$34) .dwattr $C$DW$66, DW_AT_location[DW_OP_breg13 8] $C$DW$67 .dwtag DW_TAG_variable .dwattr $C$DW$67, DW_AT_name("pui32Config") .dwattr $C$DW$67, DW_AT_TI_symbol_name("pui32Config") .dwattr $C$DW$67, DW_AT_type(*$C$DW$T$34) .dwattr $C$DW$67, DW_AT_location[DW_OP_breg13 12] $C$DW$68 .dwtag DW_TAG_variable .dwattr $C$DW$68, DW_AT_name("ui32Int") .dwattr $C$DW$68, DW_AT_TI_symbol_name("ui32Int") .dwattr $C$DW$68, DW_AT_type(*$C$DW$T$27) .dwattr $C$DW$68, DW_AT_location[DW_OP_breg13 16] $C$DW$69 .dwtag DW_TAG_variable .dwattr $C$DW$69, DW_AT_name("ui32Frac") .dwattr $C$DW$69, DW_AT_TI_symbol_name("ui32Frac") .dwattr $C$DW$69, DW_AT_type(*$C$DW$T$27) .dwattr $C$DW$69, DW_AT_location[DW_OP_breg13 20] ;---------------------------------------------------------------------- ; 477 | uint32_t ui32Int, ui32Frac; ; 479 | // ; 480 | // Check the arguments. ; 481 | // ; 482 | ASSERT(_UARTBaseValid(ui32Base)); ; 484 | // ; 485 | // Compute the baud rate. ; 486 | // ;---------------------------------------------------------------------- STR A4, [SP, #12] ; [DPU_V7M3_PIPE] |476| STR A3, [SP, #8] ; [DPU_V7M3_PIPE] |476| STR A2, [SP, #4] ; [DPU_V7M3_PIPE] |476| STR A1, [SP, #0] ; [DPU_V7M3_PIPE] |476| .dwpsn file "../driverlib/uart.c",line 487,column 5,is_stmt,isa 1 ;---------------------------------------------------------------------- ; 487 | ui32Int = HWREG(ui32Base + UART_O_IBRD); ;---------------------------------------------------------------------- LDR A1, [SP, #0] ; [DPU_V7M3_PIPE] |487| LDR A1, [A1, #36] ; [DPU_V7M3_PIPE] |487| STR A1, [SP, #16] ; [DPU_V7M3_PIPE] |487| .dwpsn file "../driverlib/uart.c",line 488,column 5,is_stmt,isa 1 ;---------------------------------------------------------------------- ; 488 | ui32Frac = HWREG(ui32Base + UART_O_FBRD); ;---------------------------------------------------------------------- LDR A1, [SP, #0] ; [DPU_V7M3_PIPE] |488| LDR A1, [A1, #40] ; [DPU_V7M3_PIPE] |488| STR A1, [SP, #20] ; [DPU_V7M3_PIPE] |488| .dwpsn file "../driverlib/uart.c",line 489,column 5,is_stmt,isa 1 ;---------------------------------------------------------------------- ; 489 | *pui32Baud = (ui32UARTClk * 4) / ((64 * ui32Int) + ui32Frac); ; 491 | // ; 492 | // See if high speed mode enabled. ; 493 | // ;---------------------------------------------------------------------- LDR A2, [SP, #4] ; [DPU_V7M3_PIPE] |489| LDR A4, [SP, #16] ; [DPU_V7M3_PIPE] |489| LDR A1, [SP, #20] ; [DPU_V7M3_PIPE] |489| LDR A3, [SP, #8] ; [DPU_V7M3_PIPE] |489| LSLS A2, A2, #2 ; [DPU_V7M3_PIPE] |489| ADD A1, A1, A4, LSL #6 ; [DPU_V7M3_PIPE] |489| UDIV A1, A2, A1 ; [DPU_V7M3_PIPE] |489| STR A1, [A3, #0] ; [DPU_V7M3_PIPE] |489| .dwpsn file "../driverlib/uart.c",line 494,column 5,is_stmt,isa 1 ;---------------------------------------------------------------------- ; 494 | if(HWREG(ui32Base + UART_O_CTL) & UART_CTL_HSE) ; 496 | // ; 497 | // High speed mode is enabled so the actual baud rate is actually ; 498 | // double what was just calculated. ; 499 | // ;---------------------------------------------------------------------- LDR A1, [SP, #0] ; [DPU_V7M3_PIPE] |494| LDR A1, [A1, #48] ; [DPU_V7M3_PIPE] |494| LSRS A1, A1, #6 ; [DPU_V7M3_PIPE] |494| BCC ||$C$L8|| ; [DPU_V7M3_PIPE] |494| ; BRANCHCC OCCURS {||$C$L8||} ; [] |494| ;* --------------------------------------------------------------------------* .dwpsn file "../driverlib/uart.c",line 500,column 9,is_stmt,isa 1 ;---------------------------------------------------------------------- ; 500 | *pui32Baud *= 2; ; 503 | // ; 504 | // Get the parity, data length, and number of stop bits. ; 505 | // ;---------------------------------------------------------------------- LDR A1, [SP, #8] ; [DPU_V7M3_PIPE] |500| LDR A2, [A1, #0] ; [DPU_V7M3_PIPE] |500| LSLS A2, A2, #1 ; [DPU_V7M3_PIPE] |500| STR A2, [A1, #0] ; [DPU_V7M3_PIPE] |500| ;* --------------------------------------------------------------------------* ||$C$L8||: .dwpsn file "../driverlib/uart.c",line 506,column 5,is_stmt,isa 1 ;---------------------------------------------------------------------- ; 506 | *pui32Config = (HWREG(ui32Base + UART_O_LCRH) & ; 507 | (UART_LCRH_SPS | UART_LCRH_WLEN_M | UART_LCRH_STP2 | ; 508 | UART_LCRH_EPS | UART_LCRH_PEN)); ;---------------------------------------------------------------------- LDR A1, [SP, #0] ; [DPU_V7M3_PIPE] |506| LDR A2, [SP, #12] ; [DPU_V7M3_PIPE] |506| LDR A1, [A1, #44] ; [DPU_V7M3_PIPE] |506| AND A1, A1, #238 ; [DPU_V7M3_PIPE] |506| STR A1, [A2, #0] ; [DPU_V7M3_PIPE] |506| .dwpsn file "../driverlib/uart.c",line 509,column 1,is_stmt,isa 1 ADD SP, SP, #24 ; [DPU_V7M3_PIPE] .dwcfi cfa_offset, 0 $C$DW$70 .dwtag DW_TAG_TI_branch .dwattr $C$DW$70, DW_AT_low_pc(0x00) .dwattr $C$DW$70, DW_AT_TI_return BX LR ; [DPU_V7M3_PIPE] ; BRANCH OCCURS ; [] .dwattr $C$DW$59, DW_AT_TI_end_file("../driverlib/uart.c") .dwattr $C$DW$59, DW_AT_TI_end_line(0x1fd) .dwattr $C$DW$59, DW_AT_TI_end_column(0x01) .dwendentry .dwendtag $C$DW$59 .sect ".text" .clink .thumbfunc UARTEnable .thumb .global UARTEnable $C$DW$71 .dwtag DW_TAG_subprogram .dwattr $C$DW$71, DW_AT_name("UARTEnable") .dwattr $C$DW$71, DW_AT_low_pc(UARTEnable) .dwattr $C$DW$71, DW_AT_high_pc(0x00) .dwattr $C$DW$71, DW_AT_TI_symbol_name("UARTEnable") .dwattr $C$DW$71, DW_AT_external .dwattr $C$DW$71, DW_AT_TI_begin_file("../driverlib/uart.c") .dwattr $C$DW$71, DW_AT_TI_begin_line(0x20b) .dwattr $C$DW$71, DW_AT_TI_begin_column(0x01) .dwattr $C$DW$71, DW_AT_decl_file("../driverlib/uart.c") .dwattr $C$DW$71, DW_AT_decl_line(0x20b) .dwattr $C$DW$71, DW_AT_decl_column(0x01) .dwattr $C$DW$71, DW_AT_TI_max_frame_size(0x08) .dwpsn file "../driverlib/uart.c",line 524,column 1,is_stmt,address UARTEnable,isa 1 .dwfde $C$DW$CIE, UARTEnable $C$DW$72 .dwtag DW_TAG_formal_parameter .dwattr $C$DW$72, DW_AT_name("ui32Base") .dwattr $C$DW$72, DW_AT_TI_symbol_name("ui32Base") .dwattr $C$DW$72, DW_AT_type(*$C$DW$T$27) .dwattr $C$DW$72, DW_AT_location[DW_OP_reg0] ;---------------------------------------------------------------------- ; 523 | UARTEnable(uint32_t ui32Base) ;---------------------------------------------------------------------- ;***************************************************************************** ;* FUNCTION NAME: UARTEnable * ;* * ;* Regs Modified : A1,A2,A3,SP,SR * ;* Regs Used : A1,A2,A3,SP,LR,SR * ;* Local Frame Size : 0 Args + 4 Auto + 0 Save = 4 byte * ;***************************************************************************** UARTEnable: ;* --------------------------------------------------------------------------* .dwcfi cfa_offset, 0 SUB SP, SP, #8 ; [DPU_V7M3_PIPE] .dwcfi cfa_offset, 8 $C$DW$73 .dwtag DW_TAG_variable .dwattr $C$DW$73, DW_AT_name("ui32Base") .dwattr $C$DW$73, DW_AT_TI_symbol_name("ui32Base") .dwattr $C$DW$73, DW_AT_type(*$C$DW$T$27) .dwattr $C$DW$73, DW_AT_location[DW_OP_breg13 0] ;---------------------------------------------------------------------- ; 525 | // ; 526 | // Check the arguments. ; 527 | // ; 528 | ASSERT(_UARTBaseValid(ui32Base)); ; 530 | // ; 531 | // Enable the FIFO. ; 532 | // ;---------------------------------------------------------------------- STR A1, [SP, #0] ; [DPU_V7M3_PIPE] |524| .dwpsn file "../driverlib/uart.c",line 533,column 5,is_stmt,isa 1 ;---------------------------------------------------------------------- ; 533 | HWREG(ui32Base + UART_O_LCRH) |= UART_LCRH_FEN; ; 535 | // ; 536 | // Enable RX, TX, and the UART. ; 537 | // ;---------------------------------------------------------------------- LDR A1, [SP, #0] ; [DPU_V7M3_PIPE] |533| ADDS A1, A1, #44 ; [DPU_V7M3_PIPE] |533| LDR A2, [A1, #0] ; [DPU_V7M3_PIPE] |533| ORR A2, A2, #16 ; [DPU_V7M3_PIPE] |533| STR A2, [A1, #0] ; [DPU_V7M3_PIPE] |533| .dwpsn file "../driverlib/uart.c",line 538,column 5,is_stmt,isa 1 ;---------------------------------------------------------------------- ; 538 | HWREG(ui32Base + UART_O_CTL) |= (UART_CTL_UARTEN | UART_CTL_TXE | ; 539 | UART_CTL_RXE); ;---------------------------------------------------------------------- LDR A1, [SP, #0] ; [DPU_V7M3_PIPE] |538| ADDS A1, A1, #48 ; [DPU_V7M3_PIPE] |538| LDR A3, [A1, #0] ; [DPU_V7M3_PIPE] |538| MOV A2, #769 ; [DPU_V7M3_PIPE] |538| ORRS A2, A2, A3 ; [DPU_V7M3_PIPE] |538| STR A2, [A1, #0] ; [DPU_V7M3_PIPE] |538| .dwpsn file "../driverlib/uart.c",line 540,column 1,is_stmt,isa 1 ADD SP, SP, #8 ; [DPU_V7M3_PIPE] .dwcfi cfa_offset, 0 $C$DW$74 .dwtag DW_TAG_TI_branch .dwattr $C$DW$74, DW_AT_low_pc(0x00) .dwattr $C$DW$74, DW_AT_TI_return BX LR ; [DPU_V7M3_PIPE] ; BRANCH OCCURS ; [] .dwattr $C$DW$71, DW_AT_TI_end_file("../driverlib/uart.c") .dwattr $C$DW$71, DW_AT_TI_end_line(0x21c) .dwattr $C$DW$71, DW_AT_TI_end_column(0x01) .dwendentry .dwendtag $C$DW$71 .sect ".text" .clink .thumbfunc UARTDisable .thumb .global UARTDisable $C$DW$75 .dwtag DW_TAG_subprogram .dwattr $C$DW$75, DW_AT_name("UARTDisable") .dwattr $C$DW$75, DW_AT_low_pc(UARTDisable) .dwattr $C$DW$75, DW_AT_high_pc(0x00) .dwattr $C$DW$75, DW_AT_TI_symbol_name("UARTDisable") .dwattr $C$DW$75, DW_AT_external .dwattr $C$DW$75, DW_AT_TI_begin_file("../driverlib/uart.c") .dwattr $C$DW$75, DW_AT_TI_begin_line(0x22b) .dwattr $C$DW$75, DW_AT_TI_begin_column(0x01) .dwattr $C$DW$75, DW_AT_decl_file("../driverlib/uart.c") .dwattr $C$DW$75, DW_AT_decl_line(0x22b) .dwattr $C$DW$75, DW_AT_decl_column(0x01) .dwattr $C$DW$75, DW_AT_TI_max_frame_size(0x08) .dwpsn file "../driverlib/uart.c",line 556,column 1,is_stmt,address UARTDisable,isa 1 .dwfde $C$DW$CIE, UARTDisable $C$DW$76 .dwtag DW_TAG_formal_parameter .dwattr $C$DW$76, DW_AT_name("ui32Base") .dwattr $C$DW$76, DW_AT_TI_symbol_name("ui32Base") .dwattr $C$DW$76, DW_AT_type(*$C$DW$T$27) .dwattr $C$DW$76, DW_AT_location[DW_OP_reg0] ;---------------------------------------------------------------------- ; 555 | UARTDisable(uint32_t ui32Base) ;---------------------------------------------------------------------- ;***************************************************************************** ;* FUNCTION NAME: UARTDisable * ;* * ;* Regs Modified : A1,A2,A3,SP,SR * ;* Regs Used : A1,A2,A3,SP,LR,SR * ;* Local Frame Size : 0 Args + 4 Auto + 0 Save = 4 byte * ;***************************************************************************** UARTDisable: ;* --------------------------------------------------------------------------* .dwcfi cfa_offset, 0 SUB SP, SP, #8 ; [DPU_V7M3_PIPE] .dwcfi cfa_offset, 8 $C$DW$77 .dwtag DW_TAG_variable .dwattr $C$DW$77, DW_AT_name("ui32Base") .dwattr $C$DW$77, DW_AT_TI_symbol_name("ui32Base") .dwattr $C$DW$77, DW_AT_type(*$C$DW$T$27) .dwattr $C$DW$77, DW_AT_location[DW_OP_breg13 0] ;---------------------------------------------------------------------- ; 557 | // ; 558 | // Check the arguments. ; 559 | // ; 560 | ASSERT(_UARTBaseValid(ui32Base)); ; 562 | // ; 563 | // Wait for end of TX. ; 564 | // ;---------------------------------------------------------------------- STR A1, [SP, #0] ; [DPU_V7M3_PIPE] |556| .dwpsn file "../driverlib/uart.c",line 565,column 5,is_stmt,isa 1 ;---------------------------------------------------------------------- ; 565 | while(HWREG(ui32Base + UART_O_FR) & UART_FR_BUSY) ; 569 | // ; 570 | // Disable the FIFO. ; 571 | // ;---------------------------------------------------------------------- ;* --------------------------------------------------------------------------* ;* BEGIN LOOP ||$C$L9|| ;* ;* Loop source line : 565 ;* Loop closing brace source line : 567 ;* Known Minimum Trip Count : 1 ;* Known Maximum Trip Count : 4294967295 ;* Known Max Trip Count Factor : 1 ;* --------------------------------------------------------------------------* ||$C$L9||: LDR A1, [SP, #0] ; [DPU_V7M3_PIPE] |565| LDR A1, [A1, #24] ; [DPU_V7M3_PIPE] |565| LSRS A1, A1, #4 ; [DPU_V7M3_PIPE] |565| BCS ||$C$L9|| ; [DPU_V7M3_PIPE] |565| ; BRANCHCC OCCURS {||$C$L9||} ; [] |565| ;* --------------------------------------------------------------------------* .dwpsn file "../driverlib/uart.c",line 572,column 5,is_stmt,isa 1 ;---------------------------------------------------------------------- ; 572 | HWREG(ui32Base + UART_O_LCRH) &= ~(UART_LCRH_FEN); ; 574 | // ; 575 | // Disable the UART. ; 576 | // ;---------------------------------------------------------------------- LDR A1, [SP, #0] ; [DPU_V7M3_PIPE] |572| ADDS A1, A1, #44 ; [DPU_V7M3_PIPE] |572| LDR A2, [A1, #0] ; [DPU_V7M3_PIPE] |572| BIC A2, A2, #16 ; [DPU_V7M3_PIPE] |572| STR A2, [A1, #0] ; [DPU_V7M3_PIPE] |572| .dwpsn file "../driverlib/uart.c",line 577,column 5,is_stmt,isa 1 ;---------------------------------------------------------------------- ; 577 | HWREG(ui32Base + UART_O_CTL) &= ~(UART_CTL_UARTEN | UART_CTL_TXE | ; 578 | UART_CTL_RXE); ;---------------------------------------------------------------------- LDR A1, [SP, #0] ; [DPU_V7M3_PIPE] |577| LDR A2, $C$CON6 ; [DPU_V7M3_PIPE] |577| ADDS A1, A1, #48 ; [DPU_V7M3_PIPE] |577| LDR A3, [A1, #0] ; [DPU_V7M3_PIPE] |577| ANDS A2, A2, A3 ; [DPU_V7M3_PIPE] |577| STR A2, [A1, #0] ; [DPU_V7M3_PIPE] |577| .dwpsn file "../driverlib/uart.c",line 579,column 1,is_stmt,isa 1 ADD SP, SP, #8 ; [DPU_V7M3_PIPE] .dwcfi cfa_offset, 0 $C$DW$78 .dwtag DW_TAG_TI_branch .dwattr $C$DW$78, DW_AT_low_pc(0x00) .dwattr $C$DW$78, DW_AT_TI_return BX LR ; [DPU_V7M3_PIPE] ; BRANCH OCCURS ; [] .dwattr $C$DW$75, DW_AT_TI_end_file("../driverlib/uart.c") .dwattr $C$DW$75, DW_AT_TI_end_line(0x243) .dwattr $C$DW$75, DW_AT_TI_end_column(0x01) .dwendentry .dwendtag $C$DW$75 .sect ".text" .clink .thumbfunc UARTFIFOEnable .thumb .global UARTFIFOEnable $C$DW$79 .dwtag DW_TAG_subprogram .dwattr $C$DW$79, DW_AT_name("UARTFIFOEnable") .dwattr $C$DW$79, DW_AT_low_pc(UARTFIFOEnable) .dwattr $C$DW$79, DW_AT_high_pc(0x00) .dwattr $C$DW$79, DW_AT_TI_symbol_name("UARTFIFOEnable") .dwattr $C$DW$79, DW_AT_external .dwattr $C$DW$79, DW_AT_TI_begin_file("../driverlib/uart.c") .dwattr $C$DW$79, DW_AT_TI_begin_line(0x251) .dwattr $C$DW$79, DW_AT_TI_begin_column(0x01) .dwattr $C$DW$79, DW_AT_decl_file("../driverlib/uart.c") .dwattr $C$DW$79, DW_AT_decl_line(0x251) .dwattr $C$DW$79, DW_AT_decl_column(0x01) .dwattr $C$DW$79, DW_AT_TI_max_frame_size(0x08) .dwpsn file "../driverlib/uart.c",line 594,column 1,is_stmt,address UARTFIFOEnable,isa 1 .dwfde $C$DW$CIE, UARTFIFOEnable $C$DW$80 .dwtag DW_TAG_formal_parameter .dwattr $C$DW$80, DW_AT_name("ui32Base") .dwattr $C$DW$80, DW_AT_TI_symbol_name("ui32Base") .dwattr $C$DW$80, DW_AT_type(*$C$DW$T$27) .dwattr $C$DW$80, DW_AT_location[DW_OP_reg0] ;---------------------------------------------------------------------- ; 593 | UARTFIFOEnable(uint32_t ui32Base) ;---------------------------------------------------------------------- ;***************************************************************************** ;* FUNCTION NAME: UARTFIFOEnable * ;* * ;* Regs Modified : A1,A2,SP,SR * ;* Regs Used : A1,A2,SP,LR,SR * ;* Local Frame Size : 0 Args + 4 Auto + 0 Save = 4 byte * ;***************************************************************************** UARTFIFOEnable: ;* --------------------------------------------------------------------------* .dwcfi cfa_offset, 0 SUB SP, SP, #8 ; [DPU_V7M3_PIPE] .dwcfi cfa_offset, 8 $C$DW$81 .dwtag DW_TAG_variable .dwattr $C$DW$81, DW_AT_name("ui32Base") .dwattr $C$DW$81, DW_AT_TI_symbol_name("ui32Base") .dwattr $C$DW$81, DW_AT_type(*$C$DW$T$27) .dwattr $C$DW$81, DW_AT_location[DW_OP_breg13 0] ;---------------------------------------------------------------------- ; 595 | // ; 596 | // Check the arguments. ; 597 | // ; 598 | ASSERT(_UARTBaseValid(ui32Base)); ; 600 | // ; 601 | // Enable the FIFO. ; 602 | // ;---------------------------------------------------------------------- STR A1, [SP, #0] ; [DPU_V7M3_PIPE] |594| .dwpsn file "../driverlib/uart.c",line 603,column 5,is_stmt,isa 1 ;---------------------------------------------------------------------- ; 603 | HWREG(ui32Base + UART_O_LCRH) |= UART_LCRH_FEN; ;---------------------------------------------------------------------- LDR A1, [SP, #0] ; [DPU_V7M3_PIPE] |603| ADDS A1, A1, #44 ; [DPU_V7M3_PIPE] |603| LDR A2, [A1, #0] ; [DPU_V7M3_PIPE] |603| ORR A2, A2, #16 ; [DPU_V7M3_PIPE] |603| STR A2, [A1, #0] ; [DPU_V7M3_PIPE] |603| .dwpsn file "../driverlib/uart.c",line 604,column 1,is_stmt,isa 1 ADD SP, SP, #8 ; [DPU_V7M3_PIPE] .dwcfi cfa_offset, 0 $C$DW$82 .dwtag DW_TAG_TI_branch .dwattr $C$DW$82, DW_AT_low_pc(0x00) .dwattr $C$DW$82, DW_AT_TI_return BX LR ; [DPU_V7M3_PIPE] ; BRANCH OCCURS ; [] .dwattr $C$DW$79, DW_AT_TI_end_file("../driverlib/uart.c") .dwattr $C$DW$79, DW_AT_TI_end_line(0x25c) .dwattr $C$DW$79, DW_AT_TI_end_column(0x01) .dwendentry .dwendtag $C$DW$79 .sect ".text" .clink .thumbfunc UARTFIFODisable .thumb .global UARTFIFODisable $C$DW$83 .dwtag DW_TAG_subprogram .dwattr $C$DW$83, DW_AT_name("UARTFIFODisable") .dwattr $C$DW$83, DW_AT_low_pc(UARTFIFODisable) .dwattr $C$DW$83, DW_AT_high_pc(0x00) .dwattr $C$DW$83, DW_AT_TI_symbol_name("UARTFIFODisable") .dwattr $C$DW$83, DW_AT_external .dwattr $C$DW$83, DW_AT_TI_begin_file("../driverlib/uart.c") .dwattr $C$DW$83, DW_AT_TI_begin_line(0x26a) .dwattr $C$DW$83, DW_AT_TI_begin_column(0x01) .dwattr $C$DW$83, DW_AT_decl_file("../driverlib/uart.c") .dwattr $C$DW$83, DW_AT_decl_line(0x26a) .dwattr $C$DW$83, DW_AT_decl_column(0x01) .dwattr $C$DW$83, DW_AT_TI_max_frame_size(0x08) .dwpsn file "../driverlib/uart.c",line 619,column 1,is_stmt,address UARTFIFODisable,isa 1 .dwfde $C$DW$CIE, UARTFIFODisable $C$DW$84 .dwtag DW_TAG_formal_parameter .dwattr $C$DW$84, DW_AT_name("ui32Base") .dwattr $C$DW$84, DW_AT_TI_symbol_name("ui32Base") .dwattr $C$DW$84, DW_AT_type(*$C$DW$T$27) .dwattr $C$DW$84, DW_AT_location[DW_OP_reg0] ;---------------------------------------------------------------------- ; 618 | UARTFIFODisable(uint32_t ui32Base) ;---------------------------------------------------------------------- ;***************************************************************************** ;* FUNCTION NAME: UARTFIFODisable * ;* * ;* Regs Modified : A1,A2,SP,SR * ;* Regs Used : A1,A2,SP,LR,SR * ;* Local Frame Size : 0 Args + 4 Auto + 0 Save = 4 byte * ;***************************************************************************** UARTFIFODisable: ;* --------------------------------------------------------------------------* .dwcfi cfa_offset, 0 SUB SP, SP, #8 ; [DPU_V7M3_PIPE] .dwcfi cfa_offset, 8 $C$DW$85 .dwtag DW_TAG_variable .dwattr $C$DW$85, DW_AT_name("ui32Base") .dwattr $C$DW$85, DW_AT_TI_symbol_name("ui32Base") .dwattr $C$DW$85, DW_AT_type(*$C$DW$T$27) .dwattr $C$DW$85, DW_AT_location[DW_OP_breg13 0] ;---------------------------------------------------------------------- ; 620 | // ; 621 | // Check the arguments. ; 622 | // ; 623 | ASSERT(_UARTBaseValid(ui32Base)); ; 625 | // ; 626 | // Disable the FIFO. ; 627 | // ;---------------------------------------------------------------------- STR A1, [SP, #0] ; [DPU_V7M3_PIPE] |619| .dwpsn file "../driverlib/uart.c",line 628,column 5,is_stmt,isa 1 ;---------------------------------------------------------------------- ; 628 | HWREG(ui32Base + UART_O_LCRH) &= ~(UART_LCRH_FEN); ;---------------------------------------------------------------------- LDR A1, [SP, #0] ; [DPU_V7M3_PIPE] |628| ADDS A1, A1, #44 ; [DPU_V7M3_PIPE] |628| LDR A2, [A1, #0] ; [DPU_V7M3_PIPE] |628| BIC A2, A2, #16 ; [DPU_V7M3_PIPE] |628| STR A2, [A1, #0] ; [DPU_V7M3_PIPE] |628| .dwpsn file "../driverlib/uart.c",line 629,column 1,is_stmt,isa 1 ADD SP, SP, #8 ; [DPU_V7M3_PIPE] .dwcfi cfa_offset, 0 $C$DW$86 .dwtag DW_TAG_TI_branch .dwattr $C$DW$86, DW_AT_low_pc(0x00) .dwattr $C$DW$86, DW_AT_TI_return BX LR ; [DPU_V7M3_PIPE] ; BRANCH OCCURS ; [] .dwattr $C$DW$83, DW_AT_TI_end_file("../driverlib/uart.c") .dwattr $C$DW$83, DW_AT_TI_end_line(0x275) .dwattr $C$DW$83, DW_AT_TI_end_column(0x01) .dwendentry .dwendtag $C$DW$83 .sect ".text" .clink .thumbfunc UARTEnableSIR .thumb .global UARTEnableSIR $C$DW$87 .dwtag DW_TAG_subprogram .dwattr $C$DW$87, DW_AT_name("UARTEnableSIR") .dwattr $C$DW$87, DW_AT_low_pc(UARTEnableSIR) .dwattr $C$DW$87, DW_AT_high_pc(0x00) .dwattr $C$DW$87, DW_AT_TI_symbol_name("UARTEnableSIR") .dwattr $C$DW$87, DW_AT_external .dwattr $C$DW$87, DW_AT_TI_begin_file("../driverlib/uart.c") .dwattr $C$DW$87, DW_AT_TI_begin_line(0x28e) .dwattr $C$DW$87, DW_AT_TI_begin_column(0x01) .dwattr $C$DW$87, DW_AT_decl_file("../driverlib/uart.c") .dwattr $C$DW$87, DW_AT_decl_line(0x28e) .dwattr $C$DW$87, DW_AT_decl_column(0x01) .dwattr $C$DW$87, DW_AT_TI_max_frame_size(0x08) .dwpsn file "../driverlib/uart.c",line 655,column 1,is_stmt,address UARTEnableSIR,isa 1 .dwfde $C$DW$CIE, UARTEnableSIR $C$DW$88 .dwtag DW_TAG_formal_parameter .dwattr $C$DW$88, DW_AT_name("ui32Base") .dwattr $C$DW$88, DW_AT_TI_symbol_name("ui32Base") .dwattr $C$DW$88, DW_AT_type(*$C$DW$T$27) .dwattr $C$DW$88, DW_AT_location[DW_OP_reg0] $C$DW$89 .dwtag DW_TAG_formal_parameter .dwattr $C$DW$89, DW_AT_name("bLowPower") .dwattr $C$DW$89, DW_AT_TI_symbol_name("bLowPower") .dwattr $C$DW$89, DW_AT_type(*$C$DW$T$38) .dwattr $C$DW$89, DW_AT_location[DW_OP_reg1] ;---------------------------------------------------------------------- ; 654 | UARTEnableSIR(uint32_t ui32Base, bool bLowPower) ;---------------------------------------------------------------------- ;***************************************************************************** ;* FUNCTION NAME: UARTEnableSIR * ;* * ;* Regs Modified : A1,A2,SP,SR * ;* Regs Used : A1,A2,SP,LR,SR * ;* Local Frame Size : 0 Args + 8 Auto + 0 Save = 8 byte * ;***************************************************************************** UARTEnableSIR: ;* --------------------------------------------------------------------------* .dwcfi cfa_offset, 0 SUB SP, SP, #8 ; [DPU_V7M3_PIPE] .dwcfi cfa_offset, 8 $C$DW$90 .dwtag DW_TAG_variable .dwattr $C$DW$90, DW_AT_name("ui32Base") .dwattr $C$DW$90, DW_AT_TI_symbol_name("ui32Base") .dwattr $C$DW$90, DW_AT_type(*$C$DW$T$27) .dwattr $C$DW$90, DW_AT_location[DW_OP_breg13 0] $C$DW$91 .dwtag DW_TAG_variable .dwattr $C$DW$91, DW_AT_name("bLowPower") .dwattr $C$DW$91, DW_AT_TI_symbol_name("bLowPower") .dwattr $C$DW$91, DW_AT_type(*$C$DW$T$38) .dwattr $C$DW$91, DW_AT_location[DW_OP_breg13 4] ;---------------------------------------------------------------------- ; 656 | // ; 657 | // Check the arguments. ; 658 | // ; 659 | ASSERT(_UARTBaseValid(ui32Base)); ; 661 | // ; 662 | // Enable SIR and SIRLP (if appropriate). ; 663 | // ;---------------------------------------------------------------------- STRB A2, [SP, #4] ; [DPU_V7M3_PIPE] |655| STR A1, [SP, #0] ; [DPU_V7M3_PIPE] |655| .dwpsn file "../driverlib/uart.c",line 664,column 5,is_stmt,isa 1 ;---------------------------------------------------------------------- ; 664 | if(bLowPower) ;---------------------------------------------------------------------- LDRB A1, [SP, #4] ; [DPU_V7M3_PIPE] |664| CBZ A1, ||$C$L10|| ; [] ; BRANCHCC OCCURS {||$C$L10||} ; [] |664| ;* --------------------------------------------------------------------------* .dwpsn file "../driverlib/uart.c",line 666,column 9,is_stmt,isa 1 ;---------------------------------------------------------------------- ; 666 | HWREG(ui32Base + UART_O_CTL) |= (UART_CTL_SIREN | UART_CTL_SIRLP); ;---------------------------------------------------------------------- LDR A1, [SP, #0] ; [DPU_V7M3_PIPE] |666| ADDS A1, A1, #48 ; [DPU_V7M3_PIPE] |666| LDR A2, [A1, #0] ; [DPU_V7M3_PIPE] |666| ORR A2, A2, #6 ; [DPU_V7M3_PIPE] |666| STR A2, [A1, #0] ; [DPU_V7M3_PIPE] |666| .dwpsn file "../driverlib/uart.c",line 667,column 5,is_stmt,isa 1 ;---------------------------------------------------------------------- ; 668 | else ;---------------------------------------------------------------------- B ||$C$L11|| ; [DPU_V7M3_PIPE] |667| ; BRANCH OCCURS {||$C$L11||} ; [] |667| ;* --------------------------------------------------------------------------* ||$C$L10||: .dwpsn file "../driverlib/uart.c",line 670,column 9,is_stmt,isa 1 ;---------------------------------------------------------------------- ; 670 | HWREG(ui32Base + UART_O_CTL) |= (UART_CTL_SIREN); ;---------------------------------------------------------------------- LDR A1, [SP, #0] ; [DPU_V7M3_PIPE] |670| ADDS A1, A1, #48 ; [DPU_V7M3_PIPE] |670| LDR A2, [A1, #0] ; [DPU_V7M3_PIPE] |670| ORR A2, A2, #2 ; [DPU_V7M3_PIPE] |670| STR A2, [A1, #0] ; [DPU_V7M3_PIPE] |670| .dwpsn file "../driverlib/uart.c",line 672,column 1,is_stmt,isa 1 ;* --------------------------------------------------------------------------* ||$C$L11||: ADD SP, SP, #8 ; [DPU_V7M3_PIPE] .dwcfi cfa_offset, 0 $C$DW$92 .dwtag DW_TAG_TI_branch .dwattr $C$DW$92, DW_AT_low_pc(0x00) .dwattr $C$DW$92, DW_AT_TI_return BX LR ; [DPU_V7M3_PIPE] ; BRANCH OCCURS ; [] .dwattr $C$DW$87, DW_AT_TI_end_file("../driverlib/uart.c") .dwattr $C$DW$87, DW_AT_TI_end_line(0x2a0) .dwattr $C$DW$87, DW_AT_TI_end_column(0x01) .dwendentry .dwendtag $C$DW$87 .sect ".text" .clink .thumbfunc UARTDisableSIR .thumb .global UARTDisableSIR $C$DW$93 .dwtag DW_TAG_subprogram .dwattr $C$DW$93, DW_AT_name("UARTDisableSIR") .dwattr $C$DW$93, DW_AT_low_pc(UARTDisableSIR) .dwattr $C$DW$93, DW_AT_high_pc(0x00) .dwattr $C$DW$93, DW_AT_TI_symbol_name("UARTDisableSIR") .dwattr $C$DW$93, DW_AT_external .dwattr $C$DW$93, DW_AT_TI_begin_file("../driverlib/uart.c") .dwattr $C$DW$93, DW_AT_TI_begin_line(0x2b7) .dwattr $C$DW$93, DW_AT_TI_begin_column(0x01) .dwattr $C$DW$93, DW_AT_decl_file("../driverlib/uart.c") .dwattr $C$DW$93, DW_AT_decl_line(0x2b7) .dwattr $C$DW$93, DW_AT_decl_column(0x01) .dwattr $C$DW$93, DW_AT_TI_max_frame_size(0x08) .dwpsn file "../driverlib/uart.c",line 696,column 1,is_stmt,address UARTDisableSIR,isa 1 .dwfde $C$DW$CIE, UARTDisableSIR $C$DW$94 .dwtag DW_TAG_formal_parameter .dwattr $C$DW$94, DW_AT_name("ui32Base") .dwattr $C$DW$94, DW_AT_TI_symbol_name("ui32Base") .dwattr $C$DW$94, DW_AT_type(*$C$DW$T$27) .dwattr $C$DW$94, DW_AT_location[DW_OP_reg0] ;---------------------------------------------------------------------- ; 695 | UARTDisableSIR(uint32_t ui32Base) ;---------------------------------------------------------------------- ;***************************************************************************** ;* FUNCTION NAME: UARTDisableSIR * ;* * ;* Regs Modified : A1,A2,SP,SR * ;* Regs Used : A1,A2,SP,LR,SR * ;* Local Frame Size : 0 Args + 4 Auto + 0 Save = 4 byte * ;***************************************************************************** UARTDisableSIR: ;* --------------------------------------------------------------------------* .dwcfi cfa_offset, 0 SUB SP, SP, #8 ; [DPU_V7M3_PIPE] .dwcfi cfa_offset, 8 $C$DW$95 .dwtag DW_TAG_variable .dwattr $C$DW$95, DW_AT_name("ui32Base") .dwattr $C$DW$95, DW_AT_TI_symbol_name("ui32Base") .dwattr $C$DW$95, DW_AT_type(*$C$DW$T$27) .dwattr $C$DW$95, DW_AT_location[DW_OP_breg13 0] ;---------------------------------------------------------------------- ; 697 | // ; 698 | // Check the arguments. ; 699 | // ; 700 | ASSERT(_UARTBaseValid(ui32Base)); ; 702 | // ; 703 | // Disable SIR and SIRLP (if appropriate). ; 704 | // ;---------------------------------------------------------------------- STR A1, [SP, #0] ; [DPU_V7M3_PIPE] |696| .dwpsn file "../driverlib/uart.c",line 705,column 5,is_stmt,isa 1 ;---------------------------------------------------------------------- ; 705 | HWREG(ui32Base + UART_O_CTL) &= ~(UART_CTL_SIREN | UART_CTL_SIRLP); ;---------------------------------------------------------------------- LDR A1, [SP, #0] ; [DPU_V7M3_PIPE] |705| ADDS A1, A1, #48 ; [DPU_V7M3_PIPE] |705| LDR A2, [A1, #0] ; [DPU_V7M3_PIPE] |705| BIC A2, A2, #6 ; [DPU_V7M3_PIPE] |705| STR A2, [A1, #0] ; [DPU_V7M3_PIPE] |705| .dwpsn file "../driverlib/uart.c",line 706,column 1,is_stmt,isa 1 ADD SP, SP, #8 ; [DPU_V7M3_PIPE] .dwcfi cfa_offset, 0 $C$DW$96 .dwtag DW_TAG_TI_branch .dwattr $C$DW$96, DW_AT_low_pc(0x00) .dwattr $C$DW$96, DW_AT_TI_return BX LR ; [DPU_V7M3_PIPE] ; BRANCH OCCURS ; [] .dwattr $C$DW$93, DW_AT_TI_end_file("../driverlib/uart.c") .dwattr $C$DW$93, DW_AT_TI_end_line(0x2c2) .dwattr $C$DW$93, DW_AT_TI_end_column(0x01) .dwendentry .dwendtag $C$DW$93 .sect ".text" .clink .thumbfunc UARTSmartCardEnable .thumb .global UARTSmartCardEnable $C$DW$97 .dwtag DW_TAG_subprogram .dwattr $C$DW$97, DW_AT_name("UARTSmartCardEnable") .dwattr $C$DW$97, DW_AT_low_pc(UARTSmartCardEnable) .dwattr $C$DW$97, DW_AT_high_pc(0x00) .dwattr $C$DW$97, DW_AT_TI_symbol_name("UARTSmartCardEnable") .dwattr $C$DW$97, DW_AT_external .dwattr $C$DW$97, DW_AT_TI_begin_file("../driverlib/uart.c") .dwattr $C$DW$97, DW_AT_TI_begin_line(0x2d6) .dwattr $C$DW$97, DW_AT_TI_begin_column(0x01) .dwattr $C$DW$97, DW_AT_decl_file("../driverlib/uart.c") .dwattr $C$DW$97, DW_AT_decl_line(0x2d6) .dwattr $C$DW$97, DW_AT_decl_column(0x01) .dwattr $C$DW$97, DW_AT_TI_max_frame_size(0x08) .dwpsn file "../driverlib/uart.c",line 727,column 1,is_stmt,address UARTSmartCardEnable,isa 1 .dwfde $C$DW$CIE, UARTSmartCardEnable $C$DW$98 .dwtag DW_TAG_formal_parameter .dwattr $C$DW$98, DW_AT_name("ui32Base") .dwattr $C$DW$98, DW_AT_TI_symbol_name("ui32Base") .dwattr $C$DW$98, DW_AT_type(*$C$DW$T$27) .dwattr $C$DW$98, DW_AT_location[DW_OP_reg0] ;---------------------------------------------------------------------- ; 726 | UARTSmartCardEnable(uint32_t ui32Base) ;---------------------------------------------------------------------- ;***************************************************************************** ;* FUNCTION NAME: UARTSmartCardEnable * ;* * ;* Regs Modified : A1,A2,SP,SR * ;* Regs Used : A1,A2,SP,LR,SR * ;* Local Frame Size : 0 Args + 8 Auto + 0 Save = 8 byte * ;***************************************************************************** UARTSmartCardEnable: ;* --------------------------------------------------------------------------* .dwcfi cfa_offset, 0 SUB SP, SP, #8 ; [DPU_V7M3_PIPE] .dwcfi cfa_offset, 8 $C$DW$99 .dwtag DW_TAG_variable .dwattr $C$DW$99, DW_AT_name("ui32Base") .dwattr $C$DW$99, DW_AT_TI_symbol_name("ui32Base") .dwattr $C$DW$99, DW_AT_type(*$C$DW$T$27) .dwattr $C$DW$99, DW_AT_location[DW_OP_breg13 0] $C$DW$100 .dwtag DW_TAG_variable .dwattr $C$DW$100, DW_AT_name("ui32Val") .dwattr $C$DW$100, DW_AT_TI_symbol_name("ui32Val") .dwattr $C$DW$100, DW_AT_type(*$C$DW$T$27) .dwattr $C$DW$100, DW_AT_location[DW_OP_breg13 4] ;---------------------------------------------------------------------- ; 728 | uint32_t ui32Val; ; 730 | // ; 731 | // Check the arguments. ; 732 | // ; 733 | ASSERT(_UARTBaseValid(ui32Base)); ; 735 | // ; 736 | // Set 8-bit word length, even parity, 2 stop bits (note that although ; | the ; 737 | // STP2 bit is ignored when in smartcard mode, this code lets the calle ; | r ; 738 | // read back the actual setting in use). ; 739 | // ;---------------------------------------------------------------------- STR A1, [SP, #0] ; [DPU_V7M3_PIPE] |727| .dwpsn file "../driverlib/uart.c",line 740,column 5,is_stmt,isa 1 ;---------------------------------------------------------------------- ; 740 | ui32Val = HWREG(ui32Base + UART_O_LCRH); ;---------------------------------------------------------------------- LDR A1, [SP, #0] ; [DPU_V7M3_PIPE] |740| LDR A1, [A1, #44] ; [DPU_V7M3_PIPE] |740| STR A1, [SP, #4] ; [DPU_V7M3_PIPE] |740| .dwpsn file "../driverlib/uart.c",line 741,column 5,is_stmt,isa 1 ;---------------------------------------------------------------------- ; 741 | ui32Val &= ~(UART_LCRH_SPS | UART_LCRH_EPS | UART_LCRH_PEN | ; 742 | UART_LCRH_WLEN_M); ;---------------------------------------------------------------------- LDR A1, [SP, #4] ; [DPU_V7M3_PIPE] |741| BIC A1, A1, #230 ; [DPU_V7M3_PIPE] |741| STR A1, [SP, #4] ; [DPU_V7M3_PIPE] |741| .dwpsn file "../driverlib/uart.c",line 743,column 5,is_stmt,isa 1 ;---------------------------------------------------------------------- ; 743 | ui32Val |= UART_LCRH_WLEN_8 | UART_LCRH_PEN | UART_LCRH_EPS | ; 744 | UART_LCRH_STP2; ;---------------------------------------------------------------------- LDR A1, [SP, #4] ; [DPU_V7M3_PIPE] |743| ORR A1, A1, #110 ; [DPU_V7M3_PIPE] |743| STR A1, [SP, #4] ; [DPU_V7M3_PIPE] |743| .dwpsn file "../driverlib/uart.c",line 745,column 5,is_stmt,isa 1 ;---------------------------------------------------------------------- ; 745 | HWREG(ui32Base + UART_O_LCRH) = ui32Val; ; 747 | // ; 748 | // Enable SMART mode. ; 749 | // ;---------------------------------------------------------------------- LDR A2, [SP, #0] ; [DPU_V7M3_PIPE] |745| LDR A1, [SP, #4] ; [DPU_V7M3_PIPE] |745| STR A1, [A2, #44] ; [DPU_V7M3_PIPE] |745| .dwpsn file "../driverlib/uart.c",line 750,column 5,is_stmt,isa 1 ;---------------------------------------------------------------------- ; 750 | HWREG(ui32Base + UART_O_CTL) |= UART_CTL_SMART; ;---------------------------------------------------------------------- LDR A1, [SP, #0] ; [DPU_V7M3_PIPE] |750| ADDS A1, A1, #48 ; [DPU_V7M3_PIPE] |750| LDR A2, [A1, #0] ; [DPU_V7M3_PIPE] |750| ORR A2, A2, #8 ; [DPU_V7M3_PIPE] |750| STR A2, [A1, #0] ; [DPU_V7M3_PIPE] |750| .dwpsn file "../driverlib/uart.c",line 751,column 1,is_stmt,isa 1 ADD SP, SP, #8 ; [DPU_V7M3_PIPE] .dwcfi cfa_offset, 0 $C$DW$101 .dwtag DW_TAG_TI_branch .dwattr $C$DW$101, DW_AT_low_pc(0x00) .dwattr $C$DW$101, DW_AT_TI_return BX LR ; [DPU_V7M3_PIPE] ; BRANCH OCCURS ; [] .dwattr $C$DW$97, DW_AT_TI_end_file("../driverlib/uart.c") .dwattr $C$DW$97, DW_AT_TI_end_line(0x2ef) .dwattr $C$DW$97, DW_AT_TI_end_column(0x01) .dwendentry .dwendtag $C$DW$97 .sect ".text" .clink .thumbfunc UARTSmartCardDisable .thumb .global UARTSmartCardDisable $C$DW$102 .dwtag DW_TAG_subprogram .dwattr $C$DW$102, DW_AT_name("UARTSmartCardDisable") .dwattr $C$DW$102, DW_AT_low_pc(UARTSmartCardDisable) .dwattr $C$DW$102, DW_AT_high_pc(0x00) .dwattr $C$DW$102, DW_AT_TI_symbol_name("UARTSmartCardDisable") .dwattr $C$DW$102, DW_AT_external .dwattr $C$DW$102, DW_AT_TI_begin_file("../driverlib/uart.c") .dwattr $C$DW$102, DW_AT_TI_begin_line(0x302) .dwattr $C$DW$102, DW_AT_TI_begin_column(0x01) .dwattr $C$DW$102, DW_AT_decl_file("../driverlib/uart.c") .dwattr $C$DW$102, DW_AT_decl_line(0x302) .dwattr $C$DW$102, DW_AT_decl_column(0x01) .dwattr $C$DW$102, DW_AT_TI_max_frame_size(0x08) .dwpsn file "../driverlib/uart.c",line 771,column 1,is_stmt,address UARTSmartCardDisable,isa 1 .dwfde $C$DW$CIE, UARTSmartCardDisable $C$DW$103 .dwtag DW_TAG_formal_parameter .dwattr $C$DW$103, DW_AT_name("ui32Base") .dwattr $C$DW$103, DW_AT_TI_symbol_name("ui32Base") .dwattr $C$DW$103, DW_AT_type(*$C$DW$T$27) .dwattr $C$DW$103, DW_AT_location[DW_OP_reg0] ;---------------------------------------------------------------------- ; 770 | UARTSmartCardDisable(uint32_t ui32Base) ;---------------------------------------------------------------------- ;***************************************************************************** ;* FUNCTION NAME: UARTSmartCardDisable * ;* * ;* Regs Modified : A1,A2,SP,SR * ;* Regs Used : A1,A2,SP,LR,SR * ;* Local Frame Size : 0 Args + 4 Auto + 0 Save = 4 byte * ;***************************************************************************** UARTSmartCardDisable: ;* --------------------------------------------------------------------------* .dwcfi cfa_offset, 0 SUB SP, SP, #8 ; [DPU_V7M3_PIPE] .dwcfi cfa_offset, 8 $C$DW$104 .dwtag DW_TAG_variable .dwattr $C$DW$104, DW_AT_name("ui32Base") .dwattr $C$DW$104, DW_AT_TI_symbol_name("ui32Base") .dwattr $C$DW$104, DW_AT_type(*$C$DW$T$27) .dwattr $C$DW$104, DW_AT_location[DW_OP_breg13 0] ;---------------------------------------------------------------------- ; 772 | // ; 773 | // Check the arguments. ; 774 | // ; 775 | ASSERT(_UARTBaseValid(ui32Base)); ; 777 | // ; 778 | // Disable the SMART bit. ; 779 | // ;---------------------------------------------------------------------- STR A1, [SP, #0] ; [DPU_V7M3_PIPE] |771| .dwpsn file "../driverlib/uart.c",line 780,column 5,is_stmt,isa 1 ;---------------------------------------------------------------------- ; 780 | HWREG(ui32Base + UART_O_CTL) &= ~UART_CTL_SMART; ;---------------------------------------------------------------------- LDR A1, [SP, #0] ; [DPU_V7M3_PIPE] |780| ADDS A1, A1, #48 ; [DPU_V7M3_PIPE] |780| LDR A2, [A1, #0] ; [DPU_V7M3_PIPE] |780| BIC A2, A2, #8 ; [DPU_V7M3_PIPE] |780| STR A2, [A1, #0] ; [DPU_V7M3_PIPE] |780| .dwpsn file "../driverlib/uart.c",line 781,column 1,is_stmt,isa 1 ADD SP, SP, #8 ; [DPU_V7M3_PIPE] .dwcfi cfa_offset, 0 $C$DW$105 .dwtag DW_TAG_TI_branch .dwattr $C$DW$105, DW_AT_low_pc(0x00) .dwattr $C$DW$105, DW_AT_TI_return BX LR ; [DPU_V7M3_PIPE] ; BRANCH OCCURS ; [] .dwattr $C$DW$102, DW_AT_TI_end_file("../driverlib/uart.c") .dwattr $C$DW$102, DW_AT_TI_end_line(0x30d) .dwattr $C$DW$102, DW_AT_TI_end_column(0x01) .dwendentry .dwendtag $C$DW$102 .sect ".text" .clink .thumbfunc UARTModemControlSet .thumb .global UARTModemControlSet $C$DW$106 .dwtag DW_TAG_subprogram .dwattr $C$DW$106, DW_AT_name("UARTModemControlSet") .dwattr $C$DW$106, DW_AT_low_pc(UARTModemControlSet) .dwattr $C$DW$106, DW_AT_high_pc(0x00) .dwattr $C$DW$106, DW_AT_TI_symbol_name("UARTModemControlSet") .dwattr $C$DW$106, DW_AT_external .dwattr $C$DW$106, DW_AT_TI_begin_file("../driverlib/uart.c") .dwattr $C$DW$106, DW_AT_TI_begin_line(0x327) .dwattr $C$DW$106, DW_AT_TI_begin_column(0x01) .dwattr $C$DW$106, DW_AT_decl_file("../driverlib/uart.c") .dwattr $C$DW$106, DW_AT_decl_line(0x327) .dwattr $C$DW$106, DW_AT_decl_column(0x01) .dwattr $C$DW$106, DW_AT_TI_max_frame_size(0x10) .dwpsn file "../driverlib/uart.c",line 808,column 1,is_stmt,address UARTModemControlSet,isa 1 .dwfde $C$DW$CIE, UARTModemControlSet $C$DW$107 .dwtag DW_TAG_formal_parameter .dwattr $C$DW$107, DW_AT_name("ui32Base") .dwattr $C$DW$107, DW_AT_TI_symbol_name("ui32Base") .dwattr $C$DW$107, DW_AT_type(*$C$DW$T$27) .dwattr $C$DW$107, DW_AT_location[DW_OP_reg0] $C$DW$108 .dwtag DW_TAG_formal_parameter .dwattr $C$DW$108, DW_AT_name("ui32Control") .dwattr $C$DW$108, DW_AT_TI_symbol_name("ui32Control") .dwattr $C$DW$108, DW_AT_type(*$C$DW$T$27) .dwattr $C$DW$108, DW_AT_location[DW_OP_reg1] ;---------------------------------------------------------------------- ; 807 | UARTModemControlSet(uint32_t ui32Base, uint32_t ui32Control) ;---------------------------------------------------------------------- ;***************************************************************************** ;* FUNCTION NAME: UARTModemControlSet * ;* * ;* Regs Modified : A1,A2,SP,SR * ;* Regs Used : A1,A2,SP,LR,SR * ;* Local Frame Size : 0 Args + 12 Auto + 0 Save = 12 byte * ;***************************************************************************** UARTModemControlSet: ;* --------------------------------------------------------------------------* .dwcfi cfa_offset, 0 SUB SP, SP, #16 ; [DPU_V7M3_PIPE] .dwcfi cfa_offset, 16 $C$DW$109 .dwtag DW_TAG_variable .dwattr $C$DW$109, DW_AT_name("ui32Base") .dwattr $C$DW$109, DW_AT_TI_symbol_name("ui32Base") .dwattr $C$DW$109, DW_AT_type(*$C$DW$T$27) .dwattr $C$DW$109, DW_AT_location[DW_OP_breg13 0] $C$DW$110 .dwtag DW_TAG_variable .dwattr $C$DW$110, DW_AT_name("ui32Control") .dwattr $C$DW$110, DW_AT_TI_symbol_name("ui32Control") .dwattr $C$DW$110, DW_AT_type(*$C$DW$T$27) .dwattr $C$DW$110, DW_AT_location[DW_OP_breg13 4] $C$DW$111 .dwtag DW_TAG_variable .dwattr $C$DW$111, DW_AT_name("ui32Temp") .dwattr $C$DW$111, DW_AT_TI_symbol_name("ui32Temp") .dwattr $C$DW$111, DW_AT_type(*$C$DW$T$27) .dwattr $C$DW$111, DW_AT_location[DW_OP_breg13 8] ;---------------------------------------------------------------------- ; 809 | uint32_t ui32Temp; ; 811 | // ; 812 | // Check the arguments. ; 813 | // ; 814 | #if defined(TARGET_IS_TM4C123_RA1) || defined(TARGET_IS_TM4C123_RA2) || ; | \ ; 815 | defined(TARGET_IS_TM4C123_RA3) || defined(TARGET_IS_TM4C123_RB0) || \ ; 816 | defined(TARGET_IS_TM4C123_RB1) ; 817 | ASSERT(ui32Base == UART1_BASE); ; 818 | #else ; 819 | ASSERT((ui32Base == UART0_BASE) || ; 820 | (ui32Base == UART1_BASE) || ; 821 | (ui32Base == UART2_BASE) || ; 822 | (ui32Base == UART3_BASE) || ; 823 | (ui32Base == UART4_BASE)); ; 824 | #endif ; 825 | ASSERT((ui32Control & ~(UART_OUTPUT_RTS | UART_OUTPUT_DTR)) == 0); ; 827 | // ; 828 | // Set the appropriate modem control output bits. ; 829 | // ;---------------------------------------------------------------------- STR A2, [SP, #4] ; [DPU_V7M3_PIPE] |808| STR A1, [SP, #0] ; [DPU_V7M3_PIPE] |808| .dwpsn file "../driverlib/uart.c",line 830,column 5,is_stmt,isa 1 ;---------------------------------------------------------------------- ; 830 | ui32Temp = HWREG(ui32Base + UART_O_CTL); ;---------------------------------------------------------------------- LDR A1, [SP, #0] ; [DPU_V7M3_PIPE] |830| LDR A1, [A1, #48] ; [DPU_V7M3_PIPE] |830| STR A1, [SP, #8] ; [DPU_V7M3_PIPE] |830| .dwpsn file "../driverlib/uart.c",line 831,column 5,is_stmt,isa 1 ;---------------------------------------------------------------------- ; 831 | ui32Temp |= (ui32Control & (UART_OUTPUT_RTS | UART_OUTPUT_DTR)); ;---------------------------------------------------------------------- LDR A2, [SP, #8] ; [DPU_V7M3_PIPE] |831| LDR A1, [SP, #4] ; [DPU_V7M3_PIPE] |831| AND A1, A1, #3072 ; [DPU_V7M3_PIPE] |831| ORRS A1, A1, A2 ; [DPU_V7M3_PIPE] |831| STR A1, [SP, #8] ; [DPU_V7M3_PIPE] |831| .dwpsn file "../driverlib/uart.c",line 832,column 5,is_stmt,isa 1 ;---------------------------------------------------------------------- ; 832 | HWREG(ui32Base + UART_O_CTL) = ui32Temp; ;---------------------------------------------------------------------- LDR A2, [SP, #0] ; [DPU_V7M3_PIPE] |832| LDR A1, [SP, #8] ; [DPU_V7M3_PIPE] |832| STR A1, [A2, #48] ; [DPU_V7M3_PIPE] |832| .dwpsn file "../driverlib/uart.c",line 833,column 1,is_stmt,isa 1 ADD SP, SP, #16 ; [DPU_V7M3_PIPE] .dwcfi cfa_offset, 0 $C$DW$112 .dwtag DW_TAG_TI_branch .dwattr $C$DW$112, DW_AT_low_pc(0x00) .dwattr $C$DW$112, DW_AT_TI_return BX LR ; [DPU_V7M3_PIPE] ; BRANCH OCCURS ; [] .dwattr $C$DW$106, DW_AT_TI_end_file("../driverlib/uart.c") .dwattr $C$DW$106, DW_AT_TI_end_line(0x341) .dwattr $C$DW$106, DW_AT_TI_end_column(0x01) .dwendentry .dwendtag $C$DW$106 ;****************************************************************************** ;* CONSTANT TABLE * ;****************************************************************************** .sect ".text" .align 4 ||$C$CON1||: .bits g_ppui32UARTIntMap,32 .align 4 ||$C$CON2||: .bits 1895759872,32 .align 4 ||$C$CON3||: .bits 1074782208,32 .align 4 ||$C$CON4||: .bits 269090816,32 .align 4 ||$C$CON5||: .bits g_ppui32UARTIntMapSnowflake,32 .sect ".text" .clink .thumbfunc UARTModemControlClear .thumb .global UARTModemControlClear $C$DW$113 .dwtag DW_TAG_subprogram .dwattr $C$DW$113, DW_AT_name("UARTModemControlClear") .dwattr $C$DW$113, DW_AT_low_pc(UARTModemControlClear) .dwattr $C$DW$113, DW_AT_high_pc(0x00) .dwattr $C$DW$113, DW_AT_TI_symbol_name("UARTModemControlClear") .dwattr $C$DW$113, DW_AT_external .dwattr $C$DW$113, DW_AT_TI_begin_file("../driverlib/uart.c") .dwattr $C$DW$113, DW_AT_TI_begin_line(0x35b) .dwattr $C$DW$113, DW_AT_TI_begin_column(0x01) .dwattr $C$DW$113, DW_AT_decl_file("../driverlib/uart.c") .dwattr $C$DW$113, DW_AT_decl_line(0x35b) .dwattr $C$DW$113, DW_AT_decl_column(0x01) .dwattr $C$DW$113, DW_AT_TI_max_frame_size(0x10) .dwpsn file "../driverlib/uart.c",line 860,column 1,is_stmt,address UARTModemControlClear,isa 1 .dwfde $C$DW$CIE, UARTModemControlClear $C$DW$114 .dwtag DW_TAG_formal_parameter .dwattr $C$DW$114, DW_AT_name("ui32Base") .dwattr $C$DW$114, DW_AT_TI_symbol_name("ui32Base") .dwattr $C$DW$114, DW_AT_type(*$C$DW$T$27) .dwattr $C$DW$114, DW_AT_location[DW_OP_reg0] $C$DW$115 .dwtag DW_TAG_formal_parameter .dwattr $C$DW$115, DW_AT_name("ui32Control") .dwattr $C$DW$115, DW_AT_TI_symbol_name("ui32Control") .dwattr $C$DW$115, DW_AT_type(*$C$DW$T$27) .dwattr $C$DW$115, DW_AT_location[DW_OP_reg1] ;---------------------------------------------------------------------- ; 859 | UARTModemControlClear(uint32_t ui32Base, uint32_t ui32Control) ;---------------------------------------------------------------------- ;***************************************************************************** ;* FUNCTION NAME: UARTModemControlClear * ;* * ;* Regs Modified : A1,A2,SP,SR * ;* Regs Used : A1,A2,SP,LR,SR * ;* Local Frame Size : 0 Args + 12 Auto + 0 Save = 12 byte * ;***************************************************************************** UARTModemControlClear: ;* --------------------------------------------------------------------------* .dwcfi cfa_offset, 0 SUB SP, SP, #16 ; [DPU_V7M3_PIPE] .dwcfi cfa_offset, 16 $C$DW$116 .dwtag DW_TAG_variable .dwattr $C$DW$116, DW_AT_name("ui32Base") .dwattr $C$DW$116, DW_AT_TI_symbol_name("ui32Base") .dwattr $C$DW$116, DW_AT_type(*$C$DW$T$27) .dwattr $C$DW$116, DW_AT_location[DW_OP_breg13 0] $C$DW$117 .dwtag DW_TAG_variable .dwattr $C$DW$117, DW_AT_name("ui32Control") .dwattr $C$DW$117, DW_AT_TI_symbol_name("ui32Control") .dwattr $C$DW$117, DW_AT_type(*$C$DW$T$27) .dwattr $C$DW$117, DW_AT_location[DW_OP_breg13 4] $C$DW$118 .dwtag DW_TAG_variable .dwattr $C$DW$118, DW_AT_name("ui32Temp") .dwattr $C$DW$118, DW_AT_TI_symbol_name("ui32Temp") .dwattr $C$DW$118, DW_AT_type(*$C$DW$T$27) .dwattr $C$DW$118, DW_AT_location[DW_OP_breg13 8] ;---------------------------------------------------------------------- ; 861 | uint32_t ui32Temp; ; 863 | // ; 864 | // Check the arguments. ; 865 | // ; 866 | #if defined(TARGET_IS_TM4C123_RA1) || defined(TARGET_IS_TM4C123_RA2) || ; | \ ; 867 | defined(TARGET_IS_TM4C123_RA3) || defined(TARGET_IS_TM4C123_RB0) || \ ; 868 | defined(TARGET_IS_TM4C123_RB1) ; 869 | ASSERT(ui32Base == UART1_BASE); ; 870 | #else ; 871 | ASSERT((ui32Base == UART0_BASE) || ; 872 | (ui32Base == UART1_BASE) || ; 873 | (ui32Base == UART2_BASE) || ; 874 | (ui32Base == UART3_BASE) || ; 875 | (ui32Base == UART4_BASE)); ; 876 | #endif ; 877 | ASSERT((ui32Control & ~(UART_OUTPUT_RTS | UART_OUTPUT_DTR)) == 0); ; 879 | // ; 880 | // Set the appropriate modem control output bits. ; 881 | // ;---------------------------------------------------------------------- STR A2, [SP, #4] ; [DPU_V7M3_PIPE] |860| STR A1, [SP, #0] ; [DPU_V7M3_PIPE] |860| .dwpsn file "../driverlib/uart.c",line 882,column 5,is_stmt,isa 1 ;---------------------------------------------------------------------- ; 882 | ui32Temp = HWREG(ui32Base + UART_O_CTL); ;---------------------------------------------------------------------- LDR A1, [SP, #0] ; [DPU_V7M3_PIPE] |882| LDR A1, [A1, #48] ; [DPU_V7M3_PIPE] |882| STR A1, [SP, #8] ; [DPU_V7M3_PIPE] |882| .dwpsn file "../driverlib/uart.c",line 883,column 5,is_stmt,isa 1 ;---------------------------------------------------------------------- ; 883 | ui32Temp &= ~(ui32Control & (UART_OUTPUT_RTS | UART_OUTPUT_DTR)); ;---------------------------------------------------------------------- LDR A2, [SP, #8] ; [DPU_V7M3_PIPE] |883| LDR A1, [SP, #4] ; [DPU_V7M3_PIPE] |883| AND A1, A1, #3072 ; [DPU_V7M3_PIPE] |883| BICS A2, A2, A1 ; [DPU_V7M3_PIPE] |883| STR A2, [SP, #8] ; [DPU_V7M3_PIPE] |883| .dwpsn file "../driverlib/uart.c",line 884,column 5,is_stmt,isa 1 ;---------------------------------------------------------------------- ; 884 | HWREG(ui32Base + UART_O_CTL) = ui32Temp; ;---------------------------------------------------------------------- LDR A2, [SP, #0] ; [DPU_V7M3_PIPE] |884| LDR A1, [SP, #8] ; [DPU_V7M3_PIPE] |884| STR A1, [A2, #48] ; [DPU_V7M3_PIPE] |884| .dwpsn file "../driverlib/uart.c",line 885,column 1,is_stmt,isa 1 ADD SP, SP, #16 ; [DPU_V7M3_PIPE] .dwcfi cfa_offset, 0 $C$DW$119 .dwtag DW_TAG_TI_branch .dwattr $C$DW$119, DW_AT_low_pc(0x00) .dwattr $C$DW$119, DW_AT_TI_return BX LR ; [DPU_V7M3_PIPE] ; BRANCH OCCURS ; [] .dwattr $C$DW$113, DW_AT_TI_end_file("../driverlib/uart.c") .dwattr $C$DW$113, DW_AT_TI_end_line(0x375) .dwattr $C$DW$113, DW_AT_TI_end_column(0x01) .dwendentry .dwendtag $C$DW$113 .sect ".text" .clink .thumbfunc UARTModemControlGet .thumb .global UARTModemControlGet $C$DW$120 .dwtag DW_TAG_subprogram .dwattr $C$DW$120, DW_AT_name("UARTModemControlGet") .dwattr $C$DW$120, DW_AT_low_pc(UARTModemControlGet) .dwattr $C$DW$120, DW_AT_high_pc(0x00) .dwattr $C$DW$120, DW_AT_TI_symbol_name("UARTModemControlGet") .dwattr $C$DW$120, DW_AT_external .dwattr $C$DW$120, DW_AT_type(*$C$DW$T$27) .dwattr $C$DW$120, DW_AT_TI_begin_file("../driverlib/uart.c") .dwattr $C$DW$120, DW_AT_TI_begin_line(0x38b) .dwattr $C$DW$120, DW_AT_TI_begin_column(0x01) .dwattr $C$DW$120, DW_AT_decl_file("../driverlib/uart.c") .dwattr $C$DW$120, DW_AT_decl_line(0x38b) .dwattr $C$DW$120, DW_AT_decl_column(0x01) .dwattr $C$DW$120, DW_AT_TI_max_frame_size(0x08) .dwpsn file "../driverlib/uart.c",line 908,column 1,is_stmt,address UARTModemControlGet,isa 1 .dwfde $C$DW$CIE, UARTModemControlGet $C$DW$121 .dwtag DW_TAG_formal_parameter .dwattr $C$DW$121, DW_AT_name("ui32Base") .dwattr $C$DW$121, DW_AT_TI_symbol_name("ui32Base") .dwattr $C$DW$121, DW_AT_type(*$C$DW$T$27) .dwattr $C$DW$121, DW_AT_location[DW_OP_reg0] ;---------------------------------------------------------------------- ; 907 | UARTModemControlGet(uint32_t ui32Base) ;---------------------------------------------------------------------- ;***************************************************************************** ;* FUNCTION NAME: UARTModemControlGet * ;* * ;* Regs Modified : A1,SP * ;* Regs Used : A1,SP,LR * ;* Local Frame Size : 0 Args + 4 Auto + 0 Save = 4 byte * ;***************************************************************************** UARTModemControlGet: ;* --------------------------------------------------------------------------* .dwcfi cfa_offset, 0 SUB SP, SP, #8 ; [DPU_V7M3_PIPE] .dwcfi cfa_offset, 8 $C$DW$122 .dwtag DW_TAG_variable .dwattr $C$DW$122, DW_AT_name("ui32Base") .dwattr $C$DW$122, DW_AT_TI_symbol_name("ui32Base") .dwattr $C$DW$122, DW_AT_type(*$C$DW$T$27) .dwattr $C$DW$122, DW_AT_location[DW_OP_breg13 0] ;---------------------------------------------------------------------- ; 909 | // ; 910 | // Check the arguments. ; 911 | // ; 912 | #if defined(TARGET_IS_TM4C123_RA1) || defined(TARGET_IS_TM4C123_RA2) || ; | \ ; 913 | defined(TARGET_IS_TM4C123_RA3) || defined(TARGET_IS_TM4C123_RB0) || \ ; 914 | defined(TARGET_IS_TM4C123_RB1) ; 915 | ASSERT(ui32Base == UART1_BASE); ; 916 | #else ; 917 | ASSERT((ui32Base == UART0_BASE) || ; 918 | (ui32Base == UART1_BASE) || ; 919 | (ui32Base == UART2_BASE) || ; 920 | (ui32Base == UART3_BASE) || ; 921 | (ui32Base == UART4_BASE)); ; 922 | #endif ;---------------------------------------------------------------------- STR A1, [SP, #0] ; [DPU_V7M3_PIPE] |908| .dwpsn file "../driverlib/uart.c",line 924,column 5,is_stmt,isa 1 ;---------------------------------------------------------------------- ; 924 | return(HWREG(ui32Base + UART_O_CTL) & (UART_OUTPUT_RTS | UART_OUTPUT_DT ; | R)); ;---------------------------------------------------------------------- LDR A1, [SP, #0] ; [DPU_V7M3_PIPE] |924| LDR A1, [A1, #48] ; [DPU_V7M3_PIPE] |924| AND A1, A1, #3072 ; [DPU_V7M3_PIPE] |924| .dwpsn file "../driverlib/uart.c",line 925,column 1,is_stmt,isa 1 ADD SP, SP, #8 ; [DPU_V7M3_PIPE] .dwcfi cfa_offset, 0 $C$DW$123 .dwtag DW_TAG_TI_branch .dwattr $C$DW$123, DW_AT_low_pc(0x00) .dwattr $C$DW$123, DW_AT_TI_return BX LR ; [DPU_V7M3_PIPE] ; BRANCH OCCURS ; [] .dwattr $C$DW$120, DW_AT_TI_end_file("../driverlib/uart.c") .dwattr $C$DW$120, DW_AT_TI_end_line(0x39d) .dwattr $C$DW$120, DW_AT_TI_end_column(0x01) .dwendentry .dwendtag $C$DW$120 .sect ".text" .clink .thumbfunc UARTModemStatusGet .thumb .global UARTModemStatusGet $C$DW$124 .dwtag DW_TAG_subprogram .dwattr $C$DW$124, DW_AT_name("UARTModemStatusGet") .dwattr $C$DW$124, DW_AT_low_pc(UARTModemStatusGet) .dwattr $C$DW$124, DW_AT_high_pc(0x00) .dwattr $C$DW$124, DW_AT_TI_symbol_name("UARTModemStatusGet") .dwattr $C$DW$124, DW_AT_external .dwattr $C$DW$124, DW_AT_type(*$C$DW$T$27) .dwattr $C$DW$124, DW_AT_TI_begin_file("../driverlib/uart.c") .dwattr $C$DW$124, DW_AT_TI_begin_line(0x3b3) .dwattr $C$DW$124, DW_AT_TI_begin_column(0x01) .dwattr $C$DW$124, DW_AT_decl_file("../driverlib/uart.c") .dwattr $C$DW$124, DW_AT_decl_line(0x3b3) .dwattr $C$DW$124, DW_AT_decl_column(0x01) .dwattr $C$DW$124, DW_AT_TI_max_frame_size(0x08) .dwpsn file "../driverlib/uart.c",line 948,column 1,is_stmt,address UARTModemStatusGet,isa 1 .dwfde $C$DW$CIE, UARTModemStatusGet $C$DW$125 .dwtag DW_TAG_formal_parameter .dwattr $C$DW$125, DW_AT_name("ui32Base") .dwattr $C$DW$125, DW_AT_TI_symbol_name("ui32Base") .dwattr $C$DW$125, DW_AT_type(*$C$DW$T$27) .dwattr $C$DW$125, DW_AT_location[DW_OP_reg0] ;---------------------------------------------------------------------- ; 947 | UARTModemStatusGet(uint32_t ui32Base) ;---------------------------------------------------------------------- ;***************************************************************************** ;* FUNCTION NAME: UARTModemStatusGet * ;* * ;* Regs Modified : A1,A2,SP,SR * ;* Regs Used : A1,A2,SP,LR,SR * ;* Local Frame Size : 0 Args + 4 Auto + 0 Save = 4 byte * ;***************************************************************************** UARTModemStatusGet: ;* --------------------------------------------------------------------------* .dwcfi cfa_offset, 0 SUB SP, SP, #8 ; [DPU_V7M3_PIPE] .dwcfi cfa_offset, 8 $C$DW$126 .dwtag DW_TAG_variable .dwattr $C$DW$126, DW_AT_name("ui32Base") .dwattr $C$DW$126, DW_AT_TI_symbol_name("ui32Base") .dwattr $C$DW$126, DW_AT_type(*$C$DW$T$27) .dwattr $C$DW$126, DW_AT_location[DW_OP_breg13 0] ;---------------------------------------------------------------------- ; 949 | // ; 950 | // Check the arguments. ; 951 | // ; 952 | #if defined(TARGET_IS_TM4C123_RA1) || defined(TARGET_IS_TM4C123_RA2) || ; | \ ; 953 | defined(TARGET_IS_TM4C123_RA3) || defined(TARGET_IS_TM4C123_RB0) || \ ; 954 | defined(TARGET_IS_TM4C123_RB1) ; 955 | ASSERT(ui32Base == UART1_BASE); ; 956 | #else ; 957 | ASSERT((ui32Base == UART0_BASE) || ; 958 | (ui32Base == UART1_BASE) || ; 959 | (ui32Base == UART2_BASE) || ; 960 | (ui32Base == UART3_BASE) || ; 961 | (ui32Base == UART4_BASE)); ; 962 | #endif ;---------------------------------------------------------------------- STR A1, [SP, #0] ; [DPU_V7M3_PIPE] |948| .dwpsn file "../driverlib/uart.c",line 964,column 5,is_stmt,isa 1 ;---------------------------------------------------------------------- ; 964 | return(HWREG(ui32Base + UART_O_FR) & (UART_INPUT_RI | UART_INPUT_DCD | ; 965 | UART_INPUT_CTS | UART_INPUT_DSR)) ; | ; ;---------------------------------------------------------------------- LDR A1, [SP, #0] ; [DPU_V7M3_PIPE] |964| LDR A2, [A1, #24] ; [DPU_V7M3_PIPE] |964| MOV A1, #263 ; [DPU_V7M3_PIPE] |964| ANDS A1, A1, A2 ; [DPU_V7M3_PIPE] |964| .dwpsn file "../driverlib/uart.c",line 966,column 1,is_stmt,isa 1 ADD SP, SP, #8 ; [DPU_V7M3_PIPE] .dwcfi cfa_offset, 0 $C$DW$127 .dwtag DW_TAG_TI_branch .dwattr $C$DW$127, DW_AT_low_pc(0x00) .dwattr $C$DW$127, DW_AT_TI_return BX LR ; [DPU_V7M3_PIPE] ; BRANCH OCCURS ; [] .dwattr $C$DW$124, DW_AT_TI_end_file("../driverlib/uart.c") .dwattr $C$DW$124, DW_AT_TI_end_line(0x3c6) .dwattr $C$DW$124, DW_AT_TI_end_column(0x01) .dwendentry .dwendtag $C$DW$124 .sect ".text" .clink .thumbfunc UARTFlowControlSet .thumb .global UARTFlowControlSet $C$DW$128 .dwtag DW_TAG_subprogram .dwattr $C$DW$128, DW_AT_name("UARTFlowControlSet") .dwattr $C$DW$128, DW_AT_low_pc(UARTFlowControlSet) .dwattr $C$DW$128, DW_AT_high_pc(0x00) .dwattr $C$DW$128, DW_AT_TI_symbol_name("UARTFlowControlSet") .dwattr $C$DW$128, DW_AT_external .dwattr $C$DW$128, DW_AT_TI_begin_file("../driverlib/uart.c") .dwattr $C$DW$128, DW_AT_TI_begin_line(0x3e2) .dwattr $C$DW$128, DW_AT_TI_begin_column(0x01) .dwattr $C$DW$128, DW_AT_decl_file("../driverlib/uart.c") .dwattr $C$DW$128, DW_AT_decl_line(0x3e2) .dwattr $C$DW$128, DW_AT_decl_column(0x01) .dwattr $C$DW$128, DW_AT_TI_max_frame_size(0x08) .dwpsn file "../driverlib/uart.c",line 995,column 1,is_stmt,address UARTFlowControlSet,isa 1 .dwfde $C$DW$CIE, UARTFlowControlSet $C$DW$129 .dwtag DW_TAG_formal_parameter .dwattr $C$DW$129, DW_AT_name("ui32Base") .dwattr $C$DW$129, DW_AT_TI_symbol_name("ui32Base") .dwattr $C$DW$129, DW_AT_type(*$C$DW$T$27) .dwattr $C$DW$129, DW_AT_location[DW_OP_reg0] $C$DW$130 .dwtag DW_TAG_formal_parameter .dwattr $C$DW$130, DW_AT_name("ui32Mode") .dwattr $C$DW$130, DW_AT_TI_symbol_name("ui32Mode") .dwattr $C$DW$130, DW_AT_type(*$C$DW$T$27) .dwattr $C$DW$130, DW_AT_location[DW_OP_reg1] ;---------------------------------------------------------------------- ; 994 | UARTFlowControlSet(uint32_t ui32Base, uint32_t ui32Mode) ;---------------------------------------------------------------------- ;***************************************************************************** ;* FUNCTION NAME: UARTFlowControlSet * ;* * ;* Regs Modified : A1,A2,A3,SP,SR * ;* Regs Used : A1,A2,A3,SP,LR,SR * ;* Local Frame Size : 0 Args + 8 Auto + 0 Save = 8 byte * ;***************************************************************************** UARTFlowControlSet: ;* --------------------------------------------------------------------------* .dwcfi cfa_offset, 0 SUB SP, SP, #8 ; [DPU_V7M3_PIPE] .dwcfi cfa_offset, 8 $C$DW$131 .dwtag DW_TAG_variable .dwattr $C$DW$131, DW_AT_name("ui32Base") .dwattr $C$DW$131, DW_AT_TI_symbol_name("ui32Base") .dwattr $C$DW$131, DW_AT_type(*$C$DW$T$27) .dwattr $C$DW$131, DW_AT_location[DW_OP_breg13 0] $C$DW$132 .dwtag DW_TAG_variable .dwattr $C$DW$132, DW_AT_name("ui32Mode") .dwattr $C$DW$132, DW_AT_TI_symbol_name("ui32Mode") .dwattr $C$DW$132, DW_AT_type(*$C$DW$T$27) .dwattr $C$DW$132, DW_AT_location[DW_OP_breg13 4] ;---------------------------------------------------------------------- ; 996 | // ; 997 | // Check the arguments. ; 998 | // ; 999 | ASSERT(_UARTBaseValid(ui32Base)); ; 1000 | ASSERT((ui32Mode & ~(UART_FLOWCONTROL_TX | UART_FLOWCONTROL_RX)) == 0); ; 1002 | // ; 1003 | // Set the flow control mode as requested. ; 1004 | // ;---------------------------------------------------------------------- STR A2, [SP, #4] ; [DPU_V7M3_PIPE] |995| STR A1, [SP, #0] ; [DPU_V7M3_PIPE] |995| .dwpsn file "../driverlib/uart.c",line 1005,column 5,is_stmt,isa 1 ;---------------------------------------------------------------------- ; 1005 | HWREG(ui32Base + UART_O_CTL) = ((HWREG(ui32Base + UART_O_CTL) & ; 1006 | ~(UART_FLOWCONTROL_TX | ; 1007 | UART_FLOWCONTROL_RX)) | ui32Mode); ;---------------------------------------------------------------------- LDR A1, [SP, #0] ; [DPU_V7M3_PIPE] |1005| LDR A2, [SP, #4] ; [DPU_V7M3_PIPE] |1005| LDR A3, [SP, #0] ; [DPU_V7M3_PIPE] |1005| LDR A1, [A1, #48] ; [DPU_V7M3_PIPE] |1005| BIC A1, A1, #49152 ; [DPU_V7M3_PIPE] |1005| ORRS A2, A2, A1 ; [DPU_V7M3_PIPE] |1005| STR A2, [A3, #48] ; [DPU_V7M3_PIPE] |1005| .dwpsn file "../driverlib/uart.c",line 1008,column 1,is_stmt,isa 1 ADD SP, SP, #8 ; [DPU_V7M3_PIPE] .dwcfi cfa_offset, 0 $C$DW$133 .dwtag DW_TAG_TI_branch .dwattr $C$DW$133, DW_AT_low_pc(0x00) .dwattr $C$DW$133, DW_AT_TI_return BX LR ; [DPU_V7M3_PIPE] ; BRANCH OCCURS ; [] .dwattr $C$DW$128, DW_AT_TI_end_file("../driverlib/uart.c") .dwattr $C$DW$128, DW_AT_TI_end_line(0x3f0) .dwattr $C$DW$128, DW_AT_TI_end_column(0x01) .dwendentry .dwendtag $C$DW$128 .sect ".text" .clink .thumbfunc UARTFlowControlGet .thumb .global UARTFlowControlGet $C$DW$134 .dwtag DW_TAG_subprogram .dwattr $C$DW$134, DW_AT_name("UARTFlowControlGet") .dwattr $C$DW$134, DW_AT_low_pc(UARTFlowControlGet) .dwattr $C$DW$134, DW_AT_high_pc(0x00) .dwattr $C$DW$134, DW_AT_TI_symbol_name("UARTFlowControlGet") .dwattr $C$DW$134, DW_AT_external .dwattr $C$DW$134, DW_AT_type(*$C$DW$T$27) .dwattr $C$DW$134, DW_AT_TI_begin_file("../driverlib/uart.c") .dwattr $C$DW$134, DW_AT_TI_begin_line(0x406) .dwattr $C$DW$134, DW_AT_TI_begin_column(0x01) .dwattr $C$DW$134, DW_AT_decl_file("../driverlib/uart.c") .dwattr $C$DW$134, DW_AT_decl_line(0x406) .dwattr $C$DW$134, DW_AT_decl_column(0x01) .dwattr $C$DW$134, DW_AT_TI_max_frame_size(0x08) .dwpsn file "../driverlib/uart.c",line 1031,column 1,is_stmt,address UARTFlowControlGet,isa 1 .dwfde $C$DW$CIE, UARTFlowControlGet $C$DW$135 .dwtag DW_TAG_formal_parameter .dwattr $C$DW$135, DW_AT_name("ui32Base") .dwattr $C$DW$135, DW_AT_TI_symbol_name("ui32Base") .dwattr $C$DW$135, DW_AT_type(*$C$DW$T$27) .dwattr $C$DW$135, DW_AT_location[DW_OP_reg0] ;---------------------------------------------------------------------- ; 1030 | UARTFlowControlGet(uint32_t ui32Base) ;---------------------------------------------------------------------- ;***************************************************************************** ;* FUNCTION NAME: UARTFlowControlGet * ;* * ;* Regs Modified : A1,SP * ;* Regs Used : A1,SP,LR * ;* Local Frame Size : 0 Args + 4 Auto + 0 Save = 4 byte * ;***************************************************************************** UARTFlowControlGet: ;* --------------------------------------------------------------------------* .dwcfi cfa_offset, 0 SUB SP, SP, #8 ; [DPU_V7M3_PIPE] .dwcfi cfa_offset, 8 $C$DW$136 .dwtag DW_TAG_variable .dwattr $C$DW$136, DW_AT_name("ui32Base") .dwattr $C$DW$136, DW_AT_TI_symbol_name("ui32Base") .dwattr $C$DW$136, DW_AT_type(*$C$DW$T$27) .dwattr $C$DW$136, DW_AT_location[DW_OP_breg13 0] ;---------------------------------------------------------------------- ; 1032 | // ; 1033 | // Check the arguments. ; 1034 | // ; 1035 | ASSERT(_UARTBaseValid(ui32Base)); ;---------------------------------------------------------------------- STR A1, [SP, #0] ; [DPU_V7M3_PIPE] |1031| .dwpsn file "../driverlib/uart.c",line 1037,column 5,is_stmt,isa 1 ;---------------------------------------------------------------------- ; 1037 | return(HWREG(ui32Base + UART_O_CTL) & (UART_FLOWCONTROL_TX | ; 1038 | UART_FLOWCONTROL_RX)); ;---------------------------------------------------------------------- LDR A1, [SP, #0] ; [DPU_V7M3_PIPE] |1037| LDR A1, [A1, #48] ; [DPU_V7M3_PIPE] |1037| AND A1, A1, #49152 ; [DPU_V7M3_PIPE] |1037| .dwpsn file "../driverlib/uart.c",line 1039,column 1,is_stmt,isa 1 ADD SP, SP, #8 ; [DPU_V7M3_PIPE] .dwcfi cfa_offset, 0 $C$DW$137 .dwtag DW_TAG_TI_branch .dwattr $C$DW$137, DW_AT_low_pc(0x00) .dwattr $C$DW$137, DW_AT_TI_return BX LR ; [DPU_V7M3_PIPE] ; BRANCH OCCURS ; [] .dwattr $C$DW$134, DW_AT_TI_end_file("../driverlib/uart.c") .dwattr $C$DW$134, DW_AT_TI_end_line(0x40f) .dwattr $C$DW$134, DW_AT_TI_end_column(0x01) .dwendentry .dwendtag $C$DW$134 .sect ".text" .clink .thumbfunc UARTTxIntModeSet .thumb .global UARTTxIntModeSet $C$DW$138 .dwtag DW_TAG_subprogram .dwattr $C$DW$138, DW_AT_name("UARTTxIntModeSet") .dwattr $C$DW$138, DW_AT_low_pc(UARTTxIntModeSet) .dwattr $C$DW$138, DW_AT_high_pc(0x00) .dwattr $C$DW$138, DW_AT_TI_symbol_name("UARTTxIntModeSet") .dwattr $C$DW$138, DW_AT_external .dwattr $C$DW$138, DW_AT_TI_begin_file("../driverlib/uart.c") .dwattr $C$DW$138, DW_AT_TI_begin_line(0x42b) .dwattr $C$DW$138, DW_AT_TI_begin_column(0x01) .dwattr $C$DW$138, DW_AT_decl_file("../driverlib/uart.c") .dwattr $C$DW$138, DW_AT_decl_line(0x42b) .dwattr $C$DW$138, DW_AT_decl_column(0x01) .dwattr $C$DW$138, DW_AT_TI_max_frame_size(0x08) .dwpsn file "../driverlib/uart.c",line 1068,column 1,is_stmt,address UARTTxIntModeSet,isa 1 .dwfde $C$DW$CIE, UARTTxIntModeSet $C$DW$139 .dwtag DW_TAG_formal_parameter .dwattr $C$DW$139, DW_AT_name("ui32Base") .dwattr $C$DW$139, DW_AT_TI_symbol_name("ui32Base") .dwattr $C$DW$139, DW_AT_type(*$C$DW$T$27) .dwattr $C$DW$139, DW_AT_location[DW_OP_reg0] $C$DW$140 .dwtag DW_TAG_formal_parameter .dwattr $C$DW$140, DW_AT_name("ui32Mode") .dwattr $C$DW$140, DW_AT_TI_symbol_name("ui32Mode") .dwattr $C$DW$140, DW_AT_type(*$C$DW$T$27) .dwattr $C$DW$140, DW_AT_location[DW_OP_reg1] ;---------------------------------------------------------------------- ; 1067 | UARTTxIntModeSet(uint32_t ui32Base, uint32_t ui32Mode) ;---------------------------------------------------------------------- ;***************************************************************************** ;* FUNCTION NAME: UARTTxIntModeSet * ;* * ;* Regs Modified : A1,A2,A3,SP,SR * ;* Regs Used : A1,A2,A3,SP,LR,SR * ;* Local Frame Size : 0 Args + 8 Auto + 0 Save = 8 byte * ;***************************************************************************** UARTTxIntModeSet: ;* --------------------------------------------------------------------------* .dwcfi cfa_offset, 0 SUB SP, SP, #8 ; [DPU_V7M3_PIPE] .dwcfi cfa_offset, 8 $C$DW$141 .dwtag DW_TAG_variable .dwattr $C$DW$141, DW_AT_name("ui32Base") .dwattr $C$DW$141, DW_AT_TI_symbol_name("ui32Base") .dwattr $C$DW$141, DW_AT_type(*$C$DW$T$27) .dwattr $C$DW$141, DW_AT_location[DW_OP_breg13 0] $C$DW$142 .dwtag DW_TAG_variable .dwattr $C$DW$142, DW_AT_name("ui32Mode") .dwattr $C$DW$142, DW_AT_TI_symbol_name("ui32Mode") .dwattr $C$DW$142, DW_AT_type(*$C$DW$T$27) .dwattr $C$DW$142, DW_AT_location[DW_OP_breg13 4] ;---------------------------------------------------------------------- ; 1069 | // ; 1070 | // Check the arguments. ; 1071 | // ; 1072 | ASSERT(_UARTBaseValid(ui32Base)); ; 1073 | ASSERT((ui32Mode == UART_TXINT_MODE_EOT) || ; 1074 | (ui32Mode == UART_TXINT_MODE_FIFO)); ; 1076 | // ; 1077 | // Set or clear the EOT bit of the UART control register as appropriate ; | . ; 1078 | // ;---------------------------------------------------------------------- STR A2, [SP, #4] ; [DPU_V7M3_PIPE] |1068| STR A1, [SP, #0] ; [DPU_V7M3_PIPE] |1068| .dwpsn file "../driverlib/uart.c",line 1079,column 5,is_stmt,isa 1 ;---------------------------------------------------------------------- ; 1079 | HWREG(ui32Base + UART_O_CTL) = ((HWREG(ui32Base + UART_O_CTL) & ; 1080 | ~(UART_TXINT_MODE_EOT | ; 1081 | UART_TXINT_MODE_FIFO)) | ui32Mode); ;---------------------------------------------------------------------- LDR A1, [SP, #0] ; [DPU_V7M3_PIPE] |1079| LDR A2, [SP, #4] ; [DPU_V7M3_PIPE] |1079| LDR A3, [SP, #0] ; [DPU_V7M3_PIPE] |1079| LDR A1, [A1, #48] ; [DPU_V7M3_PIPE] |1079| BIC A1, A1, #16 ; [DPU_V7M3_PIPE] |1079| ORRS A2, A2, A1 ; [DPU_V7M3_PIPE] |1079| STR A2, [A3, #48] ; [DPU_V7M3_PIPE] |1079| .dwpsn file "../driverlib/uart.c",line 1082,column 1,is_stmt,isa 1 ADD SP, SP, #8 ; [DPU_V7M3_PIPE] .dwcfi cfa_offset, 0 $C$DW$143 .dwtag DW_TAG_TI_branch .dwattr $C$DW$143, DW_AT_low_pc(0x00) .dwattr $C$DW$143, DW_AT_TI_return BX LR ; [DPU_V7M3_PIPE] ; BRANCH OCCURS ; [] .dwattr $C$DW$138, DW_AT_TI_end_file("../driverlib/uart.c") .dwattr $C$DW$138, DW_AT_TI_end_line(0x43a) .dwattr $C$DW$138, DW_AT_TI_end_column(0x01) .dwendentry .dwendtag $C$DW$138 .sect ".text" .clink .thumbfunc UARTTxIntModeGet .thumb .global UARTTxIntModeGet $C$DW$144 .dwtag DW_TAG_subprogram .dwattr $C$DW$144, DW_AT_name("UARTTxIntModeGet") .dwattr $C$DW$144, DW_AT_low_pc(UARTTxIntModeGet) .dwattr $C$DW$144, DW_AT_high_pc(0x00) .dwattr $C$DW$144, DW_AT_TI_symbol_name("UARTTxIntModeGet") .dwattr $C$DW$144, DW_AT_external .dwattr $C$DW$144, DW_AT_type(*$C$DW$T$27) .dwattr $C$DW$144, DW_AT_TI_begin_file("../driverlib/uart.c") .dwattr $C$DW$144, DW_AT_TI_begin_line(0x452) .dwattr $C$DW$144, DW_AT_TI_begin_column(0x01) .dwattr $C$DW$144, DW_AT_decl_file("../driverlib/uart.c") .dwattr $C$DW$144, DW_AT_decl_line(0x452) .dwattr $C$DW$144, DW_AT_decl_column(0x01) .dwattr $C$DW$144, DW_AT_TI_max_frame_size(0x08) .dwpsn file "../driverlib/uart.c",line 1107,column 1,is_stmt,address UARTTxIntModeGet,isa 1 .dwfde $C$DW$CIE, UARTTxIntModeGet $C$DW$145 .dwtag DW_TAG_formal_parameter .dwattr $C$DW$145, DW_AT_name("ui32Base") .dwattr $C$DW$145, DW_AT_TI_symbol_name("ui32Base") .dwattr $C$DW$145, DW_AT_type(*$C$DW$T$27) .dwattr $C$DW$145, DW_AT_location[DW_OP_reg0] ;---------------------------------------------------------------------- ; 1106 | UARTTxIntModeGet(uint32_t ui32Base) ;---------------------------------------------------------------------- ;***************************************************************************** ;* FUNCTION NAME: UARTTxIntModeGet * ;* * ;* Regs Modified : A1,SP * ;* Regs Used : A1,SP,LR * ;* Local Frame Size : 0 Args + 4 Auto + 0 Save = 4 byte * ;***************************************************************************** UARTTxIntModeGet: ;* --------------------------------------------------------------------------* .dwcfi cfa_offset, 0 SUB SP, SP, #8 ; [DPU_V7M3_PIPE] .dwcfi cfa_offset, 8 $C$DW$146 .dwtag DW_TAG_variable .dwattr $C$DW$146, DW_AT_name("ui32Base") .dwattr $C$DW$146, DW_AT_TI_symbol_name("ui32Base") .dwattr $C$DW$146, DW_AT_type(*$C$DW$T$27) .dwattr $C$DW$146, DW_AT_location[DW_OP_breg13 0] ;---------------------------------------------------------------------- ; 1108 | // ; 1109 | // Check the arguments. ; 1110 | // ; 1111 | ASSERT(_UARTBaseValid(ui32Base)); ; 1113 | // ; 1114 | // Return the current transmit interrupt mode. ; 1115 | // ;---------------------------------------------------------------------- STR A1, [SP, #0] ; [DPU_V7M3_PIPE] |1107| .dwpsn file "../driverlib/uart.c",line 1116,column 5,is_stmt,isa 1 ;---------------------------------------------------------------------- ; 1116 | return(HWREG(ui32Base + UART_O_CTL) & (UART_TXINT_MODE_EOT | ; 1117 | UART_TXINT_MODE_FIFO)); ;---------------------------------------------------------------------- LDR A1, [SP, #0] ; [DPU_V7M3_PIPE] |1116| LDR A1, [A1, #48] ; [DPU_V7M3_PIPE] |1116| AND A1, A1, #16 ; [DPU_V7M3_PIPE] |1116| .dwpsn file "../driverlib/uart.c",line 1118,column 1,is_stmt,isa 1 ADD SP, SP, #8 ; [DPU_V7M3_PIPE] .dwcfi cfa_offset, 0 $C$DW$147 .dwtag DW_TAG_TI_branch .dwattr $C$DW$147, DW_AT_low_pc(0x00) .dwattr $C$DW$147, DW_AT_TI_return BX LR ; [DPU_V7M3_PIPE] ; BRANCH OCCURS ; [] .dwattr $C$DW$144, DW_AT_TI_end_file("../driverlib/uart.c") .dwattr $C$DW$144, DW_AT_TI_end_line(0x45e) .dwattr $C$DW$144, DW_AT_TI_end_column(0x01) .dwendentry .dwendtag $C$DW$144 .sect ".text" .clink .thumbfunc UARTCharsAvail .thumb .global UARTCharsAvail $C$DW$148 .dwtag DW_TAG_subprogram .dwattr $C$DW$148, DW_AT_name("UARTCharsAvail") .dwattr $C$DW$148, DW_AT_low_pc(UARTCharsAvail) .dwattr $C$DW$148, DW_AT_high_pc(0x00) .dwattr $C$DW$148, DW_AT_TI_symbol_name("UARTCharsAvail") .dwattr $C$DW$148, DW_AT_external .dwattr $C$DW$148, DW_AT_type(*$C$DW$T$38) .dwattr $C$DW$148, DW_AT_TI_begin_file("../driverlib/uart.c") .dwattr $C$DW$148, DW_AT_TI_begin_line(0x46e) .dwattr $C$DW$148, DW_AT_TI_begin_column(0x01) .dwattr $C$DW$148, DW_AT_decl_file("../driverlib/uart.c") .dwattr $C$DW$148, DW_AT_decl_line(0x46e) .dwattr $C$DW$148, DW_AT_decl_column(0x01) .dwattr $C$DW$148, DW_AT_TI_max_frame_size(0x08) .dwpsn file "../driverlib/uart.c",line 1135,column 1,is_stmt,address UARTCharsAvail,isa 1 .dwfde $C$DW$CIE, UARTCharsAvail $C$DW$149 .dwtag DW_TAG_formal_parameter .dwattr $C$DW$149, DW_AT_name("ui32Base") .dwattr $C$DW$149, DW_AT_TI_symbol_name("ui32Base") .dwattr $C$DW$149, DW_AT_type(*$C$DW$T$27) .dwattr $C$DW$149, DW_AT_location[DW_OP_reg0] ;---------------------------------------------------------------------- ; 1134 | UARTCharsAvail(uint32_t ui32Base) ;---------------------------------------------------------------------- ;***************************************************************************** ;* FUNCTION NAME: UARTCharsAvail * ;* * ;* Regs Modified : A1,A2,SP,SR * ;* Regs Used : A1,A2,SP,LR,SR * ;* Local Frame Size : 0 Args + 4 Auto + 0 Save = 4 byte * ;***************************************************************************** UARTCharsAvail: ;* --------------------------------------------------------------------------* .dwcfi cfa_offset, 0 SUB SP, SP, #8 ; [DPU_V7M3_PIPE] .dwcfi cfa_offset, 8 $C$DW$150 .dwtag DW_TAG_variable .dwattr $C$DW$150, DW_AT_name("ui32Base") .dwattr $C$DW$150, DW_AT_TI_symbol_name("ui32Base") .dwattr $C$DW$150, DW_AT_type(*$C$DW$T$27) .dwattr $C$DW$150, DW_AT_location[DW_OP_breg13 0] ;---------------------------------------------------------------------- ; 1136 | // ; 1137 | // Check the arguments. ; 1138 | // ; 1139 | ASSERT(_UARTBaseValid(ui32Base)); ; 1141 | // ; 1142 | // Return the availability of characters. ; 1143 | // ;---------------------------------------------------------------------- STR A1, [SP, #0] ; [DPU_V7M3_PIPE] |1135| .dwpsn file "../driverlib/uart.c",line 1144,column 5,is_stmt,isa 1 ;---------------------------------------------------------------------- ; 1144 | return((HWREG(ui32Base + UART_O_FR) & UART_FR_RXFE) ? false : true); ;---------------------------------------------------------------------- LDR A1, [SP, #0] ; [DPU_V7M3_PIPE] |1144| LDR A2, [A1, #24] ; [DPU_V7M3_PIPE] |1144| MOVS A1, #0 ; [DPU_V7M3_PIPE] |1144| LSRS A2, A2, #5 ; [DPU_V7M3_PIPE] |1144| BCC ||$C$L12|| ; [DPU_V7M3_PIPE] |1144| ; BRANCHCC OCCURS {||$C$L12||} ; [] |1144| ;* --------------------------------------------------------------------------* MOVS A2, #0 ; [DPU_V7M3_PIPE] |1144| B ||$C$L13|| ; [DPU_V7M3_PIPE] |1144| ; BRANCH OCCURS {||$C$L13||} ; [] |1144| ;* --------------------------------------------------------------------------* ||$C$L12||: MOVS A2, #1 ; [DPU_V7M3_PIPE] |1144| ;* --------------------------------------------------------------------------* ||$C$L13||: CBZ A2, ||$C$L14|| ; [] ; BRANCHCC OCCURS {||$C$L14||} ; [] |1144| ;* --------------------------------------------------------------------------* MOVS A1, #1 ; [DPU_V7M3_PIPE] |1144| ;* --------------------------------------------------------------------------* ||$C$L14||: .dwpsn file "../driverlib/uart.c",line 1145,column 1,is_stmt,isa 1 ADD SP, SP, #8 ; [DPU_V7M3_PIPE] .dwcfi cfa_offset, 0 $C$DW$151 .dwtag DW_TAG_TI_branch .dwattr $C$DW$151, DW_AT_low_pc(0x00) .dwattr $C$DW$151, DW_AT_TI_return BX LR ; [DPU_V7M3_PIPE] ; BRANCH OCCURS ; [] .dwattr $C$DW$148, DW_AT_TI_end_file("../driverlib/uart.c") .dwattr $C$DW$148, DW_AT_TI_end_line(0x479) .dwattr $C$DW$148, DW_AT_TI_end_column(0x01) .dwendentry .dwendtag $C$DW$148 .sect ".text" .clink .thumbfunc UARTSpaceAvail .thumb .global UARTSpaceAvail $C$DW$152 .dwtag DW_TAG_subprogram .dwattr $C$DW$152, DW_AT_name("UARTSpaceAvail") .dwattr $C$DW$152, DW_AT_low_pc(UARTSpaceAvail) .dwattr $C$DW$152, DW_AT_high_pc(0x00) .dwattr $C$DW$152, DW_AT_TI_symbol_name("UARTSpaceAvail") .dwattr $C$DW$152, DW_AT_external .dwattr $C$DW$152, DW_AT_type(*$C$DW$T$38) .dwattr $C$DW$152, DW_AT_TI_begin_file("../driverlib/uart.c") .dwattr $C$DW$152, DW_AT_TI_begin_line(0x489) .dwattr $C$DW$152, DW_AT_TI_begin_column(0x01) .dwattr $C$DW$152, DW_AT_decl_file("../driverlib/uart.c") .dwattr $C$DW$152, DW_AT_decl_line(0x489) .dwattr $C$DW$152, DW_AT_decl_column(0x01) .dwattr $C$DW$152, DW_AT_TI_max_frame_size(0x08) .dwpsn file "../driverlib/uart.c",line 1162,column 1,is_stmt,address UARTSpaceAvail,isa 1 .dwfde $C$DW$CIE, UARTSpaceAvail $C$DW$153 .dwtag DW_TAG_formal_parameter .dwattr $C$DW$153, DW_AT_name("ui32Base") .dwattr $C$DW$153, DW_AT_TI_symbol_name("ui32Base") .dwattr $C$DW$153, DW_AT_type(*$C$DW$T$27) .dwattr $C$DW$153, DW_AT_location[DW_OP_reg0] ;---------------------------------------------------------------------- ; 1161 | UARTSpaceAvail(uint32_t ui32Base) ;---------------------------------------------------------------------- ;***************************************************************************** ;* FUNCTION NAME: UARTSpaceAvail * ;* * ;* Regs Modified : A1,A2,SP,SR * ;* Regs Used : A1,A2,SP,LR,SR * ;* Local Frame Size : 0 Args + 4 Auto + 0 Save = 4 byte * ;***************************************************************************** UARTSpaceAvail: ;* --------------------------------------------------------------------------* .dwcfi cfa_offset, 0 SUB SP, SP, #8 ; [DPU_V7M3_PIPE] .dwcfi cfa_offset, 8 $C$DW$154 .dwtag DW_TAG_variable .dwattr $C$DW$154, DW_AT_name("ui32Base") .dwattr $C$DW$154, DW_AT_TI_symbol_name("ui32Base") .dwattr $C$DW$154, DW_AT_type(*$C$DW$T$27) .dwattr $C$DW$154, DW_AT_location[DW_OP_breg13 0] ;---------------------------------------------------------------------- ; 1163 | // ; 1164 | // Check the arguments. ; 1165 | // ; 1166 | ASSERT(_UARTBaseValid(ui32Base)); ; 1168 | // ; 1169 | // Return the availability of space. ; 1170 | // ;---------------------------------------------------------------------- STR A1, [SP, #0] ; [DPU_V7M3_PIPE] |1162| .dwpsn file "../driverlib/uart.c",line 1171,column 5,is_stmt,isa 1 ;---------------------------------------------------------------------- ; 1171 | return((HWREG(ui32Base + UART_O_FR) & UART_FR_TXFF) ? false : true); ;---------------------------------------------------------------------- LDR A1, [SP, #0] ; [DPU_V7M3_PIPE] |1171| LDR A2, [A1, #24] ; [DPU_V7M3_PIPE] |1171| MOVS A1, #0 ; [DPU_V7M3_PIPE] |1171| LSRS A2, A2, #6 ; [DPU_V7M3_PIPE] |1171| BCC ||$C$L15|| ; [DPU_V7M3_PIPE] |1171| ; BRANCHCC OCCURS {||$C$L15||} ; [] |1171| ;* --------------------------------------------------------------------------* MOVS A2, #0 ; [DPU_V7M3_PIPE] |1171| B ||$C$L16|| ; [DPU_V7M3_PIPE] |1171| ; BRANCH OCCURS {||$C$L16||} ; [] |1171| ;* --------------------------------------------------------------------------* ||$C$L15||: MOVS A2, #1 ; [DPU_V7M3_PIPE] |1171| ;* --------------------------------------------------------------------------* ||$C$L16||: CBZ A2, ||$C$L17|| ; [] ; BRANCHCC OCCURS {||$C$L17||} ; [] |1171| ;* --------------------------------------------------------------------------* MOVS A1, #1 ; [DPU_V7M3_PIPE] |1171| ;* --------------------------------------------------------------------------* ||$C$L17||: .dwpsn file "../driverlib/uart.c",line 1172,column 1,is_stmt,isa 1 ADD SP, SP, #8 ; [DPU_V7M3_PIPE] .dwcfi cfa_offset, 0 $C$DW$155 .dwtag DW_TAG_TI_branch .dwattr $C$DW$155, DW_AT_low_pc(0x00) .dwattr $C$DW$155, DW_AT_TI_return BX LR ; [DPU_V7M3_PIPE] ; BRANCH OCCURS ; [] .dwattr $C$DW$152, DW_AT_TI_end_file("../driverlib/uart.c") .dwattr $C$DW$152, DW_AT_TI_end_line(0x494) .dwattr $C$DW$152, DW_AT_TI_end_column(0x01) .dwendentry .dwendtag $C$DW$152 .sect ".text" .clink .thumbfunc UARTCharGetNonBlocking .thumb .global UARTCharGetNonBlocking $C$DW$156 .dwtag DW_TAG_subprogram .dwattr $C$DW$156, DW_AT_name("UARTCharGetNonBlocking") .dwattr $C$DW$156, DW_AT_low_pc(UARTCharGetNonBlocking) .dwattr $C$DW$156, DW_AT_high_pc(0x00) .dwattr $C$DW$156, DW_AT_TI_symbol_name("UARTCharGetNonBlocking") .dwattr $C$DW$156, DW_AT_external .dwattr $C$DW$156, DW_AT_type(*$C$DW$T$93) .dwattr $C$DW$156, DW_AT_TI_begin_file("../driverlib/uart.c") .dwattr $C$DW$156, DW_AT_TI_begin_line(0x4a6) .dwattr $C$DW$156, DW_AT_TI_begin_column(0x01) .dwattr $C$DW$156, DW_AT_decl_file("../driverlib/uart.c") .dwattr $C$DW$156, DW_AT_decl_line(0x4a6) .dwattr $C$DW$156, DW_AT_decl_column(0x01) .dwattr $C$DW$156, DW_AT_TI_max_frame_size(0x08) .dwpsn file "../driverlib/uart.c",line 1191,column 1,is_stmt,address UARTCharGetNonBlocking,isa 1 .dwfde $C$DW$CIE, UARTCharGetNonBlocking $C$DW$157 .dwtag DW_TAG_formal_parameter .dwattr $C$DW$157, DW_AT_name("ui32Base") .dwattr $C$DW$157, DW_AT_TI_symbol_name("ui32Base") .dwattr $C$DW$157, DW_AT_type(*$C$DW$T$27) .dwattr $C$DW$157, DW_AT_location[DW_OP_reg0] ;---------------------------------------------------------------------- ; 1190 | UARTCharGetNonBlocking(uint32_t ui32Base) ;---------------------------------------------------------------------- ;***************************************************************************** ;* FUNCTION NAME: UARTCharGetNonBlocking * ;* * ;* Regs Modified : A1,SP,SR * ;* Regs Used : A1,SP,LR,SR * ;* Local Frame Size : 0 Args + 4 Auto + 0 Save = 4 byte * ;***************************************************************************** UARTCharGetNonBlocking: ;* --------------------------------------------------------------------------* .dwcfi cfa_offset, 0 SUB SP, SP, #8 ; [DPU_V7M3_PIPE] .dwcfi cfa_offset, 8 $C$DW$158 .dwtag DW_TAG_variable .dwattr $C$DW$158, DW_AT_name("ui32Base") .dwattr $C$DW$158, DW_AT_TI_symbol_name("ui32Base") .dwattr $C$DW$158, DW_AT_type(*$C$DW$T$27) .dwattr $C$DW$158, DW_AT_location[DW_OP_breg13 0] ;---------------------------------------------------------------------- ; 1192 | // ; 1193 | // Check the arguments. ; 1194 | // ; 1195 | ASSERT(_UARTBaseValid(ui32Base)); ; 1197 | // ; 1198 | // See if there are any characters in the receive FIFO. ; 1199 | // ;---------------------------------------------------------------------- STR A1, [SP, #0] ; [DPU_V7M3_PIPE] |1191| .dwpsn file "../driverlib/uart.c",line 1200,column 5,is_stmt,isa 1 ;---------------------------------------------------------------------- ; 1200 | if(!(HWREG(ui32Base + UART_O_FR) & UART_FR_RXFE)) ; 1202 | // ; 1203 | // Read and return the next character. ; 1204 | // ;---------------------------------------------------------------------- LDR A1, [SP, #0] ; [DPU_V7M3_PIPE] |1200| LDR A1, [A1, #24] ; [DPU_V7M3_PIPE] |1200| LSRS A1, A1, #5 ; [DPU_V7M3_PIPE] |1200| BCS ||$C$L18|| ; [DPU_V7M3_PIPE] |1200| ; BRANCHCC OCCURS {||$C$L18||} ; [] |1200| ;* --------------------------------------------------------------------------* .dwpsn file "../driverlib/uart.c",line 1205,column 9,is_stmt,isa 1 ;---------------------------------------------------------------------- ; 1205 | return(HWREG(ui32Base + UART_O_DR)); ; 1207 | else ; 1209 | // ; 1210 | // There are no characters, so return a failure. ; 1211 | // ;---------------------------------------------------------------------- LDR A1, [SP, #0] ; [DPU_V7M3_PIPE] |1205| LDR A1, [A1, #0] ; [DPU_V7M3_PIPE] |1205| B ||$C$L19|| ; [DPU_V7M3_PIPE] |1205| ; BRANCH OCCURS {||$C$L19||} ; [] |1205| ;* --------------------------------------------------------------------------* ;* --------------------------------------------------------------------------* ||$C$L18||: .dwpsn file "../driverlib/uart.c",line 1212,column 9,is_stmt,isa 1 ;---------------------------------------------------------------------- ; 1212 | return(-1); ;---------------------------------------------------------------------- MOV A1, #-1 ; [DPU_V7M3_PIPE] |1212| ;* --------------------------------------------------------------------------* ||$C$L19||: .dwpsn file "../driverlib/uart.c",line 1214,column 1,is_stmt,isa 1 ADD SP, SP, #8 ; [DPU_V7M3_PIPE] .dwcfi cfa_offset, 0 $C$DW$159 .dwtag DW_TAG_TI_branch .dwattr $C$DW$159, DW_AT_low_pc(0x00) .dwattr $C$DW$159, DW_AT_TI_return BX LR ; [DPU_V7M3_PIPE] ; BRANCH OCCURS ; [] .dwattr $C$DW$156, DW_AT_TI_end_file("../driverlib/uart.c") .dwattr $C$DW$156, DW_AT_TI_end_line(0x4be) .dwattr $C$DW$156, DW_AT_TI_end_column(0x01) .dwendentry .dwendtag $C$DW$156 .sect ".text" .clink .thumbfunc UARTCharGet .thumb .global UARTCharGet $C$DW$160 .dwtag DW_TAG_subprogram .dwattr $C$DW$160, DW_AT_name("UARTCharGet") .dwattr $C$DW$160, DW_AT_low_pc(UARTCharGet) .dwattr $C$DW$160, DW_AT_high_pc(0x00) .dwattr $C$DW$160, DW_AT_TI_symbol_name("UARTCharGet") .dwattr $C$DW$160, DW_AT_external .dwattr $C$DW$160, DW_AT_type(*$C$DW$T$93) .dwattr $C$DW$160, DW_AT_TI_begin_file("../driverlib/uart.c") .dwattr $C$DW$160, DW_AT_TI_begin_line(0x4cf) .dwattr $C$DW$160, DW_AT_TI_begin_column(0x01) .dwattr $C$DW$160, DW_AT_decl_file("../driverlib/uart.c") .dwattr $C$DW$160, DW_AT_decl_line(0x4cf) .dwattr $C$DW$160, DW_AT_decl_column(0x01) .dwattr $C$DW$160, DW_AT_TI_max_frame_size(0x08) .dwpsn file "../driverlib/uart.c",line 1232,column 1,is_stmt,address UARTCharGet,isa 1 .dwfde $C$DW$CIE, UARTCharGet $C$DW$161 .dwtag DW_TAG_formal_parameter .dwattr $C$DW$161, DW_AT_name("ui32Base") .dwattr $C$DW$161, DW_AT_TI_symbol_name("ui32Base") .dwattr $C$DW$161, DW_AT_type(*$C$DW$T$27) .dwattr $C$DW$161, DW_AT_location[DW_OP_reg0] ;---------------------------------------------------------------------- ; 1231 | UARTCharGet(uint32_t ui32Base) ;---------------------------------------------------------------------- ;***************************************************************************** ;* FUNCTION NAME: UARTCharGet * ;* * ;* Regs Modified : A1,SP,SR * ;* Regs Used : A1,SP,LR,SR * ;* Local Frame Size : 0 Args + 4 Auto + 0 Save = 4 byte * ;***************************************************************************** UARTCharGet: ;* --------------------------------------------------------------------------* .dwcfi cfa_offset, 0 SUB SP, SP, #8 ; [DPU_V7M3_PIPE] .dwcfi cfa_offset, 8 $C$DW$162 .dwtag DW_TAG_variable .dwattr $C$DW$162, DW_AT_name("ui32Base") .dwattr $C$DW$162, DW_AT_TI_symbol_name("ui32Base") .dwattr $C$DW$162, DW_AT_type(*$C$DW$T$27) .dwattr $C$DW$162, DW_AT_location[DW_OP_breg13 0] ;---------------------------------------------------------------------- ; 1233 | // ; 1234 | // Check the arguments. ; 1235 | // ; 1236 | ASSERT(_UARTBaseValid(ui32Base)); ; 1238 | // ; 1239 | // Wait until a char is available. ; 1240 | // ;---------------------------------------------------------------------- STR A1, [SP, #0] ; [DPU_V7M3_PIPE] |1232| .dwpsn file "../driverlib/uart.c",line 1241,column 5,is_stmt,isa 1 ;---------------------------------------------------------------------- ; 1241 | while(HWREG(ui32Base + UART_O_FR) & UART_FR_RXFE) ; 1245 | // ; 1246 | // Now get the char. ; 1247 | // ;---------------------------------------------------------------------- ;* --------------------------------------------------------------------------* ;* BEGIN LOOP ||$C$L20|| ;* ;* Loop source line : 1241 ;* Loop closing brace source line : 1243 ;* Known Minimum Trip Count : 1 ;* Known Maximum Trip Count : 4294967295 ;* Known Max Trip Count Factor : 1 ;* --------------------------------------------------------------------------* ||$C$L20||: LDR A1, [SP, #0] ; [DPU_V7M3_PIPE] |1241| LDR A1, [A1, #24] ; [DPU_V7M3_PIPE] |1241| LSRS A1, A1, #5 ; [DPU_V7M3_PIPE] |1241| BCS ||$C$L20|| ; [DPU_V7M3_PIPE] |1241| ; BRANCHCC OCCURS {||$C$L20||} ; [] |1241| ;* --------------------------------------------------------------------------* .dwpsn file "../driverlib/uart.c",line 1248,column 5,is_stmt,isa 1 ;---------------------------------------------------------------------- ; 1248 | return(HWREG(ui32Base + UART_O_DR)); ;---------------------------------------------------------------------- LDR A1, [SP, #0] ; [DPU_V7M3_PIPE] |1248| LDR A1, [A1, #0] ; [DPU_V7M3_PIPE] |1248| .dwpsn file "../driverlib/uart.c",line 1249,column 1,is_stmt,isa 1 ADD SP, SP, #8 ; [DPU_V7M3_PIPE] .dwcfi cfa_offset, 0 $C$DW$163 .dwtag DW_TAG_TI_branch .dwattr $C$DW$163, DW_AT_low_pc(0x00) .dwattr $C$DW$163, DW_AT_TI_return BX LR ; [DPU_V7M3_PIPE] ; BRANCH OCCURS ; [] .dwattr $C$DW$160, DW_AT_TI_end_file("../driverlib/uart.c") .dwattr $C$DW$160, DW_AT_TI_end_line(0x4e1) .dwattr $C$DW$160, DW_AT_TI_end_column(0x01) .dwendentry .dwendtag $C$DW$160 .sect ".text" .clink .thumbfunc UARTCharPutNonBlocking .thumb .global UARTCharPutNonBlocking $C$DW$164 .dwtag DW_TAG_subprogram .dwattr $C$DW$164, DW_AT_name("UARTCharPutNonBlocking") .dwattr $C$DW$164, DW_AT_low_pc(UARTCharPutNonBlocking) .dwattr $C$DW$164, DW_AT_high_pc(0x00) .dwattr $C$DW$164, DW_AT_TI_symbol_name("UARTCharPutNonBlocking") .dwattr $C$DW$164, DW_AT_external .dwattr $C$DW$164, DW_AT_type(*$C$DW$T$38) .dwattr $C$DW$164, DW_AT_TI_begin_file("../driverlib/uart.c") .dwattr $C$DW$164, DW_AT_TI_begin_line(0x4f5) .dwattr $C$DW$164, DW_AT_TI_begin_column(0x01) .dwattr $C$DW$164, DW_AT_decl_file("../driverlib/uart.c") .dwattr $C$DW$164, DW_AT_decl_line(0x4f5) .dwattr $C$DW$164, DW_AT_decl_column(0x01) .dwattr $C$DW$164, DW_AT_TI_max_frame_size(0x08) .dwpsn file "../driverlib/uart.c",line 1270,column 1,is_stmt,address UARTCharPutNonBlocking,isa 1 .dwfde $C$DW$CIE, UARTCharPutNonBlocking $C$DW$165 .dwtag DW_TAG_formal_parameter .dwattr $C$DW$165, DW_AT_name("ui32Base") .dwattr $C$DW$165, DW_AT_TI_symbol_name("ui32Base") .dwattr $C$DW$165, DW_AT_type(*$C$DW$T$27) .dwattr $C$DW$165, DW_AT_location[DW_OP_reg0] $C$DW$166 .dwtag DW_TAG_formal_parameter .dwattr $C$DW$166, DW_AT_name("ucData") .dwattr $C$DW$166, DW_AT_TI_symbol_name("ucData") .dwattr $C$DW$166, DW_AT_type(*$C$DW$T$6) .dwattr $C$DW$166, DW_AT_location[DW_OP_reg1] ;---------------------------------------------------------------------- ; 1269 | UARTCharPutNonBlocking(uint32_t ui32Base, unsigned char ucData) ;---------------------------------------------------------------------- ;***************************************************************************** ;* FUNCTION NAME: UARTCharPutNonBlocking * ;* * ;* Regs Modified : A1,A2,SP,SR * ;* Regs Used : A1,A2,SP,LR,SR * ;* Local Frame Size : 0 Args + 8 Auto + 0 Save = 8 byte * ;***************************************************************************** UARTCharPutNonBlocking: ;* --------------------------------------------------------------------------* .dwcfi cfa_offset, 0 SUB SP, SP, #8 ; [DPU_V7M3_PIPE] .dwcfi cfa_offset, 8 $C$DW$167 .dwtag DW_TAG_variable .dwattr $C$DW$167, DW_AT_name("ui32Base") .dwattr $C$DW$167, DW_AT_TI_symbol_name("ui32Base") .dwattr $C$DW$167, DW_AT_type(*$C$DW$T$27) .dwattr $C$DW$167, DW_AT_location[DW_OP_breg13 0] $C$DW$168 .dwtag DW_TAG_variable .dwattr $C$DW$168, DW_AT_name("ucData") .dwattr $C$DW$168, DW_AT_TI_symbol_name("ucData") .dwattr $C$DW$168, DW_AT_type(*$C$DW$T$6) .dwattr $C$DW$168, DW_AT_location[DW_OP_breg13 4] ;---------------------------------------------------------------------- ; 1271 | // ; 1272 | // Check the arguments. ; 1273 | // ; 1274 | ASSERT(_UARTBaseValid(ui32Base)); ; 1276 | // ; 1277 | // See if there is space in the transmit FIFO. ; 1278 | // ;---------------------------------------------------------------------- STRB A2, [SP, #4] ; [DPU_V7M3_PIPE] |1270| STR A1, [SP, #0] ; [DPU_V7M3_PIPE] |1270| .dwpsn file "../driverlib/uart.c",line 1279,column 5,is_stmt,isa 1 ;---------------------------------------------------------------------- ; 1279 | if(!(HWREG(ui32Base + UART_O_FR) & UART_FR_TXFF)) ; 1281 | // ; 1282 | // Write this character to the transmit FIFO. ; 1283 | // ;---------------------------------------------------------------------- LDR A1, [SP, #0] ; [DPU_V7M3_PIPE] |1279| LDR A1, [A1, #24] ; [DPU_V7M3_PIPE] |1279| LSRS A1, A1, #6 ; [DPU_V7M3_PIPE] |1279| BCS ||$C$L21|| ; [DPU_V7M3_PIPE] |1279| ; BRANCHCC OCCURS {||$C$L21||} ; [] |1279| ;* --------------------------------------------------------------------------* .dwpsn file "../driverlib/uart.c",line 1284,column 9,is_stmt,isa 1 ;---------------------------------------------------------------------- ; 1284 | HWREG(ui32Base + UART_O_DR) = ucData; ; 1286 | // ; 1287 | // Success. ; 1288 | // ;---------------------------------------------------------------------- LDRB A1, [SP, #4] ; [DPU_V7M3_PIPE] |1284| LDR A2, [SP, #0] ; [DPU_V7M3_PIPE] |1284| STR A1, [A2, #0] ; [DPU_V7M3_PIPE] |1284| .dwpsn file "../driverlib/uart.c",line 1289,column 9,is_stmt,isa 1 ;---------------------------------------------------------------------- ; 1289 | return(true); ; 1291 | else ; 1293 | // ; 1294 | // There is no space in the transmit FIFO, so return a failure. ; 1295 | // ;---------------------------------------------------------------------- MOVS A1, #1 ; [DPU_V7M3_PIPE] |1289| B ||$C$L22|| ; [DPU_V7M3_PIPE] |1289| ; BRANCH OCCURS {||$C$L22||} ; [] |1289| ;* --------------------------------------------------------------------------* ;* --------------------------------------------------------------------------* ||$C$L21||: .dwpsn file "../driverlib/uart.c",line 1296,column 9,is_stmt,isa 1 ;---------------------------------------------------------------------- ; 1296 | return(false); ;---------------------------------------------------------------------- MOVS A1, #0 ; [DPU_V7M3_PIPE] |1296| ;* --------------------------------------------------------------------------* ||$C$L22||: .dwpsn file "../driverlib/uart.c",line 1298,column 1,is_stmt,isa 1 ADD SP, SP, #8 ; [DPU_V7M3_PIPE] .dwcfi cfa_offset, 0 $C$DW$169 .dwtag DW_TAG_TI_branch .dwattr $C$DW$169, DW_AT_low_pc(0x00) .dwattr $C$DW$169, DW_AT_TI_return BX LR ; [DPU_V7M3_PIPE] ; BRANCH OCCURS ; [] .dwattr $C$DW$164, DW_AT_TI_end_file("../driverlib/uart.c") .dwattr $C$DW$164, DW_AT_TI_end_line(0x512) .dwattr $C$DW$164, DW_AT_TI_end_column(0x01) .dwendentry .dwendtag $C$DW$164 .sect ".text" .clink .thumbfunc UARTCharPut .thumb .global UARTCharPut $C$DW$170 .dwtag DW_TAG_subprogram .dwattr $C$DW$170, DW_AT_name("UARTCharPut") .dwattr $C$DW$170, DW_AT_low_pc(UARTCharPut) .dwattr $C$DW$170, DW_AT_high_pc(0x00) .dwattr $C$DW$170, DW_AT_TI_symbol_name("UARTCharPut") .dwattr $C$DW$170, DW_AT_external .dwattr $C$DW$170, DW_AT_TI_begin_file("../driverlib/uart.c") .dwattr $C$DW$170, DW_AT_TI_begin_line(0x523) .dwattr $C$DW$170, DW_AT_TI_begin_column(0x01) .dwattr $C$DW$170, DW_AT_decl_file("../driverlib/uart.c") .dwattr $C$DW$170, DW_AT_decl_line(0x523) .dwattr $C$DW$170, DW_AT_decl_column(0x01) .dwattr $C$DW$170, DW_AT_TI_max_frame_size(0x08) .dwpsn file "../driverlib/uart.c",line 1316,column 1,is_stmt,address UARTCharPut,isa 1 .dwfde $C$DW$CIE, UARTCharPut $C$DW$171 .dwtag DW_TAG_formal_parameter .dwattr $C$DW$171, DW_AT_name("ui32Base") .dwattr $C$DW$171, DW_AT_TI_symbol_name("ui32Base") .dwattr $C$DW$171, DW_AT_type(*$C$DW$T$27) .dwattr $C$DW$171, DW_AT_location[DW_OP_reg0] $C$DW$172 .dwtag DW_TAG_formal_parameter .dwattr $C$DW$172, DW_AT_name("ucData") .dwattr $C$DW$172, DW_AT_TI_symbol_name("ucData") .dwattr $C$DW$172, DW_AT_type(*$C$DW$T$6) .dwattr $C$DW$172, DW_AT_location[DW_OP_reg1] ;---------------------------------------------------------------------- ; 1315 | UARTCharPut(uint32_t ui32Base, unsigned char ucData) ;---------------------------------------------------------------------- ;***************************************************************************** ;* FUNCTION NAME: UARTCharPut * ;* * ;* Regs Modified : A1,A2,SP,SR * ;* Regs Used : A1,A2,SP,LR,SR * ;* Local Frame Size : 0 Args + 8 Auto + 0 Save = 8 byte * ;***************************************************************************** UARTCharPut: ;* --------------------------------------------------------------------------* .dwcfi cfa_offset, 0 SUB SP, SP, #8 ; [DPU_V7M3_PIPE] .dwcfi cfa_offset, 8 $C$DW$173 .dwtag DW_TAG_variable .dwattr $C$DW$173, DW_AT_name("ui32Base") .dwattr $C$DW$173, DW_AT_TI_symbol_name("ui32Base") .dwattr $C$DW$173, DW_AT_type(*$C$DW$T$27) .dwattr $C$DW$173, DW_AT_location[DW_OP_breg13 0] $C$DW$174 .dwtag DW_TAG_variable .dwattr $C$DW$174, DW_AT_name("ucData") .dwattr $C$DW$174, DW_AT_TI_symbol_name("ucData") .dwattr $C$DW$174, DW_AT_type(*$C$DW$T$6) .dwattr $C$DW$174, DW_AT_location[DW_OP_breg13 4] ;---------------------------------------------------------------------- ; 1317 | // ; 1318 | // Check the arguments. ; 1319 | // ; 1320 | ASSERT(_UARTBaseValid(ui32Base)); ; 1322 | // ; 1323 | // Wait until space is available. ; 1324 | // ;---------------------------------------------------------------------- STRB A2, [SP, #4] ; [DPU_V7M3_PIPE] |1316| STR A1, [SP, #0] ; [DPU_V7M3_PIPE] |1316| .dwpsn file "../driverlib/uart.c",line 1325,column 5,is_stmt,isa 1 ;---------------------------------------------------------------------- ; 1325 | while(HWREG(ui32Base + UART_O_FR) & UART_FR_TXFF) ; 1329 | // ; 1330 | // Send the char. ; 1331 | // ;---------------------------------------------------------------------- ;* --------------------------------------------------------------------------* ;* BEGIN LOOP ||$C$L23|| ;* ;* Loop source line : 1325 ;* Loop closing brace source line : 1327 ;* Known Minimum Trip Count : 1 ;* Known Maximum Trip Count : 4294967295 ;* Known Max Trip Count Factor : 1 ;* --------------------------------------------------------------------------* ||$C$L23||: LDR A1, [SP, #0] ; [DPU_V7M3_PIPE] |1325| LDR A1, [A1, #24] ; [DPU_V7M3_PIPE] |1325| LSRS A1, A1, #6 ; [DPU_V7M3_PIPE] |1325| BCS ||$C$L23|| ; [DPU_V7M3_PIPE] |1325| ; BRANCHCC OCCURS {||$C$L23||} ; [] |1325| ;* --------------------------------------------------------------------------* .dwpsn file "../driverlib/uart.c",line 1332,column 5,is_stmt,isa 1 ;---------------------------------------------------------------------- ; 1332 | HWREG(ui32Base + UART_O_DR) = ucData; ;---------------------------------------------------------------------- LDRB A1, [SP, #4] ; [DPU_V7M3_PIPE] |1332| LDR A2, [SP, #0] ; [DPU_V7M3_PIPE] |1332| STR A1, [A2, #0] ; [DPU_V7M3_PIPE] |1332| .dwpsn file "../driverlib/uart.c",line 1333,column 1,is_stmt,isa 1 ADD SP, SP, #8 ; [DPU_V7M3_PIPE] .dwcfi cfa_offset, 0 $C$DW$175 .dwtag DW_TAG_TI_branch .dwattr $C$DW$175, DW_AT_low_pc(0x00) .dwattr $C$DW$175, DW_AT_TI_return BX LR ; [DPU_V7M3_PIPE] ; BRANCH OCCURS ; [] .dwattr $C$DW$170, DW_AT_TI_end_file("../driverlib/uart.c") .dwattr $C$DW$170, DW_AT_TI_end_line(0x535) .dwattr $C$DW$170, DW_AT_TI_end_column(0x01) .dwendentry .dwendtag $C$DW$170 .sect ".text" .clink .thumbfunc UARTBreakCtl .thumb .global UARTBreakCtl $C$DW$176 .dwtag DW_TAG_subprogram .dwattr $C$DW$176, DW_AT_name("UARTBreakCtl") .dwattr $C$DW$176, DW_AT_low_pc(UARTBreakCtl) .dwattr $C$DW$176, DW_AT_high_pc(0x00) .dwattr $C$DW$176, DW_AT_TI_symbol_name("UARTBreakCtl") .dwattr $C$DW$176, DW_AT_external .dwattr $C$DW$176, DW_AT_TI_begin_file("../driverlib/uart.c") .dwattr $C$DW$176, DW_AT_TI_begin_line(0x547) .dwattr $C$DW$176, DW_AT_TI_begin_column(0x01) .dwattr $C$DW$176, DW_AT_decl_file("../driverlib/uart.c") .dwattr $C$DW$176, DW_AT_decl_line(0x547) .dwattr $C$DW$176, DW_AT_decl_column(0x01) .dwattr $C$DW$176, DW_AT_TI_max_frame_size(0x08) .dwpsn file "../driverlib/uart.c",line 1352,column 1,is_stmt,address UARTBreakCtl,isa 1 .dwfde $C$DW$CIE, UARTBreakCtl $C$DW$177 .dwtag DW_TAG_formal_parameter .dwattr $C$DW$177, DW_AT_name("ui32Base") .dwattr $C$DW$177, DW_AT_TI_symbol_name("ui32Base") .dwattr $C$DW$177, DW_AT_type(*$C$DW$T$27) .dwattr $C$DW$177, DW_AT_location[DW_OP_reg0] $C$DW$178 .dwtag DW_TAG_formal_parameter .dwattr $C$DW$178, DW_AT_name("bBreakState") .dwattr $C$DW$178, DW_AT_TI_symbol_name("bBreakState") .dwattr $C$DW$178, DW_AT_type(*$C$DW$T$38) .dwattr $C$DW$178, DW_AT_location[DW_OP_reg1] ;---------------------------------------------------------------------- ; 1351 | UARTBreakCtl(uint32_t ui32Base, bool bBreakState) ;---------------------------------------------------------------------- ;***************************************************************************** ;* FUNCTION NAME: UARTBreakCtl * ;* * ;* Regs Modified : A1,A2,SP * ;* Regs Used : A1,A2,SP,LR * ;* Local Frame Size : 0 Args + 8 Auto + 0 Save = 8 byte * ;***************************************************************************** UARTBreakCtl: ;* --------------------------------------------------------------------------* .dwcfi cfa_offset, 0 SUB SP, SP, #8 ; [DPU_V7M3_PIPE] .dwcfi cfa_offset, 8 $C$DW$179 .dwtag DW_TAG_variable .dwattr $C$DW$179, DW_AT_name("ui32Base") .dwattr $C$DW$179, DW_AT_TI_symbol_name("ui32Base") .dwattr $C$DW$179, DW_AT_type(*$C$DW$T$27) .dwattr $C$DW$179, DW_AT_location[DW_OP_breg13 0] $C$DW$180 .dwtag DW_TAG_variable .dwattr $C$DW$180, DW_AT_name("bBreakState") .dwattr $C$DW$180, DW_AT_TI_symbol_name("bBreakState") .dwattr $C$DW$180, DW_AT_type(*$C$DW$T$38) .dwattr $C$DW$180, DW_AT_location[DW_OP_breg13 4] ;---------------------------------------------------------------------- ; 1353 | // ; 1354 | // Check the arguments. ; 1355 | // ; 1356 | ASSERT(_UARTBaseValid(ui32Base)); ; 1358 | // ; 1359 | // Set the break condition as requested. ; 1360 | // ;---------------------------------------------------------------------- STRB A2, [SP, #4] ; [DPU_V7M3_PIPE] |1352| STR A1, [SP, #0] ; [DPU_V7M3_PIPE] |1352| .dwpsn file "../driverlib/uart.c",line 1361,column 5,is_stmt,isa 1 ;---------------------------------------------------------------------- ; 1361 | HWREG(ui32Base + UART_O_LCRH) = ; 1362 | (bBreakState ? ; 1363 | (HWREG(ui32Base + UART_O_LCRH) | UART_LCRH_BRK) : ; 1364 | (HWREG(ui32Base + UART_O_LCRH) & ~(UART_LCRH_BRK))); ;---------------------------------------------------------------------- LDRB A1, [SP, #4] ; [DPU_V7M3_PIPE] |1361| CBZ A1, ||$C$L24|| ; [] ; BRANCHCC OCCURS {||$C$L24||} ; [] |1361| ;* --------------------------------------------------------------------------* LDR A1, [SP, #0] ; [DPU_V7M3_PIPE] |1361| LDR A1, [A1, #44] ; [DPU_V7M3_PIPE] |1361| ORR A1, A1, #1 ; [DPU_V7M3_PIPE] |1361| B ||$C$L25|| ; [DPU_V7M3_PIPE] |1361| ; BRANCH OCCURS {||$C$L25||} ; [] |1361| ;* --------------------------------------------------------------------------* ||$C$L24||: LDR A1, [SP, #0] ; [DPU_V7M3_PIPE] |1361| LDR A1, [A1, #44] ; [DPU_V7M3_PIPE] |1361| BIC A1, A1, #1 ; [DPU_V7M3_PIPE] |1361| ;* --------------------------------------------------------------------------* ||$C$L25||: LDR A2, [SP, #0] ; [DPU_V7M3_PIPE] |1361| STR A1, [A2, #44] ; [DPU_V7M3_PIPE] |1361| .dwpsn file "../driverlib/uart.c",line 1365,column 1,is_stmt,isa 1 ADD SP, SP, #8 ; [DPU_V7M3_PIPE] .dwcfi cfa_offset, 0 $C$DW$181 .dwtag DW_TAG_TI_branch .dwattr $C$DW$181, DW_AT_low_pc(0x00) .dwattr $C$DW$181, DW_AT_TI_return BX LR ; [DPU_V7M3_PIPE] ; BRANCH OCCURS ; [] .dwattr $C$DW$176, DW_AT_TI_end_file("../driverlib/uart.c") .dwattr $C$DW$176, DW_AT_TI_end_line(0x555) .dwattr $C$DW$176, DW_AT_TI_end_column(0x01) .dwendentry .dwendtag $C$DW$176 .sect ".text" .clink .thumbfunc UARTBusy .thumb .global UARTBusy $C$DW$182 .dwtag DW_TAG_subprogram .dwattr $C$DW$182, DW_AT_name("UARTBusy") .dwattr $C$DW$182, DW_AT_low_pc(UARTBusy) .dwattr $C$DW$182, DW_AT_high_pc(0x00) .dwattr $C$DW$182, DW_AT_TI_symbol_name("UARTBusy") .dwattr $C$DW$182, DW_AT_external .dwattr $C$DW$182, DW_AT_type(*$C$DW$T$38) .dwattr $C$DW$182, DW_AT_TI_begin_file("../driverlib/uart.c") .dwattr $C$DW$182, DW_AT_TI_begin_line(0x567) .dwattr $C$DW$182, DW_AT_TI_begin_column(0x01) .dwattr $C$DW$182, DW_AT_decl_file("../driverlib/uart.c") .dwattr $C$DW$182, DW_AT_decl_line(0x567) .dwattr $C$DW$182, DW_AT_decl_column(0x01) .dwattr $C$DW$182, DW_AT_TI_max_frame_size(0x08) .dwpsn file "../driverlib/uart.c",line 1384,column 1,is_stmt,address UARTBusy,isa 1 .dwfde $C$DW$CIE, UARTBusy $C$DW$183 .dwtag DW_TAG_formal_parameter .dwattr $C$DW$183, DW_AT_name("ui32Base") .dwattr $C$DW$183, DW_AT_TI_symbol_name("ui32Base") .dwattr $C$DW$183, DW_AT_type(*$C$DW$T$27) .dwattr $C$DW$183, DW_AT_location[DW_OP_reg0] ;---------------------------------------------------------------------- ; 1383 | UARTBusy(uint32_t ui32Base) ;---------------------------------------------------------------------- ;***************************************************************************** ;* FUNCTION NAME: UARTBusy * ;* * ;* Regs Modified : A1,A2,SP,SR * ;* Regs Used : A1,A2,SP,LR,SR * ;* Local Frame Size : 0 Args + 4 Auto + 0 Save = 4 byte * ;***************************************************************************** UARTBusy: ;* --------------------------------------------------------------------------* .dwcfi cfa_offset, 0 SUB SP, SP, #8 ; [DPU_V7M3_PIPE] .dwcfi cfa_offset, 8 $C$DW$184 .dwtag DW_TAG_variable .dwattr $C$DW$184, DW_AT_name("ui32Base") .dwattr $C$DW$184, DW_AT_TI_symbol_name("ui32Base") .dwattr $C$DW$184, DW_AT_type(*$C$DW$T$27) .dwattr $C$DW$184, DW_AT_location[DW_OP_breg13 0] ;---------------------------------------------------------------------- ; 1385 | // ; 1386 | // Check the argument. ; 1387 | // ; 1388 | ASSERT(_UARTBaseValid(ui32Base)); ; 1390 | // ; 1391 | // Determine if the UART is busy. ; 1392 | // ;---------------------------------------------------------------------- STR A1, [SP, #0] ; [DPU_V7M3_PIPE] |1384| .dwpsn file "../driverlib/uart.c",line 1393,column 5,is_stmt,isa 1 ;---------------------------------------------------------------------- ; 1393 | return((HWREG(ui32Base + UART_O_FR) & UART_FR_BUSY) ? true : false); ;---------------------------------------------------------------------- LDR A1, [SP, #0] ; [DPU_V7M3_PIPE] |1393| LDR A2, [A1, #24] ; [DPU_V7M3_PIPE] |1393| MOVS A1, #0 ; [DPU_V7M3_PIPE] |1393| LSRS A2, A2, #4 ; [DPU_V7M3_PIPE] |1393| BCC ||$C$L26|| ; [DPU_V7M3_PIPE] |1393| ; BRANCHCC OCCURS {||$C$L26||} ; [] |1393| ;* --------------------------------------------------------------------------* MOVS A2, #1 ; [DPU_V7M3_PIPE] |1393| B ||$C$L27|| ; [DPU_V7M3_PIPE] |1393| ; BRANCH OCCURS {||$C$L27||} ; [] |1393| ;* --------------------------------------------------------------------------* ||$C$L26||: MOVS A2, #0 ; [DPU_V7M3_PIPE] |1393| ;* --------------------------------------------------------------------------* ||$C$L27||: CBZ A2, ||$C$L28|| ; [] ; BRANCHCC OCCURS {||$C$L28||} ; [] |1393| ;* --------------------------------------------------------------------------* MOVS A1, #1 ; [DPU_V7M3_PIPE] |1393| ;* --------------------------------------------------------------------------* ||$C$L28||: .dwpsn file "../driverlib/uart.c",line 1394,column 1,is_stmt,isa 1 ADD SP, SP, #8 ; [DPU_V7M3_PIPE] .dwcfi cfa_offset, 0 $C$DW$185 .dwtag DW_TAG_TI_branch .dwattr $C$DW$185, DW_AT_low_pc(0x00) .dwattr $C$DW$185, DW_AT_TI_return BX LR ; [DPU_V7M3_PIPE] ; BRANCH OCCURS ; [] .dwattr $C$DW$182, DW_AT_TI_end_file("../driverlib/uart.c") .dwattr $C$DW$182, DW_AT_TI_end_line(0x572) .dwattr $C$DW$182, DW_AT_TI_end_column(0x01) .dwendentry .dwendtag $C$DW$182 .sect ".text" .clink .thumbfunc UARTIntRegister .thumb .global UARTIntRegister $C$DW$186 .dwtag DW_TAG_subprogram .dwattr $C$DW$186, DW_AT_name("UARTIntRegister") .dwattr $C$DW$186, DW_AT_low_pc(UARTIntRegister) .dwattr $C$DW$186, DW_AT_high_pc(0x00) .dwattr $C$DW$186, DW_AT_TI_symbol_name("UARTIntRegister") .dwattr $C$DW$186, DW_AT_external .dwattr $C$DW$186, DW_AT_TI_begin_file("../driverlib/uart.c") .dwattr $C$DW$186, DW_AT_TI_begin_line(0x588) .dwattr $C$DW$186, DW_AT_TI_begin_column(0x01) .dwattr $C$DW$186, DW_AT_decl_file("../driverlib/uart.c") .dwattr $C$DW$186, DW_AT_decl_line(0x588) .dwattr $C$DW$186, DW_AT_decl_column(0x01) .dwattr $C$DW$186, DW_AT_TI_max_frame_size(0x10) .dwpsn file "../driverlib/uart.c",line 1417,column 1,is_stmt,address UARTIntRegister,isa 1 .dwfde $C$DW$CIE, UARTIntRegister $C$DW$187 .dwtag DW_TAG_formal_parameter .dwattr $C$DW$187, DW_AT_name("ui32Base") .dwattr $C$DW$187, DW_AT_TI_symbol_name("ui32Base") .dwattr $C$DW$187, DW_AT_type(*$C$DW$T$27) .dwattr $C$DW$187, DW_AT_location[DW_OP_reg0] $C$DW$188 .dwtag DW_TAG_formal_parameter .dwattr $C$DW$188, DW_AT_name("pfnHandler") .dwattr $C$DW$188, DW_AT_TI_symbol_name("pfnHandler") .dwattr $C$DW$188, DW_AT_type(*$C$DW$T$25) .dwattr $C$DW$188, DW_AT_location[DW_OP_reg1] ;---------------------------------------------------------------------- ; 1416 | UARTIntRegister(uint32_t ui32Base, void (*pfnHandler)(void)) ;---------------------------------------------------------------------- ;***************************************************************************** ;* FUNCTION NAME: UARTIntRegister * ;* * ;* Regs Modified : A1,A2,A3,A4,V9,SP,LR,SR,D0,D0_hi,D1,D1_hi,D2,D2_hi, * ;* D3,D3_hi,D4,D4_hi,D5,D5_hi,D6,D6_hi,D7,D7_hi, * ;* FPEXC,FPSCR * ;* Regs Used : A1,A2,A3,A4,V9,SP,LR,SR,D0,D0_hi,D1,D1_hi,D2,D2_hi, * ;* D3,D3_hi,D4,D4_hi,D5,D5_hi,D6,D6_hi,D7,D7_hi, * ;* FPEXC,FPSCR * ;* Local Frame Size : 0 Args + 12 Auto + 4 Save = 16 byte * ;***************************************************************************** UARTIntRegister: ;* --------------------------------------------------------------------------* .dwcfi cfa_offset, 0 PUSH {A2, A3, A4, LR} ; [DPU_V7M3_PIPE] .dwcfi cfa_offset, 16 .dwcfi save_reg_to_mem, 14, -4 .dwcfi save_reg_to_mem, 3, -8 .dwcfi save_reg_to_mem, 2, -12 .dwcfi save_reg_to_mem, 1, -16 $C$DW$189 .dwtag DW_TAG_variable .dwattr $C$DW$189, DW_AT_name("ui32Base") .dwattr $C$DW$189, DW_AT_TI_symbol_name("ui32Base") .dwattr $C$DW$189, DW_AT_type(*$C$DW$T$27) .dwattr $C$DW$189, DW_AT_location[DW_OP_breg13 0] $C$DW$190 .dwtag DW_TAG_variable .dwattr $C$DW$190, DW_AT_name("pfnHandler") .dwattr $C$DW$190, DW_AT_TI_symbol_name("pfnHandler") .dwattr $C$DW$190, DW_AT_type(*$C$DW$T$25) .dwattr $C$DW$190, DW_AT_location[DW_OP_breg13 4] $C$DW$191 .dwtag DW_TAG_variable .dwattr $C$DW$191, DW_AT_name("ui32Int") .dwattr $C$DW$191, DW_AT_TI_symbol_name("ui32Int") .dwattr $C$DW$191, DW_AT_type(*$C$DW$T$27) .dwattr $C$DW$191, DW_AT_location[DW_OP_breg13 8] ;---------------------------------------------------------------------- ; 1418 | uint32_t ui32Int; ; 1420 | // ; 1421 | // Check the arguments. ; 1422 | // ; 1423 | ASSERT(_UARTBaseValid(ui32Base)); ; 1425 | // ; 1426 | // Determine the interrupt number based on the UART port. ; 1427 | // ;---------------------------------------------------------------------- STR A2, [SP, #4] ; [DPU_V7M3_PIPE] |1417| STR A1, [SP, #0] ; [DPU_V7M3_PIPE] |1417| .dwpsn file "../driverlib/uart.c",line 1428,column 5,is_stmt,isa 1 ;---------------------------------------------------------------------- ; 1428 | ui32Int = _UARTIntNumberGet(ui32Base); ; 1430 | ASSERT(ui32Int != 0); ; 1432 | // ; 1433 | // Register the interrupt handler. ; 1434 | // ;---------------------------------------------------------------------- LDR A1, [SP, #0] ; [DPU_V7M3_PIPE] |1428| $C$DW$192 .dwtag DW_TAG_TI_branch .dwattr $C$DW$192, DW_AT_low_pc(0x00) .dwattr $C$DW$192, DW_AT_name("_UARTIntNumberGet") .dwattr $C$DW$192, DW_AT_TI_call BL _UARTIntNumberGet ; [DPU_V7M3_PIPE] |1428| ; CALL OCCURS {_UARTIntNumberGet } ; [] |1428| STR A1, [SP, #8] ; [DPU_V7M3_PIPE] |1428| .dwpsn file "../driverlib/uart.c",line 1435,column 5,is_stmt,isa 1 ;---------------------------------------------------------------------- ; 1435 | IntRegister(ui32Int, pfnHandler); ; 1437 | // ; 1438 | // Enable the UART interrupt. ; 1439 | // ;---------------------------------------------------------------------- LDR A2, [SP, #4] ; [DPU_V7M3_PIPE] |1435| LDR A1, [SP, #8] ; [DPU_V7M3_PIPE] |1435| $C$DW$193 .dwtag DW_TAG_TI_branch .dwattr $C$DW$193, DW_AT_low_pc(0x00) .dwattr $C$DW$193, DW_AT_name("IntRegister") .dwattr $C$DW$193, DW_AT_TI_call BL IntRegister ; [DPU_V7M3_PIPE] |1435| ; CALL OCCURS {IntRegister } ; [] |1435| .dwpsn file "../driverlib/uart.c",line 1440,column 5,is_stmt,isa 1 ;---------------------------------------------------------------------- ; 1440 | IntEnable(ui32Int); ;---------------------------------------------------------------------- LDR A1, [SP, #8] ; [DPU_V7M3_PIPE] |1440| $C$DW$194 .dwtag DW_TAG_TI_branch .dwattr $C$DW$194, DW_AT_low_pc(0x00) .dwattr $C$DW$194, DW_AT_name("IntEnable") .dwattr $C$DW$194, DW_AT_TI_call BL IntEnable ; [DPU_V7M3_PIPE] |1440| ; CALL OCCURS {IntEnable } ; [] |1440| .dwpsn file "../driverlib/uart.c",line 1441,column 1,is_stmt,isa 1 $C$DW$195 .dwtag DW_TAG_TI_branch .dwattr $C$DW$195, DW_AT_low_pc(0x00) .dwattr $C$DW$195, DW_AT_TI_return POP {A2, A3, A4, PC} ; [DPU_V7M3_PIPE] .dwcfi cfa_offset, 0 .dwcfi restore_reg, 3 .dwcfi restore_reg, 2 .dwcfi restore_reg, 1 ; BRANCH OCCURS ; [] .dwattr $C$DW$186, DW_AT_TI_end_file("../driverlib/uart.c") .dwattr $C$DW$186, DW_AT_TI_end_line(0x5a1) .dwattr $C$DW$186, DW_AT_TI_end_column(0x01) .dwendentry .dwendtag $C$DW$186 .sect ".text" .clink .thumbfunc UARTIntUnregister .thumb .global UARTIntUnregister $C$DW$196 .dwtag DW_TAG_subprogram .dwattr $C$DW$196, DW_AT_name("UARTIntUnregister") .dwattr $C$DW$196, DW_AT_low_pc(UARTIntUnregister) .dwattr $C$DW$196, DW_AT_high_pc(0x00) .dwattr $C$DW$196, DW_AT_TI_symbol_name("UARTIntUnregister") .dwattr $C$DW$196, DW_AT_external .dwattr $C$DW$196, DW_AT_TI_begin_file("../driverlib/uart.c") .dwattr $C$DW$196, DW_AT_TI_begin_line(0x5b5) .dwattr $C$DW$196, DW_AT_TI_begin_column(0x01) .dwattr $C$DW$196, DW_AT_decl_file("../driverlib/uart.c") .dwattr $C$DW$196, DW_AT_decl_line(0x5b5) .dwattr $C$DW$196, DW_AT_decl_column(0x01) .dwattr $C$DW$196, DW_AT_TI_max_frame_size(0x10) .dwpsn file "../driverlib/uart.c",line 1462,column 1,is_stmt,address UARTIntUnregister,isa 1 .dwfde $C$DW$CIE, UARTIntUnregister $C$DW$197 .dwtag DW_TAG_formal_parameter .dwattr $C$DW$197, DW_AT_name("ui32Base") .dwattr $C$DW$197, DW_AT_TI_symbol_name("ui32Base") .dwattr $C$DW$197, DW_AT_type(*$C$DW$T$27) .dwattr $C$DW$197, DW_AT_location[DW_OP_reg0] ;---------------------------------------------------------------------- ; 1461 | UARTIntUnregister(uint32_t ui32Base) ;---------------------------------------------------------------------- ;***************************************************************************** ;* FUNCTION NAME: UARTIntUnregister * ;* * ;* Regs Modified : A1,A2,A3,A4,V9,SP,LR,SR,D0,D0_hi,D1,D1_hi,D2,D2_hi, * ;* D3,D3_hi,D4,D4_hi,D5,D5_hi,D6,D6_hi,D7,D7_hi, * ;* FPEXC,FPSCR * ;* Regs Used : A1,A2,A3,A4,V9,SP,LR,SR,D0,D0_hi,D1,D1_hi,D2,D2_hi, * ;* D3,D3_hi,D4,D4_hi,D5,D5_hi,D6,D6_hi,D7,D7_hi, * ;* FPEXC,FPSCR * ;* Local Frame Size : 0 Args + 8 Auto + 4 Save = 12 byte * ;***************************************************************************** UARTIntUnregister: ;* --------------------------------------------------------------------------* .dwcfi cfa_offset, 0 PUSH {A2, A3, A4, LR} ; [DPU_V7M3_PIPE] .dwcfi cfa_offset, 16 .dwcfi save_reg_to_mem, 14, -4 .dwcfi save_reg_to_mem, 3, -8 .dwcfi save_reg_to_mem, 2, -12 .dwcfi save_reg_to_mem, 1, -16 $C$DW$198 .dwtag DW_TAG_variable .dwattr $C$DW$198, DW_AT_name("ui32Base") .dwattr $C$DW$198, DW_AT_TI_symbol_name("ui32Base") .dwattr $C$DW$198, DW_AT_type(*$C$DW$T$27) .dwattr $C$DW$198, DW_AT_location[DW_OP_breg13 0] $C$DW$199 .dwtag DW_TAG_variable .dwattr $C$DW$199, DW_AT_name("ui32Int") .dwattr $C$DW$199, DW_AT_TI_symbol_name("ui32Int") .dwattr $C$DW$199, DW_AT_type(*$C$DW$T$27) .dwattr $C$DW$199, DW_AT_location[DW_OP_breg13 4] ;---------------------------------------------------------------------- ; 1463 | uint32_t ui32Int; ; 1465 | // ; 1466 | // Check the arguments. ; 1467 | // ; 1468 | ASSERT(_UARTBaseValid(ui32Base)); ; 1470 | // ; 1471 | // Determine the interrupt number based on the UART port. ; 1472 | // ;---------------------------------------------------------------------- STR A1, [SP, #0] ; [DPU_V7M3_PIPE] |1462| .dwpsn file "../driverlib/uart.c",line 1473,column 5,is_stmt,isa 1 ;---------------------------------------------------------------------- ; 1473 | ui32Int = _UARTIntNumberGet(ui32Base); ; 1475 | ASSERT(ui32Int != 0); ; 1477 | // ; 1478 | // Disable the interrupt. ; 1479 | // ;---------------------------------------------------------------------- LDR A1, [SP, #0] ; [DPU_V7M3_PIPE] |1473| $C$DW$200 .dwtag DW_TAG_TI_branch .dwattr $C$DW$200, DW_AT_low_pc(0x00) .dwattr $C$DW$200, DW_AT_name("_UARTIntNumberGet") .dwattr $C$DW$200, DW_AT_TI_call BL _UARTIntNumberGet ; [DPU_V7M3_PIPE] |1473| ; CALL OCCURS {_UARTIntNumberGet } ; [] |1473| STR A1, [SP, #4] ; [DPU_V7M3_PIPE] |1473| .dwpsn file "../driverlib/uart.c",line 1480,column 5,is_stmt,isa 1 ;---------------------------------------------------------------------- ; 1480 | IntDisable(ui32Int); ; 1482 | // ; 1483 | // Unregister the interrupt handler. ; 1484 | // ;---------------------------------------------------------------------- LDR A1, [SP, #4] ; [DPU_V7M3_PIPE] |1480| $C$DW$201 .dwtag DW_TAG_TI_branch .dwattr $C$DW$201, DW_AT_low_pc(0x00) .dwattr $C$DW$201, DW_AT_name("IntDisable") .dwattr $C$DW$201, DW_AT_TI_call BL IntDisable ; [DPU_V7M3_PIPE] |1480| ; CALL OCCURS {IntDisable } ; [] |1480| .dwpsn file "../driverlib/uart.c",line 1485,column 5,is_stmt,isa 1 ;---------------------------------------------------------------------- ; 1485 | IntUnregister(ui32Int); ;---------------------------------------------------------------------- LDR A1, [SP, #4] ; [DPU_V7M3_PIPE] |1485| $C$DW$202 .dwtag DW_TAG_TI_branch .dwattr $C$DW$202, DW_AT_low_pc(0x00) .dwattr $C$DW$202, DW_AT_name("IntUnregister") .dwattr $C$DW$202, DW_AT_TI_call BL IntUnregister ; [DPU_V7M3_PIPE] |1485| ; CALL OCCURS {IntUnregister } ; [] |1485| .dwpsn file "../driverlib/uart.c",line 1486,column 1,is_stmt,isa 1 $C$DW$203 .dwtag DW_TAG_TI_branch .dwattr $C$DW$203, DW_AT_low_pc(0x00) .dwattr $C$DW$203, DW_AT_TI_return POP {A2, A3, A4, PC} ; [DPU_V7M3_PIPE] .dwcfi cfa_offset, 0 .dwcfi restore_reg, 3 .dwcfi restore_reg, 2 .dwcfi restore_reg, 1 ; BRANCH OCCURS ; [] .dwattr $C$DW$196, DW_AT_TI_end_file("../driverlib/uart.c") .dwattr $C$DW$196, DW_AT_TI_end_line(0x5ce) .dwattr $C$DW$196, DW_AT_TI_end_column(0x01) .dwendentry .dwendtag $C$DW$196 ;****************************************************************************** ;* CONSTANT TABLE * ;****************************************************************************** .sect ".text" .align 4 ||$C$CON6||: .bits -770,32 .sect ".text" .clink .thumbfunc UARTIntEnable .thumb .global UARTIntEnable $C$DW$204 .dwtag DW_TAG_subprogram .dwattr $C$DW$204, DW_AT_name("UARTIntEnable") .dwattr $C$DW$204, DW_AT_low_pc(UARTIntEnable) .dwattr $C$DW$204, DW_AT_high_pc(0x00) .dwattr $C$DW$204, DW_AT_TI_symbol_name("UARTIntEnable") .dwattr $C$DW$204, DW_AT_external .dwattr $C$DW$204, DW_AT_TI_begin_file("../driverlib/uart.c") .dwattr $C$DW$204, DW_AT_TI_begin_line(0x5ee) .dwattr $C$DW$204, DW_AT_TI_begin_column(0x01) .dwattr $C$DW$204, DW_AT_decl_file("../driverlib/uart.c") .dwattr $C$DW$204, DW_AT_decl_line(0x5ee) .dwattr $C$DW$204, DW_AT_decl_column(0x01) .dwattr $C$DW$204, DW_AT_TI_max_frame_size(0x08) .dwpsn file "../driverlib/uart.c",line 1519,column 1,is_stmt,address UARTIntEnable,isa 1 .dwfde $C$DW$CIE, UARTIntEnable $C$DW$205 .dwtag DW_TAG_formal_parameter .dwattr $C$DW$205, DW_AT_name("ui32Base") .dwattr $C$DW$205, DW_AT_TI_symbol_name("ui32Base") .dwattr $C$DW$205, DW_AT_type(*$C$DW$T$27) .dwattr $C$DW$205, DW_AT_location[DW_OP_reg0] $C$DW$206 .dwtag DW_TAG_formal_parameter .dwattr $C$DW$206, DW_AT_name("ui32IntFlags") .dwattr $C$DW$206, DW_AT_TI_symbol_name("ui32IntFlags") .dwattr $C$DW$206, DW_AT_type(*$C$DW$T$27) .dwattr $C$DW$206, DW_AT_location[DW_OP_reg1] ;---------------------------------------------------------------------- ; 1518 | UARTIntEnable(uint32_t ui32Base, uint32_t ui32IntFlags) ;---------------------------------------------------------------------- ;***************************************************************************** ;* FUNCTION NAME: UARTIntEnable * ;* * ;* Regs Modified : A1,A2,A3,SP,SR * ;* Regs Used : A1,A2,A3,SP,LR,SR * ;* Local Frame Size : 0 Args + 8 Auto + 0 Save = 8 byte * ;***************************************************************************** UARTIntEnable: ;* --------------------------------------------------------------------------* .dwcfi cfa_offset, 0 SUB SP, SP, #8 ; [DPU_V7M3_PIPE] .dwcfi cfa_offset, 8 $C$DW$207 .dwtag DW_TAG_variable .dwattr $C$DW$207, DW_AT_name("ui32Base") .dwattr $C$DW$207, DW_AT_TI_symbol_name("ui32Base") .dwattr $C$DW$207, DW_AT_type(*$C$DW$T$27) .dwattr $C$DW$207, DW_AT_location[DW_OP_breg13 0] $C$DW$208 .dwtag DW_TAG_variable .dwattr $C$DW$208, DW_AT_name("ui32IntFlags") .dwattr $C$DW$208, DW_AT_TI_symbol_name("ui32IntFlags") .dwattr $C$DW$208, DW_AT_type(*$C$DW$T$27) .dwattr $C$DW$208, DW_AT_location[DW_OP_breg13 4] ;---------------------------------------------------------------------- ; 1520 | // ; 1521 | // Check the arguments. ; 1522 | // ; 1523 | ASSERT(_UARTBaseValid(ui32Base)); ; 1525 | // ; 1526 | // Enable the specified interrupts. ; 1527 | // ;---------------------------------------------------------------------- STR A2, [SP, #4] ; [DPU_V7M3_PIPE] |1519| STR A1, [SP, #0] ; [DPU_V7M3_PIPE] |1519| .dwpsn file "../driverlib/uart.c",line 1528,column 5,is_stmt,isa 1 ;---------------------------------------------------------------------- ; 1528 | HWREG(ui32Base + UART_O_IM) |= ui32IntFlags; ;---------------------------------------------------------------------- LDR A1, [SP, #0] ; [DPU_V7M3_PIPE] |1528| LDR A2, [SP, #4] ; [DPU_V7M3_PIPE] |1528| ADDS A1, A1, #56 ; [DPU_V7M3_PIPE] |1528| LDR A3, [A1, #0] ; [DPU_V7M3_PIPE] |1528| ORRS A2, A2, A3 ; [DPU_V7M3_PIPE] |1528| STR A2, [A1, #0] ; [DPU_V7M3_PIPE] |1528| .dwpsn file "../driverlib/uart.c",line 1529,column 1,is_stmt,isa 1 ADD SP, SP, #8 ; [DPU_V7M3_PIPE] .dwcfi cfa_offset, 0 $C$DW$209 .dwtag DW_TAG_TI_branch .dwattr $C$DW$209, DW_AT_low_pc(0x00) .dwattr $C$DW$209, DW_AT_TI_return BX LR ; [DPU_V7M3_PIPE] ; BRANCH OCCURS ; [] .dwattr $C$DW$204, DW_AT_TI_end_file("../driverlib/uart.c") .dwattr $C$DW$204, DW_AT_TI_end_line(0x5f9) .dwattr $C$DW$204, DW_AT_TI_end_column(0x01) .dwendentry .dwendtag $C$DW$204 .sect ".text" .clink .thumbfunc UARTIntDisable .thumb .global UARTIntDisable $C$DW$210 .dwtag DW_TAG_subprogram .dwattr $C$DW$210, DW_AT_name("UARTIntDisable") .dwattr $C$DW$210, DW_AT_low_pc(UARTIntDisable) .dwattr $C$DW$210, DW_AT_high_pc(0x00) .dwattr $C$DW$210, DW_AT_TI_symbol_name("UARTIntDisable") .dwattr $C$DW$210, DW_AT_external .dwattr $C$DW$210, DW_AT_TI_begin_file("../driverlib/uart.c") .dwattr $C$DW$210, DW_AT_TI_begin_line(0x60e) .dwattr $C$DW$210, DW_AT_TI_begin_column(0x01) .dwattr $C$DW$210, DW_AT_decl_file("../driverlib/uart.c") .dwattr $C$DW$210, DW_AT_decl_line(0x60e) .dwattr $C$DW$210, DW_AT_decl_column(0x01) .dwattr $C$DW$210, DW_AT_TI_max_frame_size(0x08) .dwpsn file "../driverlib/uart.c",line 1551,column 1,is_stmt,address UARTIntDisable,isa 1 .dwfde $C$DW$CIE, UARTIntDisable $C$DW$211 .dwtag DW_TAG_formal_parameter .dwattr $C$DW$211, DW_AT_name("ui32Base") .dwattr $C$DW$211, DW_AT_TI_symbol_name("ui32Base") .dwattr $C$DW$211, DW_AT_type(*$C$DW$T$27) .dwattr $C$DW$211, DW_AT_location[DW_OP_reg0] $C$DW$212 .dwtag DW_TAG_formal_parameter .dwattr $C$DW$212, DW_AT_name("ui32IntFlags") .dwattr $C$DW$212, DW_AT_TI_symbol_name("ui32IntFlags") .dwattr $C$DW$212, DW_AT_type(*$C$DW$T$27) .dwattr $C$DW$212, DW_AT_location[DW_OP_reg1] ;---------------------------------------------------------------------- ; 1550 | UARTIntDisable(uint32_t ui32Base, uint32_t ui32IntFlags) ;---------------------------------------------------------------------- ;***************************************************************************** ;* FUNCTION NAME: UARTIntDisable * ;* * ;* Regs Modified : A1,A2,A3,SP,SR * ;* Regs Used : A1,A2,A3,SP,LR,SR * ;* Local Frame Size : 0 Args + 8 Auto + 0 Save = 8 byte * ;***************************************************************************** UARTIntDisable: ;* --------------------------------------------------------------------------* .dwcfi cfa_offset, 0 SUB SP, SP, #8 ; [DPU_V7M3_PIPE] .dwcfi cfa_offset, 8 $C$DW$213 .dwtag DW_TAG_variable .dwattr $C$DW$213, DW_AT_name("ui32Base") .dwattr $C$DW$213, DW_AT_TI_symbol_name("ui32Base") .dwattr $C$DW$213, DW_AT_type(*$C$DW$T$27) .dwattr $C$DW$213, DW_AT_location[DW_OP_breg13 0] $C$DW$214 .dwtag DW_TAG_variable .dwattr $C$DW$214, DW_AT_name("ui32IntFlags") .dwattr $C$DW$214, DW_AT_TI_symbol_name("ui32IntFlags") .dwattr $C$DW$214, DW_AT_type(*$C$DW$T$27) .dwattr $C$DW$214, DW_AT_location[DW_OP_breg13 4] ;---------------------------------------------------------------------- ; 1552 | // ; 1553 | // Check the arguments. ; 1554 | // ; 1555 | ASSERT(_UARTBaseValid(ui32Base)); ; 1557 | // ; 1558 | // Disable the specified interrupts. ; 1559 | // ;---------------------------------------------------------------------- STR A2, [SP, #4] ; [DPU_V7M3_PIPE] |1551| STR A1, [SP, #0] ; [DPU_V7M3_PIPE] |1551| .dwpsn file "../driverlib/uart.c",line 1560,column 5,is_stmt,isa 1 ;---------------------------------------------------------------------- ; 1560 | HWREG(ui32Base + UART_O_IM) &= ~(ui32IntFlags); ;---------------------------------------------------------------------- LDR A1, [SP, #0] ; [DPU_V7M3_PIPE] |1560| LDR A3, [SP, #4] ; [DPU_V7M3_PIPE] |1560| ADDS A1, A1, #56 ; [DPU_V7M3_PIPE] |1560| LDR A2, [A1, #0] ; [DPU_V7M3_PIPE] |1560| BICS A2, A2, A3 ; [DPU_V7M3_PIPE] |1560| STR A2, [A1, #0] ; [DPU_V7M3_PIPE] |1560| .dwpsn file "../driverlib/uart.c",line 1561,column 1,is_stmt,isa 1 ADD SP, SP, #8 ; [DPU_V7M3_PIPE] .dwcfi cfa_offset, 0 $C$DW$215 .dwtag DW_TAG_TI_branch .dwattr $C$DW$215, DW_AT_low_pc(0x00) .dwattr $C$DW$215, DW_AT_TI_return BX LR ; [DPU_V7M3_PIPE] ; BRANCH OCCURS ; [] .dwattr $C$DW$210, DW_AT_TI_end_file("../driverlib/uart.c") .dwattr $C$DW$210, DW_AT_TI_end_line(0x619) .dwattr $C$DW$210, DW_AT_TI_end_column(0x01) .dwendentry .dwendtag $C$DW$210 .sect ".text" .clink .thumbfunc UARTIntStatus .thumb .global UARTIntStatus $C$DW$216 .dwtag DW_TAG_subprogram .dwattr $C$DW$216, DW_AT_name("UARTIntStatus") .dwattr $C$DW$216, DW_AT_low_pc(UARTIntStatus) .dwattr $C$DW$216, DW_AT_high_pc(0x00) .dwattr $C$DW$216, DW_AT_TI_symbol_name("UARTIntStatus") .dwattr $C$DW$216, DW_AT_external .dwattr $C$DW$216, DW_AT_type(*$C$DW$T$27) .dwattr $C$DW$216, DW_AT_TI_begin_file("../driverlib/uart.c") .dwattr $C$DW$216, DW_AT_TI_begin_line(0x62c) .dwattr $C$DW$216, DW_AT_TI_begin_column(0x01) .dwattr $C$DW$216, DW_AT_decl_file("../driverlib/uart.c") .dwattr $C$DW$216, DW_AT_decl_line(0x62c) .dwattr $C$DW$216, DW_AT_decl_column(0x01) .dwattr $C$DW$216, DW_AT_TI_max_frame_size(0x08) .dwpsn file "../driverlib/uart.c",line 1581,column 1,is_stmt,address UARTIntStatus,isa 1 .dwfde $C$DW$CIE, UARTIntStatus $C$DW$217 .dwtag DW_TAG_formal_parameter .dwattr $C$DW$217, DW_AT_name("ui32Base") .dwattr $C$DW$217, DW_AT_TI_symbol_name("ui32Base") .dwattr $C$DW$217, DW_AT_type(*$C$DW$T$27) .dwattr $C$DW$217, DW_AT_location[DW_OP_reg0] $C$DW$218 .dwtag DW_TAG_formal_parameter .dwattr $C$DW$218, DW_AT_name("bMasked") .dwattr $C$DW$218, DW_AT_TI_symbol_name("bMasked") .dwattr $C$DW$218, DW_AT_type(*$C$DW$T$38) .dwattr $C$DW$218, DW_AT_location[DW_OP_reg1] ;---------------------------------------------------------------------- ; 1580 | UARTIntStatus(uint32_t ui32Base, bool bMasked) ;---------------------------------------------------------------------- ;***************************************************************************** ;* FUNCTION NAME: UARTIntStatus * ;* * ;* Regs Modified : A1,SP * ;* Regs Used : A1,A2,SP,LR * ;* Local Frame Size : 0 Args + 8 Auto + 0 Save = 8 byte * ;***************************************************************************** UARTIntStatus: ;* --------------------------------------------------------------------------* .dwcfi cfa_offset, 0 SUB SP, SP, #8 ; [DPU_V7M3_PIPE] .dwcfi cfa_offset, 8 $C$DW$219 .dwtag DW_TAG_variable .dwattr $C$DW$219, DW_AT_name("ui32Base") .dwattr $C$DW$219, DW_AT_TI_symbol_name("ui32Base") .dwattr $C$DW$219, DW_AT_type(*$C$DW$T$27) .dwattr $C$DW$219, DW_AT_location[DW_OP_breg13 0] $C$DW$220 .dwtag DW_TAG_variable .dwattr $C$DW$220, DW_AT_name("bMasked") .dwattr $C$DW$220, DW_AT_TI_symbol_name("bMasked") .dwattr $C$DW$220, DW_AT_type(*$C$DW$T$38) .dwattr $C$DW$220, DW_AT_location[DW_OP_breg13 4] ;---------------------------------------------------------------------- ; 1582 | // ; 1583 | // Check the arguments. ; 1584 | // ; 1585 | ASSERT(_UARTBaseValid(ui32Base)); ; 1587 | // ; 1588 | // Return either the interrupt status or the raw interrupt status as ; 1589 | // requested. ; 1590 | // ;---------------------------------------------------------------------- STRB A2, [SP, #4] ; [DPU_V7M3_PIPE] |1581| STR A1, [SP, #0] ; [DPU_V7M3_PIPE] |1581| .dwpsn file "../driverlib/uart.c",line 1591,column 5,is_stmt,isa 1 ;---------------------------------------------------------------------- ; 1591 | if(bMasked) ;---------------------------------------------------------------------- LDRB A1, [SP, #4] ; [DPU_V7M3_PIPE] |1591| CBZ A1, ||$C$L29|| ; [] ; BRANCHCC OCCURS {||$C$L29||} ; [] |1591| ;* --------------------------------------------------------------------------* .dwpsn file "../driverlib/uart.c",line 1593,column 9,is_stmt,isa 1 ;---------------------------------------------------------------------- ; 1593 | return(HWREG(ui32Base + UART_O_MIS)); ; 1595 | else ;---------------------------------------------------------------------- LDR A1, [SP, #0] ; [DPU_V7M3_PIPE] |1593| LDR A1, [A1, #64] ; [DPU_V7M3_PIPE] |1593| B ||$C$L30|| ; [DPU_V7M3_PIPE] |1593| ; BRANCH OCCURS {||$C$L30||} ; [] |1593| ;* --------------------------------------------------------------------------* ;* --------------------------------------------------------------------------* ||$C$L29||: .dwpsn file "../driverlib/uart.c",line 1597,column 9,is_stmt,isa 1 ;---------------------------------------------------------------------- ; 1597 | return(HWREG(ui32Base + UART_O_RIS)); ;---------------------------------------------------------------------- LDR A1, [SP, #0] ; [DPU_V7M3_PIPE] |1597| LDR A1, [A1, #60] ; [DPU_V7M3_PIPE] |1597| ;* --------------------------------------------------------------------------* ||$C$L30||: .dwpsn file "../driverlib/uart.c",line 1599,column 1,is_stmt,isa 1 ADD SP, SP, #8 ; [DPU_V7M3_PIPE] .dwcfi cfa_offset, 0 $C$DW$221 .dwtag DW_TAG_TI_branch .dwattr $C$DW$221, DW_AT_low_pc(0x00) .dwattr $C$DW$221, DW_AT_TI_return BX LR ; [DPU_V7M3_PIPE] ; BRANCH OCCURS ; [] .dwattr $C$DW$216, DW_AT_TI_end_file("../driverlib/uart.c") .dwattr $C$DW$216, DW_AT_TI_end_line(0x63f) .dwattr $C$DW$216, DW_AT_TI_end_column(0x01) .dwendentry .dwendtag $C$DW$216 .sect ".text" .clink .thumbfunc UARTIntClear .thumb .global UARTIntClear $C$DW$222 .dwtag DW_TAG_subprogram .dwattr $C$DW$222, DW_AT_name("UARTIntClear") .dwattr $C$DW$222, DW_AT_low_pc(UARTIntClear) .dwattr $C$DW$222, DW_AT_high_pc(0x00) .dwattr $C$DW$222, DW_AT_TI_symbol_name("UARTIntClear") .dwattr $C$DW$222, DW_AT_external .dwattr $C$DW$222, DW_AT_TI_begin_file("../driverlib/uart.c") .dwattr $C$DW$222, DW_AT_TI_begin_line(0x65c) .dwattr $C$DW$222, DW_AT_TI_begin_column(0x01) .dwattr $C$DW$222, DW_AT_decl_file("../driverlib/uart.c") .dwattr $C$DW$222, DW_AT_decl_line(0x65c) .dwattr $C$DW$222, DW_AT_decl_column(0x01) .dwattr $C$DW$222, DW_AT_TI_max_frame_size(0x08) .dwpsn file "../driverlib/uart.c",line 1629,column 1,is_stmt,address UARTIntClear,isa 1 .dwfde $C$DW$CIE, UARTIntClear $C$DW$223 .dwtag DW_TAG_formal_parameter .dwattr $C$DW$223, DW_AT_name("ui32Base") .dwattr $C$DW$223, DW_AT_TI_symbol_name("ui32Base") .dwattr $C$DW$223, DW_AT_type(*$C$DW$T$27) .dwattr $C$DW$223, DW_AT_location[DW_OP_reg0] $C$DW$224 .dwtag DW_TAG_formal_parameter .dwattr $C$DW$224, DW_AT_name("ui32IntFlags") .dwattr $C$DW$224, DW_AT_TI_symbol_name("ui32IntFlags") .dwattr $C$DW$224, DW_AT_type(*$C$DW$T$27) .dwattr $C$DW$224, DW_AT_location[DW_OP_reg1] ;---------------------------------------------------------------------- ; 1628 | UARTIntClear(uint32_t ui32Base, uint32_t ui32IntFlags) ;---------------------------------------------------------------------- ;***************************************************************************** ;* FUNCTION NAME: UARTIntClear * ;* * ;* Regs Modified : A1,A2,SP * ;* Regs Used : A1,A2,SP,LR * ;* Local Frame Size : 0 Args + 8 Auto + 0 Save = 8 byte * ;***************************************************************************** UARTIntClear: ;* --------------------------------------------------------------------------* .dwcfi cfa_offset, 0 SUB SP, SP, #8 ; [DPU_V7M3_PIPE] .dwcfi cfa_offset, 8 $C$DW$225 .dwtag DW_TAG_variable .dwattr $C$DW$225, DW_AT_name("ui32Base") .dwattr $C$DW$225, DW_AT_TI_symbol_name("ui32Base") .dwattr $C$DW$225, DW_AT_type(*$C$DW$T$27) .dwattr $C$DW$225, DW_AT_location[DW_OP_breg13 0] $C$DW$226 .dwtag DW_TAG_variable .dwattr $C$DW$226, DW_AT_name("ui32IntFlags") .dwattr $C$DW$226, DW_AT_TI_symbol_name("ui32IntFlags") .dwattr $C$DW$226, DW_AT_type(*$C$DW$T$27) .dwattr $C$DW$226, DW_AT_location[DW_OP_breg13 4] ;---------------------------------------------------------------------- ; 1630 | // ; 1631 | // Check the arguments. ; 1632 | // ; 1633 | ASSERT(_UARTBaseValid(ui32Base)); ; 1635 | // ; 1636 | // Clear the requested interrupt sources. ; 1637 | // ;---------------------------------------------------------------------- STR A2, [SP, #4] ; [DPU_V7M3_PIPE] |1629| STR A1, [SP, #0] ; [DPU_V7M3_PIPE] |1629| .dwpsn file "../driverlib/uart.c",line 1638,column 5,is_stmt,isa 1 ;---------------------------------------------------------------------- ; 1638 | HWREG(ui32Base + UART_O_ICR) = ui32IntFlags; ;---------------------------------------------------------------------- LDR A1, [SP, #4] ; [DPU_V7M3_PIPE] |1638| LDR A2, [SP, #0] ; [DPU_V7M3_PIPE] |1638| STR A1, [A2, #68] ; [DPU_V7M3_PIPE] |1638| .dwpsn file "../driverlib/uart.c",line 1639,column 1,is_stmt,isa 1 ADD SP, SP, #8 ; [DPU_V7M3_PIPE] .dwcfi cfa_offset, 0 $C$DW$227 .dwtag DW_TAG_TI_branch .dwattr $C$DW$227, DW_AT_low_pc(0x00) .dwattr $C$DW$227, DW_AT_TI_return BX LR ; [DPU_V7M3_PIPE] ; BRANCH OCCURS ; [] .dwattr $C$DW$222, DW_AT_TI_end_file("../driverlib/uart.c") .dwattr $C$DW$222, DW_AT_TI_end_line(0x667) .dwattr $C$DW$222, DW_AT_TI_end_column(0x01) .dwendentry .dwendtag $C$DW$222 .sect ".text" .clink .thumbfunc UARTDMAEnable .thumb .global UARTDMAEnable $C$DW$228 .dwtag DW_TAG_subprogram .dwattr $C$DW$228, DW_AT_name("UARTDMAEnable") .dwattr $C$DW$228, DW_AT_low_pc(UARTDMAEnable) .dwattr $C$DW$228, DW_AT_high_pc(0x00) .dwattr $C$DW$228, DW_AT_TI_symbol_name("UARTDMAEnable") .dwattr $C$DW$228, DW_AT_external .dwattr $C$DW$228, DW_AT_TI_begin_file("../driverlib/uart.c") .dwattr $C$DW$228, DW_AT_TI_begin_line(0x680) .dwattr $C$DW$228, DW_AT_TI_begin_column(0x01) .dwattr $C$DW$228, DW_AT_decl_file("../driverlib/uart.c") .dwattr $C$DW$228, DW_AT_decl_line(0x680) .dwattr $C$DW$228, DW_AT_decl_column(0x01) .dwattr $C$DW$228, DW_AT_TI_max_frame_size(0x08) .dwpsn file "../driverlib/uart.c",line 1665,column 1,is_stmt,address UARTDMAEnable,isa 1 .dwfde $C$DW$CIE, UARTDMAEnable $C$DW$229 .dwtag DW_TAG_formal_parameter .dwattr $C$DW$229, DW_AT_name("ui32Base") .dwattr $C$DW$229, DW_AT_TI_symbol_name("ui32Base") .dwattr $C$DW$229, DW_AT_type(*$C$DW$T$27) .dwattr $C$DW$229, DW_AT_location[DW_OP_reg0] $C$DW$230 .dwtag DW_TAG_formal_parameter .dwattr $C$DW$230, DW_AT_name("ui32DMAFlags") .dwattr $C$DW$230, DW_AT_TI_symbol_name("ui32DMAFlags") .dwattr $C$DW$230, DW_AT_type(*$C$DW$T$27) .dwattr $C$DW$230, DW_AT_location[DW_OP_reg1] ;---------------------------------------------------------------------- ; 1664 | UARTDMAEnable(uint32_t ui32Base, uint32_t ui32DMAFlags) ;---------------------------------------------------------------------- ;***************************************************************************** ;* FUNCTION NAME: UARTDMAEnable * ;* * ;* Regs Modified : A1,A2,A3,SP,SR * ;* Regs Used : A1,A2,A3,SP,LR,SR * ;* Local Frame Size : 0 Args + 8 Auto + 0 Save = 8 byte * ;***************************************************************************** UARTDMAEnable: ;* --------------------------------------------------------------------------* .dwcfi cfa_offset, 0 SUB SP, SP, #8 ; [DPU_V7M3_PIPE] .dwcfi cfa_offset, 8 $C$DW$231 .dwtag DW_TAG_variable .dwattr $C$DW$231, DW_AT_name("ui32Base") .dwattr $C$DW$231, DW_AT_TI_symbol_name("ui32Base") .dwattr $C$DW$231, DW_AT_type(*$C$DW$T$27) .dwattr $C$DW$231, DW_AT_location[DW_OP_breg13 0] $C$DW$232 .dwtag DW_TAG_variable .dwattr $C$DW$232, DW_AT_name("ui32DMAFlags") .dwattr $C$DW$232, DW_AT_TI_symbol_name("ui32DMAFlags") .dwattr $C$DW$232, DW_AT_type(*$C$DW$T$27) .dwattr $C$DW$232, DW_AT_location[DW_OP_breg13 4] ;---------------------------------------------------------------------- ; 1666 | // ; 1667 | // Check the arguments. ; 1668 | // ; 1669 | ASSERT(_UARTBaseValid(ui32Base)); ; 1671 | // ; 1672 | // Set the requested bits in the UART uDMA control register. ; 1673 | // ;---------------------------------------------------------------------- STR A2, [SP, #4] ; [DPU_V7M3_PIPE] |1665| STR A1, [SP, #0] ; [DPU_V7M3_PIPE] |1665| .dwpsn file "../driverlib/uart.c",line 1674,column 5,is_stmt,isa 1 ;---------------------------------------------------------------------- ; 1674 | HWREG(ui32Base + UART_O_DMACTL) |= ui32DMAFlags; ;---------------------------------------------------------------------- LDR A1, [SP, #0] ; [DPU_V7M3_PIPE] |1674| LDR A2, [SP, #4] ; [DPU_V7M3_PIPE] |1674| ADDS A1, A1, #72 ; [DPU_V7M3_PIPE] |1674| LDR A3, [A1, #0] ; [DPU_V7M3_PIPE] |1674| ORRS A2, A2, A3 ; [DPU_V7M3_PIPE] |1674| STR A2, [A1, #0] ; [DPU_V7M3_PIPE] |1674| .dwpsn file "../driverlib/uart.c",line 1675,column 1,is_stmt,isa 1 ADD SP, SP, #8 ; [DPU_V7M3_PIPE] .dwcfi cfa_offset, 0 $C$DW$233 .dwtag DW_TAG_TI_branch .dwattr $C$DW$233, DW_AT_low_pc(0x00) .dwattr $C$DW$233, DW_AT_TI_return BX LR ; [DPU_V7M3_PIPE] ; BRANCH OCCURS ; [] .dwattr $C$DW$228, DW_AT_TI_end_file("../driverlib/uart.c") .dwattr $C$DW$228, DW_AT_TI_end_line(0x68b) .dwattr $C$DW$228, DW_AT_TI_end_column(0x01) .dwendentry .dwendtag $C$DW$228 .sect ".text" .clink .thumbfunc UARTDMADisable .thumb .global UARTDMADisable $C$DW$234 .dwtag DW_TAG_subprogram .dwattr $C$DW$234, DW_AT_name("UARTDMADisable") .dwattr $C$DW$234, DW_AT_low_pc(UARTDMADisable) .dwattr $C$DW$234, DW_AT_high_pc(0x00) .dwattr $C$DW$234, DW_AT_TI_symbol_name("UARTDMADisable") .dwattr $C$DW$234, DW_AT_external .dwattr $C$DW$234, DW_AT_TI_begin_file("../driverlib/uart.c") .dwattr $C$DW$234, DW_AT_TI_begin_line(0x6a0) .dwattr $C$DW$234, DW_AT_TI_begin_column(0x01) .dwattr $C$DW$234, DW_AT_decl_file("../driverlib/uart.c") .dwattr $C$DW$234, DW_AT_decl_line(0x6a0) .dwattr $C$DW$234, DW_AT_decl_column(0x01) .dwattr $C$DW$234, DW_AT_TI_max_frame_size(0x08) .dwpsn file "../driverlib/uart.c",line 1697,column 1,is_stmt,address UARTDMADisable,isa 1 .dwfde $C$DW$CIE, UARTDMADisable $C$DW$235 .dwtag DW_TAG_formal_parameter .dwattr $C$DW$235, DW_AT_name("ui32Base") .dwattr $C$DW$235, DW_AT_TI_symbol_name("ui32Base") .dwattr $C$DW$235, DW_AT_type(*$C$DW$T$27) .dwattr $C$DW$235, DW_AT_location[DW_OP_reg0] $C$DW$236 .dwtag DW_TAG_formal_parameter .dwattr $C$DW$236, DW_AT_name("ui32DMAFlags") .dwattr $C$DW$236, DW_AT_TI_symbol_name("ui32DMAFlags") .dwattr $C$DW$236, DW_AT_type(*$C$DW$T$27) .dwattr $C$DW$236, DW_AT_location[DW_OP_reg1] ;---------------------------------------------------------------------- ; 1696 | UARTDMADisable(uint32_t ui32Base, uint32_t ui32DMAFlags) ;---------------------------------------------------------------------- ;***************************************************************************** ;* FUNCTION NAME: UARTDMADisable * ;* * ;* Regs Modified : A1,A2,A3,SP,SR * ;* Regs Used : A1,A2,A3,SP,LR,SR * ;* Local Frame Size : 0 Args + 8 Auto + 0 Save = 8 byte * ;***************************************************************************** UARTDMADisable: ;* --------------------------------------------------------------------------* .dwcfi cfa_offset, 0 SUB SP, SP, #8 ; [DPU_V7M3_PIPE] .dwcfi cfa_offset, 8 $C$DW$237 .dwtag DW_TAG_variable .dwattr $C$DW$237, DW_AT_name("ui32Base") .dwattr $C$DW$237, DW_AT_TI_symbol_name("ui32Base") .dwattr $C$DW$237, DW_AT_type(*$C$DW$T$27) .dwattr $C$DW$237, DW_AT_location[DW_OP_breg13 0] $C$DW$238 .dwtag DW_TAG_variable .dwattr $C$DW$238, DW_AT_name("ui32DMAFlags") .dwattr $C$DW$238, DW_AT_TI_symbol_name("ui32DMAFlags") .dwattr $C$DW$238, DW_AT_type(*$C$DW$T$27) .dwattr $C$DW$238, DW_AT_location[DW_OP_breg13 4] ;---------------------------------------------------------------------- ; 1698 | // ; 1699 | // Check the arguments. ; 1700 | // ; 1701 | ASSERT(_UARTBaseValid(ui32Base)); ; 1703 | // ; 1704 | // Clear the requested bits in the UART uDMA control register. ; 1705 | // ;---------------------------------------------------------------------- STR A2, [SP, #4] ; [DPU_V7M3_PIPE] |1697| STR A1, [SP, #0] ; [DPU_V7M3_PIPE] |1697| .dwpsn file "../driverlib/uart.c",line 1706,column 5,is_stmt,isa 1 ;---------------------------------------------------------------------- ; 1706 | HWREG(ui32Base + UART_O_DMACTL) &= ~ui32DMAFlags; ;---------------------------------------------------------------------- LDR A1, [SP, #0] ; [DPU_V7M3_PIPE] |1706| LDR A3, [SP, #4] ; [DPU_V7M3_PIPE] |1706| ADDS A1, A1, #72 ; [DPU_V7M3_PIPE] |1706| LDR A2, [A1, #0] ; [DPU_V7M3_PIPE] |1706| BICS A2, A2, A3 ; [DPU_V7M3_PIPE] |1706| STR A2, [A1, #0] ; [DPU_V7M3_PIPE] |1706| .dwpsn file "../driverlib/uart.c",line 1707,column 1,is_stmt,isa 1 ADD SP, SP, #8 ; [DPU_V7M3_PIPE] .dwcfi cfa_offset, 0 $C$DW$239 .dwtag DW_TAG_TI_branch .dwattr $C$DW$239, DW_AT_low_pc(0x00) .dwattr $C$DW$239, DW_AT_TI_return BX LR ; [DPU_V7M3_PIPE] ; BRANCH OCCURS ; [] .dwattr $C$DW$234, DW_AT_TI_end_file("../driverlib/uart.c") .dwattr $C$DW$234, DW_AT_TI_end_line(0x6ab) .dwattr $C$DW$234, DW_AT_TI_end_column(0x01) .dwendentry .dwendtag $C$DW$234 .sect ".text" .clink .thumbfunc UARTRxErrorGet .thumb .global UARTRxErrorGet $C$DW$240 .dwtag DW_TAG_subprogram .dwattr $C$DW$240, DW_AT_name("UARTRxErrorGet") .dwattr $C$DW$240, DW_AT_low_pc(UARTRxErrorGet) .dwattr $C$DW$240, DW_AT_high_pc(0x00) .dwattr $C$DW$240, DW_AT_TI_symbol_name("UARTRxErrorGet") .dwattr $C$DW$240, DW_AT_external .dwattr $C$DW$240, DW_AT_type(*$C$DW$T$27) .dwattr $C$DW$240, DW_AT_TI_begin_file("../driverlib/uart.c") .dwattr $C$DW$240, DW_AT_TI_begin_line(0x6bf) .dwattr $C$DW$240, DW_AT_TI_begin_column(0x01) .dwattr $C$DW$240, DW_AT_decl_file("../driverlib/uart.c") .dwattr $C$DW$240, DW_AT_decl_line(0x6bf) .dwattr $C$DW$240, DW_AT_decl_column(0x01) .dwattr $C$DW$240, DW_AT_TI_max_frame_size(0x08) .dwpsn file "../driverlib/uart.c",line 1728,column 1,is_stmt,address UARTRxErrorGet,isa 1 .dwfde $C$DW$CIE, UARTRxErrorGet $C$DW$241 .dwtag DW_TAG_formal_parameter .dwattr $C$DW$241, DW_AT_name("ui32Base") .dwattr $C$DW$241, DW_AT_TI_symbol_name("ui32Base") .dwattr $C$DW$241, DW_AT_type(*$C$DW$T$27) .dwattr $C$DW$241, DW_AT_location[DW_OP_reg0] ;---------------------------------------------------------------------- ; 1727 | UARTRxErrorGet(uint32_t ui32Base) ;---------------------------------------------------------------------- ;***************************************************************************** ;* FUNCTION NAME: UARTRxErrorGet * ;* * ;* Regs Modified : A1,SP * ;* Regs Used : A1,SP,LR * ;* Local Frame Size : 0 Args + 4 Auto + 0 Save = 4 byte * ;***************************************************************************** UARTRxErrorGet: ;* --------------------------------------------------------------------------* .dwcfi cfa_offset, 0 SUB SP, SP, #8 ; [DPU_V7M3_PIPE] .dwcfi cfa_offset, 8 $C$DW$242 .dwtag DW_TAG_variable .dwattr $C$DW$242, DW_AT_name("ui32Base") .dwattr $C$DW$242, DW_AT_TI_symbol_name("ui32Base") .dwattr $C$DW$242, DW_AT_type(*$C$DW$T$27) .dwattr $C$DW$242, DW_AT_location[DW_OP_breg13 0] ;---------------------------------------------------------------------- ; 1729 | // ; 1730 | // Check the arguments. ; 1731 | // ; 1732 | ASSERT(_UARTBaseValid(ui32Base)); ; 1734 | // ; 1735 | // Return the current value of the receive status register. ; 1736 | // ;---------------------------------------------------------------------- STR A1, [SP, #0] ; [DPU_V7M3_PIPE] |1728| .dwpsn file "../driverlib/uart.c",line 1737,column 5,is_stmt,isa 1 ;---------------------------------------------------------------------- ; 1737 | return(HWREG(ui32Base + UART_O_RSR) & 0x0000000F); ;---------------------------------------------------------------------- LDR A1, [SP, #0] ; [DPU_V7M3_PIPE] |1737| LDR A1, [A1, #4] ; [DPU_V7M3_PIPE] |1737| AND A1, A1, #15 ; [DPU_V7M3_PIPE] |1737| .dwpsn file "../driverlib/uart.c",line 1738,column 1,is_stmt,isa 1 ADD SP, SP, #8 ; [DPU_V7M3_PIPE] .dwcfi cfa_offset, 0 $C$DW$243 .dwtag DW_TAG_TI_branch .dwattr $C$DW$243, DW_AT_low_pc(0x00) .dwattr $C$DW$243, DW_AT_TI_return BX LR ; [DPU_V7M3_PIPE] ; BRANCH OCCURS ; [] .dwattr $C$DW$240, DW_AT_TI_end_file("../driverlib/uart.c") .dwattr $C$DW$240, DW_AT_TI_end_line(0x6ca) .dwattr $C$DW$240, DW_AT_TI_end_column(0x01) .dwendentry .dwendtag $C$DW$240 .sect ".text" .clink .thumbfunc UARTRxErrorClear .thumb .global UARTRxErrorClear $C$DW$244 .dwtag DW_TAG_subprogram .dwattr $C$DW$244, DW_AT_name("UARTRxErrorClear") .dwattr $C$DW$244, DW_AT_low_pc(UARTRxErrorClear) .dwattr $C$DW$244, DW_AT_high_pc(0x00) .dwattr $C$DW$244, DW_AT_TI_symbol_name("UARTRxErrorClear") .dwattr $C$DW$244, DW_AT_external .dwattr $C$DW$244, DW_AT_TI_begin_file("../driverlib/uart.c") .dwattr $C$DW$244, DW_AT_TI_begin_line(0x6db) .dwattr $C$DW$244, DW_AT_TI_begin_column(0x01) .dwattr $C$DW$244, DW_AT_decl_file("../driverlib/uart.c") .dwattr $C$DW$244, DW_AT_decl_line(0x6db) .dwattr $C$DW$244, DW_AT_decl_column(0x01) .dwattr $C$DW$244, DW_AT_TI_max_frame_size(0x08) .dwpsn file "../driverlib/uart.c",line 1756,column 1,is_stmt,address UARTRxErrorClear,isa 1 .dwfde $C$DW$CIE, UARTRxErrorClear $C$DW$245 .dwtag DW_TAG_formal_parameter .dwattr $C$DW$245, DW_AT_name("ui32Base") .dwattr $C$DW$245, DW_AT_TI_symbol_name("ui32Base") .dwattr $C$DW$245, DW_AT_type(*$C$DW$T$27) .dwattr $C$DW$245, DW_AT_location[DW_OP_reg0] ;---------------------------------------------------------------------- ; 1755 | UARTRxErrorClear(uint32_t ui32Base) ;---------------------------------------------------------------------- ;***************************************************************************** ;* FUNCTION NAME: UARTRxErrorClear * ;* * ;* Regs Modified : A1,A2,SP,SR * ;* Regs Used : A1,A2,SP,LR,SR * ;* Local Frame Size : 0 Args + 4 Auto + 0 Save = 4 byte * ;***************************************************************************** UARTRxErrorClear: ;* --------------------------------------------------------------------------* .dwcfi cfa_offset, 0 SUB SP, SP, #8 ; [DPU_V7M3_PIPE] .dwcfi cfa_offset, 8 $C$DW$246 .dwtag DW_TAG_variable .dwattr $C$DW$246, DW_AT_name("ui32Base") .dwattr $C$DW$246, DW_AT_TI_symbol_name("ui32Base") .dwattr $C$DW$246, DW_AT_type(*$C$DW$T$27) .dwattr $C$DW$246, DW_AT_location[DW_OP_breg13 0] ;---------------------------------------------------------------------- ; 1757 | // ; 1758 | // Check the arguments. ; 1759 | // ; 1760 | ASSERT(_UARTBaseValid(ui32Base)); ; 1762 | // ; 1763 | // Any write to the Error Clear Register clears all bits which are ; 1764 | // currently set. ; 1765 | // ;---------------------------------------------------------------------- STR A1, [SP, #0] ; [DPU_V7M3_PIPE] |1756| .dwpsn file "../driverlib/uart.c",line 1766,column 5,is_stmt,isa 1 ;---------------------------------------------------------------------- ; 1766 | HWREG(ui32Base + UART_O_ECR) = 0; ;---------------------------------------------------------------------- LDR A1, [SP, #0] ; [DPU_V7M3_PIPE] |1766| MOVS A2, #0 ; [DPU_V7M3_PIPE] |1766| STR A2, [A1, #4] ; [DPU_V7M3_PIPE] |1766| .dwpsn file "../driverlib/uart.c",line 1767,column 1,is_stmt,isa 1 ADD SP, SP, #8 ; [DPU_V7M3_PIPE] .dwcfi cfa_offset, 0 $C$DW$247 .dwtag DW_TAG_TI_branch .dwattr $C$DW$247, DW_AT_low_pc(0x00) .dwattr $C$DW$247, DW_AT_TI_return BX LR ; [DPU_V7M3_PIPE] ; BRANCH OCCURS ; [] .dwattr $C$DW$244, DW_AT_TI_end_file("../driverlib/uart.c") .dwattr $C$DW$244, DW_AT_TI_end_line(0x6e7) .dwattr $C$DW$244, DW_AT_TI_end_column(0x01) .dwendentry .dwendtag $C$DW$244 .sect ".text" .clink .thumbfunc UARTClockSourceSet .thumb .global UARTClockSourceSet $C$DW$248 .dwtag DW_TAG_subprogram .dwattr $C$DW$248, DW_AT_name("UARTClockSourceSet") .dwattr $C$DW$248, DW_AT_low_pc(UARTClockSourceSet) .dwattr $C$DW$248, DW_AT_high_pc(0x00) .dwattr $C$DW$248, DW_AT_TI_symbol_name("UARTClockSourceSet") .dwattr $C$DW$248, DW_AT_external .dwattr $C$DW$248, DW_AT_TI_begin_file("../driverlib/uart.c") .dwattr $C$DW$248, DW_AT_TI_begin_line(0x700) .dwattr $C$DW$248, DW_AT_TI_begin_column(0x01) .dwattr $C$DW$248, DW_AT_decl_file("../driverlib/uart.c") .dwattr $C$DW$248, DW_AT_decl_line(0x700) .dwattr $C$DW$248, DW_AT_decl_column(0x01) .dwattr $C$DW$248, DW_AT_TI_max_frame_size(0x08) .dwpsn file "../driverlib/uart.c",line 1793,column 1,is_stmt,address UARTClockSourceSet,isa 1 .dwfde $C$DW$CIE, UARTClockSourceSet $C$DW$249 .dwtag DW_TAG_formal_parameter .dwattr $C$DW$249, DW_AT_name("ui32Base") .dwattr $C$DW$249, DW_AT_TI_symbol_name("ui32Base") .dwattr $C$DW$249, DW_AT_type(*$C$DW$T$27) .dwattr $C$DW$249, DW_AT_location[DW_OP_reg0] $C$DW$250 .dwtag DW_TAG_formal_parameter .dwattr $C$DW$250, DW_AT_name("ui32Source") .dwattr $C$DW$250, DW_AT_TI_symbol_name("ui32Source") .dwattr $C$DW$250, DW_AT_type(*$C$DW$T$27) .dwattr $C$DW$250, DW_AT_location[DW_OP_reg1] ;---------------------------------------------------------------------- ; 1792 | UARTClockSourceSet(uint32_t ui32Base, uint32_t ui32Source) ;---------------------------------------------------------------------- ;***************************************************************************** ;* FUNCTION NAME: UARTClockSourceSet * ;* * ;* Regs Modified : A1,A2,SP * ;* Regs Used : A1,A2,SP,LR * ;* Local Frame Size : 0 Args + 8 Auto + 0 Save = 8 byte * ;***************************************************************************** UARTClockSourceSet: ;* --------------------------------------------------------------------------* .dwcfi cfa_offset, 0 SUB SP, SP, #8 ; [DPU_V7M3_PIPE] .dwcfi cfa_offset, 8 $C$DW$251 .dwtag DW_TAG_variable .dwattr $C$DW$251, DW_AT_name("ui32Base") .dwattr $C$DW$251, DW_AT_TI_symbol_name("ui32Base") .dwattr $C$DW$251, DW_AT_type(*$C$DW$T$27) .dwattr $C$DW$251, DW_AT_location[DW_OP_breg13 0] $C$DW$252 .dwtag DW_TAG_variable .dwattr $C$DW$252, DW_AT_name("ui32Source") .dwattr $C$DW$252, DW_AT_TI_symbol_name("ui32Source") .dwattr $C$DW$252, DW_AT_type(*$C$DW$T$27) .dwattr $C$DW$252, DW_AT_location[DW_OP_breg13 4] ;---------------------------------------------------------------------- ; 1794 | // ; 1795 | // Check the arguments. ; 1796 | // ; 1797 | ASSERT(_UARTBaseValid(ui32Base)); ; 1798 | ASSERT((ui32Source == UART_CLOCK_SYSTEM) || ; 1799 | (ui32Source == UART_CLOCK_PIOSC)); ; 1801 | // ; 1802 | // Set the UART clock source. ; 1803 | // ;---------------------------------------------------------------------- STR A2, [SP, #4] ; [DPU_V7M3_PIPE] |1793| STR A1, [SP, #0] ; [DPU_V7M3_PIPE] |1793| .dwpsn file "../driverlib/uart.c",line 1804,column 5,is_stmt,isa 1 ;---------------------------------------------------------------------- ; 1804 | HWREG(ui32Base + UART_O_CC) = ui32Source; ;---------------------------------------------------------------------- LDR A1, [SP, #4] ; [DPU_V7M3_PIPE] |1804| LDR A2, [SP, #0] ; [DPU_V7M3_PIPE] |1804| STR A1, [A2, #4040] ; [DPU_V7M3_PIPE] |1804| .dwpsn file "../driverlib/uart.c",line 1805,column 1,is_stmt,isa 1 ADD SP, SP, #8 ; [DPU_V7M3_PIPE] .dwcfi cfa_offset, 0 $C$DW$253 .dwtag DW_TAG_TI_branch .dwattr $C$DW$253, DW_AT_low_pc(0x00) .dwattr $C$DW$253, DW_AT_TI_return BX LR ; [DPU_V7M3_PIPE] ; BRANCH OCCURS ; [] .dwattr $C$DW$248, DW_AT_TI_end_file("../driverlib/uart.c") .dwattr $C$DW$248, DW_AT_TI_end_line(0x70d) .dwattr $C$DW$248, DW_AT_TI_end_column(0x01) .dwendentry .dwendtag $C$DW$248 .sect ".text" .clink .thumbfunc UARTClockSourceGet .thumb .global UARTClockSourceGet $C$DW$254 .dwtag DW_TAG_subprogram .dwattr $C$DW$254, DW_AT_name("UARTClockSourceGet") .dwattr $C$DW$254, DW_AT_low_pc(UARTClockSourceGet) .dwattr $C$DW$254, DW_AT_high_pc(0x00) .dwattr $C$DW$254, DW_AT_TI_symbol_name("UARTClockSourceGet") .dwattr $C$DW$254, DW_AT_external .dwattr $C$DW$254, DW_AT_type(*$C$DW$T$27) .dwattr $C$DW$254, DW_AT_TI_begin_file("../driverlib/uart.c") .dwattr $C$DW$254, DW_AT_TI_begin_line(0x721) .dwattr $C$DW$254, DW_AT_TI_begin_column(0x01) .dwattr $C$DW$254, DW_AT_decl_file("../driverlib/uart.c") .dwattr $C$DW$254, DW_AT_decl_line(0x721) .dwattr $C$DW$254, DW_AT_decl_column(0x01) .dwattr $C$DW$254, DW_AT_TI_max_frame_size(0x08) .dwpsn file "../driverlib/uart.c",line 1826,column 1,is_stmt,address UARTClockSourceGet,isa 1 .dwfde $C$DW$CIE, UARTClockSourceGet $C$DW$255 .dwtag DW_TAG_formal_parameter .dwattr $C$DW$255, DW_AT_name("ui32Base") .dwattr $C$DW$255, DW_AT_TI_symbol_name("ui32Base") .dwattr $C$DW$255, DW_AT_type(*$C$DW$T$27) .dwattr $C$DW$255, DW_AT_location[DW_OP_reg0] ;---------------------------------------------------------------------- ; 1825 | UARTClockSourceGet(uint32_t ui32Base) ;---------------------------------------------------------------------- ;***************************************************************************** ;* FUNCTION NAME: UARTClockSourceGet * ;* * ;* Regs Modified : A1,SP * ;* Regs Used : A1,SP,LR * ;* Local Frame Size : 0 Args + 4 Auto + 0 Save = 4 byte * ;***************************************************************************** UARTClockSourceGet: ;* --------------------------------------------------------------------------* .dwcfi cfa_offset, 0 SUB SP, SP, #8 ; [DPU_V7M3_PIPE] .dwcfi cfa_offset, 8 $C$DW$256 .dwtag DW_TAG_variable .dwattr $C$DW$256, DW_AT_name("ui32Base") .dwattr $C$DW$256, DW_AT_TI_symbol_name("ui32Base") .dwattr $C$DW$256, DW_AT_type(*$C$DW$T$27) .dwattr $C$DW$256, DW_AT_location[DW_OP_breg13 0] ;---------------------------------------------------------------------- ; 1827 | // ; 1828 | // Check the arguments. ; 1829 | // ; 1830 | ASSERT(_UARTBaseValid(ui32Base)); ; 1832 | // ; 1833 | // Return the UART clock source. ; 1834 | // ;---------------------------------------------------------------------- STR A1, [SP, #0] ; [DPU_V7M3_PIPE] |1826| .dwpsn file "../driverlib/uart.c",line 1835,column 5,is_stmt,isa 1 ;---------------------------------------------------------------------- ; 1835 | return(HWREG(ui32Base + UART_O_CC)); ;---------------------------------------------------------------------- LDR A1, [SP, #0] ; [DPU_V7M3_PIPE] |1835| LDR A1, [A1, #4040] ; [DPU_V7M3_PIPE] |1835| .dwpsn file "../driverlib/uart.c",line 1836,column 1,is_stmt,isa 1 ADD SP, SP, #8 ; [DPU_V7M3_PIPE] .dwcfi cfa_offset, 0 $C$DW$257 .dwtag DW_TAG_TI_branch .dwattr $C$DW$257, DW_AT_low_pc(0x00) .dwattr $C$DW$257, DW_AT_TI_return BX LR ; [DPU_V7M3_PIPE] ; BRANCH OCCURS ; [] .dwattr $C$DW$254, DW_AT_TI_end_file("../driverlib/uart.c") .dwattr $C$DW$254, DW_AT_TI_end_line(0x72c) .dwattr $C$DW$254, DW_AT_TI_end_column(0x01) .dwendentry .dwendtag $C$DW$254 .sect ".text" .clink .thumbfunc UART9BitEnable .thumb .global UART9BitEnable $C$DW$258 .dwtag DW_TAG_subprogram .dwattr $C$DW$258, DW_AT_name("UART9BitEnable") .dwattr $C$DW$258, DW_AT_low_pc(UART9BitEnable) .dwattr $C$DW$258, DW_AT_high_pc(0x00) .dwattr $C$DW$258, DW_AT_TI_symbol_name("UART9BitEnable") .dwattr $C$DW$258, DW_AT_external .dwattr $C$DW$258, DW_AT_TI_begin_file("../driverlib/uart.c") .dwattr $C$DW$258, DW_AT_TI_begin_line(0x73e) .dwattr $C$DW$258, DW_AT_TI_begin_column(0x01) .dwattr $C$DW$258, DW_AT_decl_file("../driverlib/uart.c") .dwattr $C$DW$258, DW_AT_decl_line(0x73e) .dwattr $C$DW$258, DW_AT_decl_column(0x01) .dwattr $C$DW$258, DW_AT_TI_max_frame_size(0x08) .dwpsn file "../driverlib/uart.c",line 1855,column 1,is_stmt,address UART9BitEnable,isa 1 .dwfde $C$DW$CIE, UART9BitEnable $C$DW$259 .dwtag DW_TAG_formal_parameter .dwattr $C$DW$259, DW_AT_name("ui32Base") .dwattr $C$DW$259, DW_AT_TI_symbol_name("ui32Base") .dwattr $C$DW$259, DW_AT_type(*$C$DW$T$27) .dwattr $C$DW$259, DW_AT_location[DW_OP_reg0] ;---------------------------------------------------------------------- ; 1854 | UART9BitEnable(uint32_t ui32Base) ;---------------------------------------------------------------------- ;***************************************************************************** ;* FUNCTION NAME: UART9BitEnable * ;* * ;* Regs Modified : A1,A2,SP,SR * ;* Regs Used : A1,A2,SP,LR,SR * ;* Local Frame Size : 0 Args + 4 Auto + 0 Save = 4 byte * ;***************************************************************************** UART9BitEnable: ;* --------------------------------------------------------------------------* .dwcfi cfa_offset, 0 SUB SP, SP, #8 ; [DPU_V7M3_PIPE] .dwcfi cfa_offset, 8 $C$DW$260 .dwtag DW_TAG_variable .dwattr $C$DW$260, DW_AT_name("ui32Base") .dwattr $C$DW$260, DW_AT_TI_symbol_name("ui32Base") .dwattr $C$DW$260, DW_AT_type(*$C$DW$T$27) .dwattr $C$DW$260, DW_AT_location[DW_OP_breg13 0] ;---------------------------------------------------------------------- ; 1856 | // ; 1857 | // Check the arguments. ; 1858 | // ; 1859 | ASSERT(_UARTBaseValid(ui32Base)); ; 1861 | // ; 1862 | // Enable 9-bit mode. ; 1863 | // ;---------------------------------------------------------------------- STR A1, [SP, #0] ; [DPU_V7M3_PIPE] |1855| .dwpsn file "../driverlib/uart.c",line 1864,column 5,is_stmt,isa 1 ;---------------------------------------------------------------------- ; 1864 | HWREG(ui32Base + UART_O_9BITADDR) |= UART_9BITADDR_9BITEN; ;---------------------------------------------------------------------- LDR A1, [SP, #0] ; [DPU_V7M3_PIPE] |1864| ADDS A1, A1, #164 ; [DPU_V7M3_PIPE] |1864| LDR A2, [A1, #0] ; [DPU_V7M3_PIPE] |1864| ORR A2, A2, #32768 ; [DPU_V7M3_PIPE] |1864| STR A2, [A1, #0] ; [DPU_V7M3_PIPE] |1864| .dwpsn file "../driverlib/uart.c",line 1865,column 1,is_stmt,isa 1 ADD SP, SP, #8 ; [DPU_V7M3_PIPE] .dwcfi cfa_offset, 0 $C$DW$261 .dwtag DW_TAG_TI_branch .dwattr $C$DW$261, DW_AT_low_pc(0x00) .dwattr $C$DW$261, DW_AT_TI_return BX LR ; [DPU_V7M3_PIPE] ; BRANCH OCCURS ; [] .dwattr $C$DW$258, DW_AT_TI_end_file("../driverlib/uart.c") .dwattr $C$DW$258, DW_AT_TI_end_line(0x749) .dwattr $C$DW$258, DW_AT_TI_end_column(0x01) .dwendentry .dwendtag $C$DW$258 .sect ".text" .clink .thumbfunc UART9BitDisable .thumb .global UART9BitDisable $C$DW$262 .dwtag DW_TAG_subprogram .dwattr $C$DW$262, DW_AT_name("UART9BitDisable") .dwattr $C$DW$262, DW_AT_low_pc(UART9BitDisable) .dwattr $C$DW$262, DW_AT_high_pc(0x00) .dwattr $C$DW$262, DW_AT_TI_symbol_name("UART9BitDisable") .dwattr $C$DW$262, DW_AT_external .dwattr $C$DW$262, DW_AT_TI_begin_file("../driverlib/uart.c") .dwattr $C$DW$262, DW_AT_TI_begin_line(0x75b) .dwattr $C$DW$262, DW_AT_TI_begin_column(0x01) .dwattr $C$DW$262, DW_AT_decl_file("../driverlib/uart.c") .dwattr $C$DW$262, DW_AT_decl_line(0x75b) .dwattr $C$DW$262, DW_AT_decl_column(0x01) .dwattr $C$DW$262, DW_AT_TI_max_frame_size(0x08) .dwpsn file "../driverlib/uart.c",line 1884,column 1,is_stmt,address UART9BitDisable,isa 1 .dwfde $C$DW$CIE, UART9BitDisable $C$DW$263 .dwtag DW_TAG_formal_parameter .dwattr $C$DW$263, DW_AT_name("ui32Base") .dwattr $C$DW$263, DW_AT_TI_symbol_name("ui32Base") .dwattr $C$DW$263, DW_AT_type(*$C$DW$T$27) .dwattr $C$DW$263, DW_AT_location[DW_OP_reg0] ;---------------------------------------------------------------------- ; 1883 | UART9BitDisable(uint32_t ui32Base) ;---------------------------------------------------------------------- ;***************************************************************************** ;* FUNCTION NAME: UART9BitDisable * ;* * ;* Regs Modified : A1,A2,SP,SR * ;* Regs Used : A1,A2,SP,LR,SR * ;* Local Frame Size : 0 Args + 4 Auto + 0 Save = 4 byte * ;***************************************************************************** UART9BitDisable: ;* --------------------------------------------------------------------------* .dwcfi cfa_offset, 0 SUB SP, SP, #8 ; [DPU_V7M3_PIPE] .dwcfi cfa_offset, 8 $C$DW$264 .dwtag DW_TAG_variable .dwattr $C$DW$264, DW_AT_name("ui32Base") .dwattr $C$DW$264, DW_AT_TI_symbol_name("ui32Base") .dwattr $C$DW$264, DW_AT_type(*$C$DW$T$27) .dwattr $C$DW$264, DW_AT_location[DW_OP_breg13 0] ;---------------------------------------------------------------------- ; 1885 | // ; 1886 | // Check the arguments. ; 1887 | // ; 1888 | ASSERT(_UARTBaseValid(ui32Base)); ; 1890 | // ; 1891 | // Disable 9-bit mode. ; 1892 | // ;---------------------------------------------------------------------- STR A1, [SP, #0] ; [DPU_V7M3_PIPE] |1884| .dwpsn file "../driverlib/uart.c",line 1893,column 5,is_stmt,isa 1 ;---------------------------------------------------------------------- ; 1893 | HWREG(ui32Base + UART_O_9BITADDR) &= ~UART_9BITADDR_9BITEN; ;---------------------------------------------------------------------- LDR A1, [SP, #0] ; [DPU_V7M3_PIPE] |1893| ADDS A1, A1, #164 ; [DPU_V7M3_PIPE] |1893| LDR A2, [A1, #0] ; [DPU_V7M3_PIPE] |1893| BIC A2, A2, #32768 ; [DPU_V7M3_PIPE] |1893| STR A2, [A1, #0] ; [DPU_V7M3_PIPE] |1893| .dwpsn file "../driverlib/uart.c",line 1894,column 1,is_stmt,isa 1 ADD SP, SP, #8 ; [DPU_V7M3_PIPE] .dwcfi cfa_offset, 0 $C$DW$265 .dwtag DW_TAG_TI_branch .dwattr $C$DW$265, DW_AT_low_pc(0x00) .dwattr $C$DW$265, DW_AT_TI_return BX LR ; [DPU_V7M3_PIPE] ; BRANCH OCCURS ; [] .dwattr $C$DW$262, DW_AT_TI_end_file("../driverlib/uart.c") .dwattr $C$DW$262, DW_AT_TI_end_line(0x766) .dwattr $C$DW$262, DW_AT_TI_end_column(0x01) .dwendentry .dwendtag $C$DW$262 .sect ".text" .clink .thumbfunc UART9BitAddrSet .thumb .global UART9BitAddrSet $C$DW$266 .dwtag DW_TAG_subprogram .dwattr $C$DW$266, DW_AT_name("UART9BitAddrSet") .dwattr $C$DW$266, DW_AT_low_pc(UART9BitAddrSet) .dwattr $C$DW$266, DW_AT_high_pc(0x00) .dwattr $C$DW$266, DW_AT_TI_symbol_name("UART9BitAddrSet") .dwattr $C$DW$266, DW_AT_external .dwattr $C$DW$266, DW_AT_TI_begin_file("../driverlib/uart.c") .dwattr $C$DW$266, DW_AT_TI_begin_line(0x77e) .dwattr $C$DW$266, DW_AT_TI_begin_column(0x01) .dwattr $C$DW$266, DW_AT_decl_file("../driverlib/uart.c") .dwattr $C$DW$266, DW_AT_decl_line(0x77e) .dwattr $C$DW$266, DW_AT_decl_column(0x01) .dwattr $C$DW$266, DW_AT_TI_max_frame_size(0x08) .dwpsn file "../driverlib/uart.c",line 1920,column 1,is_stmt,address UART9BitAddrSet,isa 1 .dwfde $C$DW$CIE, UART9BitAddrSet $C$DW$267 .dwtag DW_TAG_formal_parameter .dwattr $C$DW$267, DW_AT_name("ui32Base") .dwattr $C$DW$267, DW_AT_TI_symbol_name("ui32Base") .dwattr $C$DW$267, DW_AT_type(*$C$DW$T$27) .dwattr $C$DW$267, DW_AT_location[DW_OP_reg0] $C$DW$268 .dwtag DW_TAG_formal_parameter .dwattr $C$DW$268, DW_AT_name("ui8Addr") .dwattr $C$DW$268, DW_AT_TI_symbol_name("ui8Addr") .dwattr $C$DW$268, DW_AT_type(*$C$DW$T$42) .dwattr $C$DW$268, DW_AT_location[DW_OP_reg1] $C$DW$269 .dwtag DW_TAG_formal_parameter .dwattr $C$DW$269, DW_AT_name("ui8Mask") .dwattr $C$DW$269, DW_AT_TI_symbol_name("ui8Mask") .dwattr $C$DW$269, DW_AT_type(*$C$DW$T$42) .dwattr $C$DW$269, DW_AT_location[DW_OP_reg2] ;---------------------------------------------------------------------- ; 1918 | UART9BitAddrSet(uint32_t ui32Base, uint8_t ui8Addr, ; 1919 | uint8_t ui8Mask) ;---------------------------------------------------------------------- ;***************************************************************************** ;* FUNCTION NAME: UART9BitAddrSet * ;* * ;* Regs Modified : A1,A2,SP * ;* Regs Used : A1,A2,A3,SP,LR * ;* Local Frame Size : 0 Args + 8 Auto + 0 Save = 8 byte * ;***************************************************************************** UART9BitAddrSet: ;* --------------------------------------------------------------------------* .dwcfi cfa_offset, 0 SUB SP, SP, #8 ; [DPU_V7M3_PIPE] .dwcfi cfa_offset, 8 $C$DW$270 .dwtag DW_TAG_variable .dwattr $C$DW$270, DW_AT_name("ui32Base") .dwattr $C$DW$270, DW_AT_TI_symbol_name("ui32Base") .dwattr $C$DW$270, DW_AT_type(*$C$DW$T$27) .dwattr $C$DW$270, DW_AT_location[DW_OP_breg13 0] $C$DW$271 .dwtag DW_TAG_variable .dwattr $C$DW$271, DW_AT_name("ui8Addr") .dwattr $C$DW$271, DW_AT_TI_symbol_name("ui8Addr") .dwattr $C$DW$271, DW_AT_type(*$C$DW$T$42) .dwattr $C$DW$271, DW_AT_location[DW_OP_breg13 4] $C$DW$272 .dwtag DW_TAG_variable .dwattr $C$DW$272, DW_AT_name("ui8Mask") .dwattr $C$DW$272, DW_AT_TI_symbol_name("ui8Mask") .dwattr $C$DW$272, DW_AT_type(*$C$DW$T$42) .dwattr $C$DW$272, DW_AT_location[DW_OP_breg13 5] ;---------------------------------------------------------------------- ; 1921 | // ; 1922 | // Check the arguments. ; 1923 | // ; 1924 | ASSERT(_UARTBaseValid(ui32Base)); ; 1926 | // ; 1927 | // Set the address and mask. ; 1928 | // ;---------------------------------------------------------------------- STRB A3, [SP, #5] ; [DPU_V7M3_PIPE] |1920| STRB A2, [SP, #4] ; [DPU_V7M3_PIPE] |1920| STR A1, [SP, #0] ; [DPU_V7M3_PIPE] |1920| .dwpsn file "../driverlib/uart.c",line 1929,column 5,is_stmt,isa 1 ;---------------------------------------------------------------------- ; 1929 | HWREG(ui32Base + UART_O_9BITADDR) = ui8Addr << UART_9BITADDR_ADDR_S; ;---------------------------------------------------------------------- LDRB A1, [SP, #4] ; [DPU_V7M3_PIPE] |1929| LDR A2, [SP, #0] ; [DPU_V7M3_PIPE] |1929| STR A1, [A2, #164] ; [DPU_V7M3_PIPE] |1929| .dwpsn file "../driverlib/uart.c",line 1930,column 5,is_stmt,isa 1 ;---------------------------------------------------------------------- ; 1930 | HWREG(ui32Base + UART_O_9BITAMASK) = ui8Mask << UART_9BITAMASK_MASK_S; ;---------------------------------------------------------------------- LDRB A1, [SP, #5] ; [DPU_V7M3_PIPE] |1930| LDR A2, [SP, #0] ; [DPU_V7M3_PIPE] |1930| STR A1, [A2, #168] ; [DPU_V7M3_PIPE] |1930| .dwpsn file "../driverlib/uart.c",line 1931,column 1,is_stmt,isa 1 ADD SP, SP, #8 ; [DPU_V7M3_PIPE] .dwcfi cfa_offset, 0 $C$DW$273 .dwtag DW_TAG_TI_branch .dwattr $C$DW$273, DW_AT_low_pc(0x00) .dwattr $C$DW$273, DW_AT_TI_return BX LR ; [DPU_V7M3_PIPE] ; BRANCH OCCURS ; [] .dwattr $C$DW$266, DW_AT_TI_end_file("../driverlib/uart.c") .dwattr $C$DW$266, DW_AT_TI_end_line(0x78b) .dwattr $C$DW$266, DW_AT_TI_end_column(0x01) .dwendentry .dwendtag $C$DW$266 .sect ".text" .clink .thumbfunc UART9BitAddrSend .thumb .global UART9BitAddrSend $C$DW$274 .dwtag DW_TAG_subprogram .dwattr $C$DW$274, DW_AT_name("UART9BitAddrSend") .dwattr $C$DW$274, DW_AT_low_pc(UART9BitAddrSend) .dwattr $C$DW$274, DW_AT_high_pc(0x00) .dwattr $C$DW$274, DW_AT_TI_symbol_name("UART9BitAddrSend") .dwattr $C$DW$274, DW_AT_external .dwattr $C$DW$274, DW_AT_TI_begin_file("../driverlib/uart.c") .dwattr $C$DW$274, DW_AT_TI_begin_line(0x7a5) .dwattr $C$DW$274, DW_AT_TI_begin_column(0x01) .dwattr $C$DW$274, DW_AT_decl_file("../driverlib/uart.c") .dwattr $C$DW$274, DW_AT_decl_line(0x7a5) .dwattr $C$DW$274, DW_AT_decl_column(0x01) .dwattr $C$DW$274, DW_AT_TI_max_frame_size(0x10) .dwpsn file "../driverlib/uart.c",line 1958,column 1,is_stmt,address UART9BitAddrSend,isa 1 .dwfde $C$DW$CIE, UART9BitAddrSend $C$DW$275 .dwtag DW_TAG_formal_parameter .dwattr $C$DW$275, DW_AT_name("ui32Base") .dwattr $C$DW$275, DW_AT_TI_symbol_name("ui32Base") .dwattr $C$DW$275, DW_AT_type(*$C$DW$T$27) .dwattr $C$DW$275, DW_AT_location[DW_OP_reg0] $C$DW$276 .dwtag DW_TAG_formal_parameter .dwattr $C$DW$276, DW_AT_name("ui8Addr") .dwattr $C$DW$276, DW_AT_TI_symbol_name("ui8Addr") .dwattr $C$DW$276, DW_AT_type(*$C$DW$T$42) .dwattr $C$DW$276, DW_AT_location[DW_OP_reg1] ;---------------------------------------------------------------------- ; 1957 | UART9BitAddrSend(uint32_t ui32Base, uint8_t ui8Addr) ;---------------------------------------------------------------------- ;***************************************************************************** ;* FUNCTION NAME: UART9BitAddrSend * ;* * ;* Regs Modified : A1,A2,SP,SR * ;* Regs Used : A1,A2,SP,LR,SR * ;* Local Frame Size : 0 Args + 12 Auto + 0 Save = 12 byte * ;***************************************************************************** UART9BitAddrSend: ;* --------------------------------------------------------------------------* .dwcfi cfa_offset, 0 SUB SP, SP, #16 ; [DPU_V7M3_PIPE] .dwcfi cfa_offset, 16 $C$DW$277 .dwtag DW_TAG_variable .dwattr $C$DW$277, DW_AT_name("ui32Base") .dwattr $C$DW$277, DW_AT_TI_symbol_name("ui32Base") .dwattr $C$DW$277, DW_AT_type(*$C$DW$T$27) .dwattr $C$DW$277, DW_AT_location[DW_OP_breg13 0] $C$DW$278 .dwtag DW_TAG_variable .dwattr $C$DW$278, DW_AT_name("ui32LCRH") .dwattr $C$DW$278, DW_AT_TI_symbol_name("ui32LCRH") .dwattr $C$DW$278, DW_AT_type(*$C$DW$T$27) .dwattr $C$DW$278, DW_AT_location[DW_OP_breg13 4] $C$DW$279 .dwtag DW_TAG_variable .dwattr $C$DW$279, DW_AT_name("ui8Addr") .dwattr $C$DW$279, DW_AT_TI_symbol_name("ui8Addr") .dwattr $C$DW$279, DW_AT_type(*$C$DW$T$42) .dwattr $C$DW$279, DW_AT_location[DW_OP_breg13 8] ;---------------------------------------------------------------------- ; 1959 | uint32_t ui32LCRH; ; 1961 | // ; 1962 | // Check the arguments. ; 1963 | // ; 1964 | ASSERT(_UARTBaseValid(ui32Base)); ; 1966 | // ; 1967 | // Wait until the FIFO is empty and the UART is not busy. ; 1968 | // ;---------------------------------------------------------------------- STRB A2, [SP, #8] ; [DPU_V7M3_PIPE] |1958| STR A1, [SP, #0] ; [DPU_V7M3_PIPE] |1958| .dwpsn file "../driverlib/uart.c",line 1969,column 5,is_stmt,isa 1 ;---------------------------------------------------------------------- ; 1969 | while((HWREG(ui32Base + UART_O_FR) & (UART_FR_TXFE | UART_FR_BUSY)) != ;---------------------------------------------------------------------- ;* --------------------------------------------------------------------------* ;* BEGIN LOOP ||$C$L31|| ;* ;* Loop source line : 1969 ;* Loop closing brace source line : 1972 ;* Known Minimum Trip Count : 1 ;* Known Maximum Trip Count : 4294967295 ;* Known Max Trip Count Factor : 1 ;* --------------------------------------------------------------------------* ||$C$L31||: .dwpsn file "../driverlib/uart.c",line 1969,column 11,is_stmt,isa 1 ;---------------------------------------------------------------------- ; 1970 | UART_FR_TXFE) ; 1974 | // ; 1975 | // Force the address/data bit to 1 to indicate this is an address byte. ; 1976 | // ;---------------------------------------------------------------------- LDR A1, [SP, #0] ; [DPU_V7M3_PIPE] |1969| LDR A1, [A1, #24] ; [DPU_V7M3_PIPE] |1969| AND A1, A1, #136 ; [DPU_V7M3_PIPE] |1969| CMP A1, #128 ; [DPU_V7M3_PIPE] |1969| BNE ||$C$L31|| ; [DPU_V7M3_PIPE] |1969| ; BRANCHCC OCCURS {||$C$L31||} ; [] |1969| ;* --------------------------------------------------------------------------* .dwpsn file "../driverlib/uart.c",line 1977,column 5,is_stmt,isa 1 ;---------------------------------------------------------------------- ; 1977 | ui32LCRH = HWREG(ui32Base + UART_O_LCRH); ;---------------------------------------------------------------------- LDR A1, [SP, #0] ; [DPU_V7M3_PIPE] |1977| LDR A1, [A1, #44] ; [DPU_V7M3_PIPE] |1977| STR A1, [SP, #4] ; [DPU_V7M3_PIPE] |1977| .dwpsn file "../driverlib/uart.c",line 1978,column 5,is_stmt,isa 1 ;---------------------------------------------------------------------- ; 1978 | HWREG(ui32Base + UART_O_LCRH) = ((ui32LCRH & ~UART_LCRH_EPS) | ; 1979 | UART_LCRH_SPS | UART_LCRH_PEN); ; 1981 | // ; 1982 | // Send the address. ; 1983 | // ;---------------------------------------------------------------------- LDR A2, [SP, #0] ; [DPU_V7M3_PIPE] |1978| LDR A1, [SP, #4] ; [DPU_V7M3_PIPE] |1978| BIC A1, A1, #4 ; [DPU_V7M3_PIPE] |1978| ORR A1, A1, #130 ; [DPU_V7M3_PIPE] |1978| STR A1, [A2, #44] ; [DPU_V7M3_PIPE] |1978| .dwpsn file "../driverlib/uart.c",line 1984,column 5,is_stmt,isa 1 ;---------------------------------------------------------------------- ; 1984 | HWREG(ui32Base + UART_O_DR) = ui8Addr; ; 1986 | // ; 1987 | // Wait until the address has been sent. ; 1988 | // ;---------------------------------------------------------------------- LDRB A1, [SP, #8] ; [DPU_V7M3_PIPE] |1984| LDR A2, [SP, #0] ; [DPU_V7M3_PIPE] |1984| STR A1, [A2, #0] ; [DPU_V7M3_PIPE] |1984| .dwpsn file "../driverlib/uart.c",line 1989,column 5,is_stmt,isa 1 ;---------------------------------------------------------------------- ; 1989 | while((HWREG(ui32Base + UART_O_FR) & (UART_FR_TXFE | UART_FR_BUSY)) != ;---------------------------------------------------------------------- ;* --------------------------------------------------------------------------* ;* BEGIN LOOP ||$C$L32|| ;* ;* Loop source line : 1989 ;* Loop closing brace source line : 1992 ;* Known Minimum Trip Count : 1 ;* Known Maximum Trip Count : 4294967295 ;* Known Max Trip Count Factor : 1 ;* --------------------------------------------------------------------------* ||$C$L32||: .dwpsn file "../driverlib/uart.c",line 1989,column 11,is_stmt,isa 1 ;---------------------------------------------------------------------- ; 1990 | UART_FR_TXFE) ; 1994 | // ; 1995 | // Restore the address/data setting. ; 1996 | // ;---------------------------------------------------------------------- LDR A1, [SP, #0] ; [DPU_V7M3_PIPE] |1989| LDR A1, [A1, #24] ; [DPU_V7M3_PIPE] |1989| AND A1, A1, #136 ; [DPU_V7M3_PIPE] |1989| CMP A1, #128 ; [DPU_V7M3_PIPE] |1989| BNE ||$C$L32|| ; [DPU_V7M3_PIPE] |1989| ; BRANCHCC OCCURS {||$C$L32||} ; [] |1989| ;* --------------------------------------------------------------------------* .dwpsn file "../driverlib/uart.c",line 1997,column 5,is_stmt,isa 1 ;---------------------------------------------------------------------- ; 1997 | HWREG(ui32Base + UART_O_LCRH) = ui32LCRH; ;---------------------------------------------------------------------- LDR A1, [SP, #4] ; [DPU_V7M3_PIPE] |1997| LDR A2, [SP, #0] ; [DPU_V7M3_PIPE] |1997| STR A1, [A2, #44] ; [DPU_V7M3_PIPE] |1997| .dwpsn file "../driverlib/uart.c",line 1998,column 1,is_stmt,isa 1 ADD SP, SP, #16 ; [DPU_V7M3_PIPE] .dwcfi cfa_offset, 0 $C$DW$280 .dwtag DW_TAG_TI_branch .dwattr $C$DW$280, DW_AT_low_pc(0x00) .dwattr $C$DW$280, DW_AT_TI_return BX LR ; [DPU_V7M3_PIPE] ; BRANCH OCCURS ; [] .dwattr $C$DW$274, DW_AT_TI_end_file("../driverlib/uart.c") .dwattr $C$DW$274, DW_AT_TI_end_line(0x7ce) .dwattr $C$DW$274, DW_AT_TI_end_column(0x01) .dwendentry .dwendtag $C$DW$274 .sect ".text" .clink .thumbfunc UARTLoopbackEnable .thumb .global UARTLoopbackEnable $C$DW$281 .dwtag DW_TAG_subprogram .dwattr $C$DW$281, DW_AT_name("UARTLoopbackEnable") .dwattr $C$DW$281, DW_AT_low_pc(UARTLoopbackEnable) .dwattr $C$DW$281, DW_AT_high_pc(0x00) .dwattr $C$DW$281, DW_AT_TI_symbol_name("UARTLoopbackEnable") .dwattr $C$DW$281, DW_AT_external .dwattr $C$DW$281, DW_AT_TI_begin_file("../driverlib/uart.c") .dwattr $C$DW$281, DW_AT_TI_begin_line(0x7e0) .dwattr $C$DW$281, DW_AT_TI_begin_column(0x06) .dwattr $C$DW$281, DW_AT_decl_file("../driverlib/uart.c") .dwattr $C$DW$281, DW_AT_decl_line(0x7e0) .dwattr $C$DW$281, DW_AT_decl_column(0x06) .dwattr $C$DW$281, DW_AT_TI_max_frame_size(0x08) .dwpsn file "../driverlib/uart.c",line 2017,column 1,is_stmt,address UARTLoopbackEnable,isa 1 .dwfde $C$DW$CIE, UARTLoopbackEnable $C$DW$282 .dwtag DW_TAG_formal_parameter .dwattr $C$DW$282, DW_AT_name("ui32Base") .dwattr $C$DW$282, DW_AT_TI_symbol_name("ui32Base") .dwattr $C$DW$282, DW_AT_type(*$C$DW$T$27) .dwattr $C$DW$282, DW_AT_location[DW_OP_reg0] ;---------------------------------------------------------------------- ; 2016 | void UARTLoopbackEnable(uint32_t ui32Base) ;---------------------------------------------------------------------- ;***************************************************************************** ;* FUNCTION NAME: UARTLoopbackEnable * ;* * ;* Regs Modified : A1,A2,SP,SR * ;* Regs Used : A1,A2,SP,LR,SR * ;* Local Frame Size : 0 Args + 4 Auto + 0 Save = 4 byte * ;***************************************************************************** UARTLoopbackEnable: ;* --------------------------------------------------------------------------* .dwcfi cfa_offset, 0 SUB SP, SP, #8 ; [DPU_V7M3_PIPE] .dwcfi cfa_offset, 8 $C$DW$283 .dwtag DW_TAG_variable .dwattr $C$DW$283, DW_AT_name("ui32Base") .dwattr $C$DW$283, DW_AT_TI_symbol_name("ui32Base") .dwattr $C$DW$283, DW_AT_type(*$C$DW$T$27) .dwattr $C$DW$283, DW_AT_location[DW_OP_breg13 0] ;---------------------------------------------------------------------- ; 2018 | // ; 2019 | // Check the arguments. ; 2020 | // ; 2021 | ASSERT(_UARTBaseValid(ui32Base)); ; 2023 | // ; 2024 | // Write the Loopback Enable bit to register. ; 2025 | // ;---------------------------------------------------------------------- STR A1, [SP, #0] ; [DPU_V7M3_PIPE] |2017| .dwpsn file "../driverlib/uart.c",line 2026,column 5,is_stmt,isa 1 ;---------------------------------------------------------------------- ; 2026 | HWREG(ui32Base + UART_O_CTL) |= UART_CTL_LBE; ;---------------------------------------------------------------------- LDR A1, [SP, #0] ; [DPU_V7M3_PIPE] |2026| ADDS A1, A1, #48 ; [DPU_V7M3_PIPE] |2026| LDR A2, [A1, #0] ; [DPU_V7M3_PIPE] |2026| ORR A2, A2, #128 ; [DPU_V7M3_PIPE] |2026| STR A2, [A1, #0] ; [DPU_V7M3_PIPE] |2026| .dwpsn file "../driverlib/uart.c",line 2027,column 1,is_stmt,isa 1 ADD SP, SP, #8 ; [DPU_V7M3_PIPE] .dwcfi cfa_offset, 0 $C$DW$284 .dwtag DW_TAG_TI_branch .dwattr $C$DW$284, DW_AT_low_pc(0x00) .dwattr $C$DW$284, DW_AT_TI_return BX LR ; [DPU_V7M3_PIPE] ; BRANCH OCCURS ; [] .dwattr $C$DW$281, DW_AT_TI_end_file("../driverlib/uart.c") .dwattr $C$DW$281, DW_AT_TI_end_line(0x7eb) .dwattr $C$DW$281, DW_AT_TI_end_column(0x01) .dwendentry .dwendtag $C$DW$281 ;***************************************************************************** ;* UNDEFINED EXTERNAL REFERENCES * ;***************************************************************************** .global IntRegister .global IntEnable .global IntDisable .global IntUnregister ;****************************************************************************** ;* BUILD ATTRIBUTES * ;****************************************************************************** .battr "aeabi", Tag_File, 1, Tag_ABI_PCS_wchar_t(2) .battr "aeabi", Tag_File, 1, Tag_ABI_FP_rounding(0) .battr "aeabi", Tag_File, 1, Tag_ABI_FP_denormal(0) .battr "aeabi", Tag_File, 1, Tag_ABI_FP_exceptions(0) .battr "aeabi", Tag_File, 1, Tag_ABI_FP_number_model(1) .battr "aeabi", Tag_File, 1, Tag_ABI_enum_size(0) .battr "aeabi", Tag_File, 1, Tag_ABI_optimization_goals(5) .battr "aeabi", Tag_File, 1, Tag_ABI_FP_optimization_goals(0) .battr "TI", Tag_File, 1, Tag_Bitfield_layout(2) .battr "aeabi", Tag_File, 1, Tag_ABI_VFP_args(3) .battr "TI", Tag_File, 1, Tag_FP_interface(1) ;****************************************************************************** ;* TYPE INFORMATION * ;****************************************************************************** $C$DW$T$21 .dwtag DW_TAG_structure_type .dwattr $C$DW$T$21, DW_AT_byte_size(0x10) $C$DW$285 .dwtag DW_TAG_member .dwattr $C$DW$285, DW_AT_type(*$C$DW$T$14) .dwattr $C$DW$285, DW_AT_name("__max_align1") .dwattr $C$DW$285, DW_AT_TI_symbol_name("__max_align1") .dwattr $C$DW$285, DW_AT_data_member_location[DW_OP_plus_uconst 0x0] .dwattr $C$DW$285, DW_AT_accessibility(DW_ACCESS_public) .dwattr $C$DW$285, DW_AT_decl_file("/home/pola/ti/ccsv8/tools/compiler/ti-cgt-arm_18.1.1.LTS/include/sys/_types.h") .dwattr $C$DW$285, DW_AT_decl_line(0x70) .dwattr $C$DW$285, DW_AT_decl_column(0x0c) $C$DW$286 .dwtag DW_TAG_member .dwattr $C$DW$286, DW_AT_type(*$C$DW$T$18) .dwattr $C$DW$286, DW_AT_name("__max_align2") .dwattr $C$DW$286, DW_AT_TI_symbol_name("__max_align2") .dwattr $C$DW$286, DW_AT_data_member_location[DW_OP_plus_uconst 0x8] .dwattr $C$DW$286, DW_AT_accessibility(DW_ACCESS_public) .dwattr $C$DW$286, DW_AT_decl_file("/home/pola/ti/ccsv8/tools/compiler/ti-cgt-arm_18.1.1.LTS/include/sys/_types.h") .dwattr $C$DW$286, DW_AT_decl_line(0x71) .dwattr $C$DW$286, DW_AT_decl_column(0x0e) .dwattr $C$DW$T$21, DW_AT_decl_file("/home/pola/ti/ccsv8/tools/compiler/ti-cgt-arm_18.1.1.LTS/include/sys/_types.h") .dwattr $C$DW$T$21, DW_AT_decl_line(0x6f) .dwattr $C$DW$T$21, DW_AT_decl_column(0x10) .dwendtag $C$DW$T$21 $C$DW$T$23 .dwtag DW_TAG_typedef .dwattr $C$DW$T$23, DW_AT_name("__max_align_t") .dwattr $C$DW$T$23, DW_AT_type(*$C$DW$T$21) .dwattr $C$DW$T$23, DW_AT_language(DW_LANG_C) .dwattr $C$DW$T$23, DW_AT_decl_file("/home/pola/ti/ccsv8/tools/compiler/ti-cgt-arm_18.1.1.LTS/include/sys/_types.h") .dwattr $C$DW$T$23, DW_AT_decl_line(0x72) .dwattr $C$DW$T$23, DW_AT_decl_column(0x03) $C$DW$T$2 .dwtag DW_TAG_unspecified_type .dwattr $C$DW$T$2, DW_AT_name("void") $C$DW$T$3 .dwtag DW_TAG_pointer_type .dwattr $C$DW$T$3, DW_AT_type(*$C$DW$T$2) .dwattr $C$DW$T$3, DW_AT_address_class(0x20) $C$DW$T$24 .dwtag DW_TAG_subroutine_type .dwattr $C$DW$T$24, DW_AT_language(DW_LANG_C) .dwendtag $C$DW$T$24 $C$DW$T$25 .dwtag DW_TAG_pointer_type .dwattr $C$DW$T$25, DW_AT_type(*$C$DW$T$24) .dwattr $C$DW$T$25, DW_AT_address_class(0x20) $C$DW$T$4 .dwtag DW_TAG_base_type .dwattr $C$DW$T$4, DW_AT_encoding(DW_ATE_boolean) .dwattr $C$DW$T$4, DW_AT_name("bool") .dwattr $C$DW$T$4, DW_AT_byte_size(0x01) $C$DW$T$5 .dwtag DW_TAG_base_type .dwattr $C$DW$T$5, DW_AT_encoding(DW_ATE_signed_char) .dwattr $C$DW$T$5, DW_AT_name("signed char") .dwattr $C$DW$T$5, DW_AT_byte_size(0x01) $C$DW$T$45 .dwtag DW_TAG_typedef .dwattr $C$DW$T$45, DW_AT_name("__int8_t") .dwattr $C$DW$T$45, DW_AT_type(*$C$DW$T$5) .dwattr $C$DW$T$45, DW_AT_language(DW_LANG_C) .dwattr $C$DW$T$45, DW_AT_decl_file("/home/pola/ti/ccsv8/tools/compiler/ti-cgt-arm_18.1.1.LTS/include/machine/_types.h") .dwattr $C$DW$T$45, DW_AT_decl_line(0x39) .dwattr $C$DW$T$45, DW_AT_decl_column(0x16) $C$DW$T$46 .dwtag DW_TAG_typedef .dwattr $C$DW$T$46, DW_AT_name("__int_least8_t") .dwattr $C$DW$T$46, DW_AT_type(*$C$DW$T$45) .dwattr $C$DW$T$46, DW_AT_language(DW_LANG_C) .dwattr $C$DW$T$46, DW_AT_decl_file("/home/pola/ti/ccsv8/tools/compiler/ti-cgt-arm_18.1.1.LTS/include/machine/_types.h") .dwattr $C$DW$T$46, DW_AT_decl_line(0x58) .dwattr $C$DW$T$46, DW_AT_decl_column(0x12) $C$DW$T$47 .dwtag DW_TAG_typedef .dwattr $C$DW$T$47, DW_AT_name("int_least8_t") .dwattr $C$DW$T$47, DW_AT_type(*$C$DW$T$46) .dwattr $C$DW$T$47, DW_AT_language(DW_LANG_C) .dwattr $C$DW$T$47, DW_AT_decl_file("/home/pola/ti/ccsv8/tools/compiler/ti-cgt-arm_18.1.1.LTS/include/sys/stdint.h") .dwattr $C$DW$T$47, DW_AT_decl_line(0x28) .dwattr $C$DW$T$47, DW_AT_decl_column(0x19) $C$DW$T$48 .dwtag DW_TAG_typedef .dwattr $C$DW$T$48, DW_AT_name("int8_t") .dwattr $C$DW$T$48, DW_AT_type(*$C$DW$T$45) .dwattr $C$DW$T$48, DW_AT_language(DW_LANG_C) .dwattr $C$DW$T$48, DW_AT_decl_file("/home/pola/ti/ccsv8/tools/compiler/ti-cgt-arm_18.1.1.LTS/include/sys/_stdint.h") .dwattr $C$DW$T$48, DW_AT_decl_line(0x24) .dwattr $C$DW$T$48, DW_AT_decl_column(0x13) $C$DW$T$6 .dwtag DW_TAG_base_type .dwattr $C$DW$T$6, DW_AT_encoding(DW_ATE_unsigned_char) .dwattr $C$DW$T$6, DW_AT_name("unsigned char") .dwattr $C$DW$T$6, DW_AT_byte_size(0x01) $C$DW$T$41 .dwtag DW_TAG_typedef .dwattr $C$DW$T$41, DW_AT_name("__uint8_t") .dwattr $C$DW$T$41, DW_AT_type(*$C$DW$T$6) .dwattr $C$DW$T$41, DW_AT_language(DW_LANG_C) .dwattr $C$DW$T$41, DW_AT_decl_file("/home/pola/ti/ccsv8/tools/compiler/ti-cgt-arm_18.1.1.LTS/include/machine/_types.h") .dwattr $C$DW$T$41, DW_AT_decl_line(0x3a) .dwattr $C$DW$T$41, DW_AT_decl_column(0x18) $C$DW$T$49 .dwtag DW_TAG_typedef .dwattr $C$DW$T$49, DW_AT_name("__sa_family_t") .dwattr $C$DW$T$49, DW_AT_type(*$C$DW$T$41) .dwattr $C$DW$T$49, DW_AT_language(DW_LANG_C) .dwattr $C$DW$T$49, DW_AT_decl_file("/home/pola/ti/ccsv8/tools/compiler/ti-cgt-arm_18.1.1.LTS/include/sys/_types.h") .dwattr $C$DW$T$49, DW_AT_decl_line(0x43) .dwattr $C$DW$T$49, DW_AT_decl_column(0x13) $C$DW$T$50 .dwtag DW_TAG_typedef .dwattr $C$DW$T$50, DW_AT_name("__uint_least8_t") .dwattr $C$DW$T$50, DW_AT_type(*$C$DW$T$41) .dwattr $C$DW$T$50, DW_AT_language(DW_LANG_C) .dwattr $C$DW$T$50, DW_AT_decl_file("/home/pola/ti/ccsv8/tools/compiler/ti-cgt-arm_18.1.1.LTS/include/machine/_types.h") .dwattr $C$DW$T$50, DW_AT_decl_line(0x6d) .dwattr $C$DW$T$50, DW_AT_decl_column(0x13) $C$DW$T$51 .dwtag DW_TAG_typedef .dwattr $C$DW$T$51, DW_AT_name("uint_least8_t") .dwattr $C$DW$T$51, DW_AT_type(*$C$DW$T$50) .dwattr $C$DW$T$51, DW_AT_language(DW_LANG_C) .dwattr $C$DW$T$51, DW_AT_decl_file("/home/pola/ti/ccsv8/tools/compiler/ti-cgt-arm_18.1.1.LTS/include/sys/stdint.h") .dwattr $C$DW$T$51, DW_AT_decl_line(0x2d) .dwattr $C$DW$T$51, DW_AT_decl_column(0x1a) $C$DW$T$42 .dwtag DW_TAG_typedef .dwattr $C$DW$T$42, DW_AT_name("uint8_t") .dwattr $C$DW$T$42, DW_AT_type(*$C$DW$T$41) .dwattr $C$DW$T$42, DW_AT_language(DW_LANG_C) .dwattr $C$DW$T$42, DW_AT_decl_file("/home/pola/ti/ccsv8/tools/compiler/ti-cgt-arm_18.1.1.LTS/include/sys/_stdint.h") .dwattr $C$DW$T$42, DW_AT_decl_line(0x38) .dwattr $C$DW$T$42, DW_AT_decl_column(0x14) $C$DW$T$7 .dwtag DW_TAG_base_type .dwattr $C$DW$T$7, DW_AT_encoding(DW_ATE_signed_char) .dwattr $C$DW$T$7, DW_AT_name("wchar_t") .dwattr $C$DW$T$7, DW_AT_byte_size(0x02) $C$DW$T$8 .dwtag DW_TAG_base_type .dwattr $C$DW$T$8, DW_AT_encoding(DW_ATE_signed) .dwattr $C$DW$T$8, DW_AT_name("short") .dwattr $C$DW$T$8, DW_AT_byte_size(0x02) $C$DW$T$52 .dwtag DW_TAG_typedef .dwattr $C$DW$T$52, DW_AT_name("__int16_t") .dwattr $C$DW$T$52, DW_AT_type(*$C$DW$T$8) .dwattr $C$DW$T$52, DW_AT_language(DW_LANG_C) .dwattr $C$DW$T$52, DW_AT_decl_file("/home/pola/ti/ccsv8/tools/compiler/ti-cgt-arm_18.1.1.LTS/include/machine/_types.h") .dwattr $C$DW$T$52, DW_AT_decl_line(0x3b) .dwattr $C$DW$T$52, DW_AT_decl_column(0x11) $C$DW$T$53 .dwtag DW_TAG_typedef .dwattr $C$DW$T$53, DW_AT_name("__int_least16_t") .dwattr $C$DW$T$53, DW_AT_type(*$C$DW$T$52) .dwattr $C$DW$T$53, DW_AT_language(DW_LANG_C) .dwattr $C$DW$T$53, DW_AT_decl_file("/home/pola/ti/ccsv8/tools/compiler/ti-cgt-arm_18.1.1.LTS/include/machine/_types.h") .dwattr $C$DW$T$53, DW_AT_decl_line(0x59) .dwattr $C$DW$T$53, DW_AT_decl_column(0x13) $C$DW$T$54 .dwtag DW_TAG_typedef .dwattr $C$DW$T$54, DW_AT_name("int_least16_t") .dwattr $C$DW$T$54, DW_AT_type(*$C$DW$T$53) .dwattr $C$DW$T$54, DW_AT_language(DW_LANG_C) .dwattr $C$DW$T$54, DW_AT_decl_file("/home/pola/ti/ccsv8/tools/compiler/ti-cgt-arm_18.1.1.LTS/include/sys/stdint.h") .dwattr $C$DW$T$54, DW_AT_decl_line(0x29) .dwattr $C$DW$T$54, DW_AT_decl_column(0x1a) $C$DW$T$55 .dwtag DW_TAG_typedef .dwattr $C$DW$T$55, DW_AT_name("int16_t") .dwattr $C$DW$T$55, DW_AT_type(*$C$DW$T$52) .dwattr $C$DW$T$55, DW_AT_language(DW_LANG_C) .dwattr $C$DW$T$55, DW_AT_decl_file("/home/pola/ti/ccsv8/tools/compiler/ti-cgt-arm_18.1.1.LTS/include/sys/_stdint.h") .dwattr $C$DW$T$55, DW_AT_decl_line(0x29) .dwattr $C$DW$T$55, DW_AT_decl_column(0x14) $C$DW$T$9 .dwtag DW_TAG_base_type .dwattr $C$DW$T$9, DW_AT_encoding(DW_ATE_unsigned) .dwattr $C$DW$T$9, DW_AT_name("unsigned short") .dwattr $C$DW$T$9, DW_AT_byte_size(0x02) $C$DW$T$56 .dwtag DW_TAG_typedef .dwattr $C$DW$T$56, DW_AT_name("___wchar_t") .dwattr $C$DW$T$56, DW_AT_type(*$C$DW$T$9) .dwattr $C$DW$T$56, DW_AT_language(DW_LANG_C) .dwattr $C$DW$T$56, DW_AT_decl_file("/home/pola/ti/ccsv8/tools/compiler/ti-cgt-arm_18.1.1.LTS/include/machine/_types.h") .dwattr $C$DW$T$56, DW_AT_decl_line(0x76) .dwattr $C$DW$T$56, DW_AT_decl_column(0x1a) $C$DW$T$57 .dwtag DW_TAG_typedef .dwattr $C$DW$T$57, DW_AT_name("__uint16_t") .dwattr $C$DW$T$57, DW_AT_type(*$C$DW$T$9) .dwattr $C$DW$T$57, DW_AT_language(DW_LANG_C) .dwattr $C$DW$T$57, DW_AT_decl_file("/home/pola/ti/ccsv8/tools/compiler/ti-cgt-arm_18.1.1.LTS/include/machine/_types.h") .dwattr $C$DW$T$57, DW_AT_decl_line(0x3c) .dwattr $C$DW$T$57, DW_AT_decl_column(0x19) $C$DW$T$58 .dwtag DW_TAG_typedef .dwattr $C$DW$T$58, DW_AT_name("__mode_t") .dwattr $C$DW$T$58, DW_AT_type(*$C$DW$T$57) .dwattr $C$DW$T$58, DW_AT_language(DW_LANG_C) .dwattr $C$DW$T$58, DW_AT_decl_file("/home/pola/ti/ccsv8/tools/compiler/ti-cgt-arm_18.1.1.LTS/include/sys/_types.h") .dwattr $C$DW$T$58, DW_AT_decl_line(0x39) .dwattr $C$DW$T$58, DW_AT_decl_column(0x14) $C$DW$T$59 .dwtag DW_TAG_typedef .dwattr $C$DW$T$59, DW_AT_name("__uint_least16_t") .dwattr $C$DW$T$59, DW_AT_type(*$C$DW$T$57) .dwattr $C$DW$T$59, DW_AT_language(DW_LANG_C) .dwattr $C$DW$T$59, DW_AT_decl_file("/home/pola/ti/ccsv8/tools/compiler/ti-cgt-arm_18.1.1.LTS/include/machine/_types.h") .dwattr $C$DW$T$59, DW_AT_decl_line(0x6e) .dwattr $C$DW$T$59, DW_AT_decl_column(0x14) $C$DW$T$60 .dwtag DW_TAG_typedef .dwattr $C$DW$T$60, DW_AT_name("__char16_t") .dwattr $C$DW$T$60, DW_AT_type(*$C$DW$T$59) .dwattr $C$DW$T$60, DW_AT_language(DW_LANG_C) .dwattr $C$DW$T$60, DW_AT_decl_file("/home/pola/ti/ccsv8/tools/compiler/ti-cgt-arm_18.1.1.LTS/include/sys/_types.h") .dwattr $C$DW$T$60, DW_AT_decl_line(0x66) .dwattr $C$DW$T$60, DW_AT_decl_column(0x1a) $C$DW$T$61 .dwtag DW_TAG_typedef .dwattr $C$DW$T$61, DW_AT_name("uint_least16_t") .dwattr $C$DW$T$61, DW_AT_type(*$C$DW$T$59) .dwattr $C$DW$T$61, DW_AT_language(DW_LANG_C) .dwattr $C$DW$T$61, DW_AT_decl_file("/home/pola/ti/ccsv8/tools/compiler/ti-cgt-arm_18.1.1.LTS/include/sys/stdint.h") .dwattr $C$DW$T$61, DW_AT_decl_line(0x2e) .dwattr $C$DW$T$61, DW_AT_decl_column(0x1a) $C$DW$T$62 .dwtag DW_TAG_typedef .dwattr $C$DW$T$62, DW_AT_name("uint16_t") .dwattr $C$DW$T$62, DW_AT_type(*$C$DW$T$57) .dwattr $C$DW$T$62, DW_AT_language(DW_LANG_C) .dwattr $C$DW$T$62, DW_AT_decl_file("/home/pola/ti/ccsv8/tools/compiler/ti-cgt-arm_18.1.1.LTS/include/sys/_stdint.h") .dwattr $C$DW$T$62, DW_AT_decl_line(0x3d) .dwattr $C$DW$T$62, DW_AT_decl_column(0x15) $C$DW$T$10 .dwtag DW_TAG_base_type .dwattr $C$DW$T$10, DW_AT_encoding(DW_ATE_signed) .dwattr $C$DW$T$10, DW_AT_name("int") .dwattr $C$DW$T$10, DW_AT_byte_size(0x04) $C$DW$T$63 .dwtag DW_TAG_typedef .dwattr $C$DW$T$63, DW_AT_name("_Mbstatet") .dwattr $C$DW$T$63, DW_AT_type(*$C$DW$T$10) .dwattr $C$DW$T$63, DW_AT_language(DW_LANG_C) .dwattr $C$DW$T$63, DW_AT_decl_file("/home/pola/ti/ccsv8/tools/compiler/ti-cgt-arm_18.1.1.LTS/include/sys/_types.h") .dwattr $C$DW$T$63, DW_AT_decl_line(0x84) .dwattr $C$DW$T$63, DW_AT_decl_column(0x0d) $C$DW$T$64 .dwtag DW_TAG_typedef .dwattr $C$DW$T$64, DW_AT_name("__mbstate_t") .dwattr $C$DW$T$64, DW_AT_type(*$C$DW$T$63) .dwattr $C$DW$T$64, DW_AT_language(DW_LANG_C) .dwattr $C$DW$T$64, DW_AT_decl_file("/home/pola/ti/ccsv8/tools/compiler/ti-cgt-arm_18.1.1.LTS/include/sys/_types.h") .dwattr $C$DW$T$64, DW_AT_decl_line(0x87) .dwattr $C$DW$T$64, DW_AT_decl_column(0x13) $C$DW$T$65 .dwtag DW_TAG_typedef .dwattr $C$DW$T$65, DW_AT_name("__accmode_t") .dwattr $C$DW$T$65, DW_AT_type(*$C$DW$T$10) .dwattr $C$DW$T$65, DW_AT_language(DW_LANG_C) .dwattr $C$DW$T$65, DW_AT_decl_file("/home/pola/ti/ccsv8/tools/compiler/ti-cgt-arm_18.1.1.LTS/include/sys/_types.h") .dwattr $C$DW$T$65, DW_AT_decl_line(0x3a) .dwattr $C$DW$T$65, DW_AT_decl_column(0x0e) $C$DW$T$66 .dwtag DW_TAG_typedef .dwattr $C$DW$T$66, DW_AT_name("__cpulevel_t") .dwattr $C$DW$T$66, DW_AT_type(*$C$DW$T$10) .dwattr $C$DW$T$66, DW_AT_language(DW_LANG_C) .dwattr $C$DW$T$66, DW_AT_decl_file("/home/pola/ti/ccsv8/tools/compiler/ti-cgt-arm_18.1.1.LTS/include/sys/_types.h") .dwattr $C$DW$T$66, DW_AT_decl_line(0x4b) .dwattr $C$DW$T$66, DW_AT_decl_column(0x0e) $C$DW$T$67 .dwtag DW_TAG_typedef .dwattr $C$DW$T$67, DW_AT_name("__cpusetid_t") .dwattr $C$DW$T$67, DW_AT_type(*$C$DW$T$10) .dwattr $C$DW$T$67, DW_AT_language(DW_LANG_C) .dwattr $C$DW$T$67, DW_AT_decl_file("/home/pola/ti/ccsv8/tools/compiler/ti-cgt-arm_18.1.1.LTS/include/sys/_types.h") .dwattr $C$DW$T$67, DW_AT_decl_line(0x4c) .dwattr $C$DW$T$67, DW_AT_decl_column(0x0e) $C$DW$T$68 .dwtag DW_TAG_typedef .dwattr $C$DW$T$68, DW_AT_name("__cpuwhich_t") .dwattr $C$DW$T$68, DW_AT_type(*$C$DW$T$10) .dwattr $C$DW$T$68, DW_AT_language(DW_LANG_C) .dwattr $C$DW$T$68, DW_AT_decl_file("/home/pola/ti/ccsv8/tools/compiler/ti-cgt-arm_18.1.1.LTS/include/sys/_types.h") .dwattr $C$DW$T$68, DW_AT_decl_line(0x4a) .dwattr $C$DW$T$68, DW_AT_decl_column(0x0e) $C$DW$T$69 .dwtag DW_TAG_typedef .dwattr $C$DW$T$69, DW_AT_name("__ct_rune_t") .dwattr $C$DW$T$69, DW_AT_type(*$C$DW$T$10) .dwattr $C$DW$T$69, DW_AT_language(DW_LANG_C) .dwattr $C$DW$T$69, DW_AT_decl_file("/home/pola/ti/ccsv8/tools/compiler/ti-cgt-arm_18.1.1.LTS/include/sys/_types.h") .dwattr $C$DW$T$69, DW_AT_decl_line(0x60) .dwattr $C$DW$T$69, DW_AT_decl_column(0x0e) $C$DW$T$70 .dwtag DW_TAG_typedef .dwattr $C$DW$T$70, DW_AT_name("__rune_t") .dwattr $C$DW$T$70, DW_AT_type(*$C$DW$T$69) .dwattr $C$DW$T$70, DW_AT_language(DW_LANG_C) .dwattr $C$DW$T$70, DW_AT_decl_file("/home/pola/ti/ccsv8/tools/compiler/ti-cgt-arm_18.1.1.LTS/include/sys/_types.h") .dwattr $C$DW$T$70, DW_AT_decl_line(0x61) .dwattr $C$DW$T$70, DW_AT_decl_column(0x15) $C$DW$T$71 .dwtag DW_TAG_typedef .dwattr $C$DW$T$71, DW_AT_name("__wint_t") .dwattr $C$DW$T$71, DW_AT_type(*$C$DW$T$69) .dwattr $C$DW$T$71, DW_AT_language(DW_LANG_C) .dwattr $C$DW$T$71, DW_AT_decl_file("/home/pola/ti/ccsv8/tools/compiler/ti-cgt-arm_18.1.1.LTS/include/sys/_types.h") .dwattr $C$DW$T$71, DW_AT_decl_line(0x62) .dwattr $C$DW$T$71, DW_AT_decl_column(0x15) $C$DW$T$72 .dwtag DW_TAG_typedef .dwattr $C$DW$T$72, DW_AT_name("__int32_t") .dwattr $C$DW$T$72, DW_AT_type(*$C$DW$T$10) .dwattr $C$DW$T$72, DW_AT_language(DW_LANG_C) .dwattr $C$DW$T$72, DW_AT_decl_file("/home/pola/ti/ccsv8/tools/compiler/ti-cgt-arm_18.1.1.LTS/include/machine/_types.h") .dwattr $C$DW$T$72, DW_AT_decl_line(0x3d) .dwattr $C$DW$T$72, DW_AT_decl_column(0x0f) $C$DW$T$73 .dwtag DW_TAG_typedef .dwattr $C$DW$T$73, DW_AT_name("__blksize_t") .dwattr $C$DW$T$73, DW_AT_type(*$C$DW$T$72) .dwattr $C$DW$T$73, DW_AT_language(DW_LANG_C) .dwattr $C$DW$T$73, DW_AT_decl_file("/home/pola/ti/ccsv8/tools/compiler/ti-cgt-arm_18.1.1.LTS/include/sys/_types.h") .dwattr $C$DW$T$73, DW_AT_decl_line(0x2e) .dwattr $C$DW$T$73, DW_AT_decl_column(0x13) $C$DW$T$74 .dwtag DW_TAG_typedef .dwattr $C$DW$T$74, DW_AT_name("__clockid_t") .dwattr $C$DW$T$74, DW_AT_type(*$C$DW$T$72) .dwattr $C$DW$T$74, DW_AT_language(DW_LANG_C) .dwattr $C$DW$T$74, DW_AT_decl_file("/home/pola/ti/ccsv8/tools/compiler/ti-cgt-arm_18.1.1.LTS/include/sys/_types.h") .dwattr $C$DW$T$74, DW_AT_decl_line(0x30) .dwattr $C$DW$T$74, DW_AT_decl_column(0x13) $C$DW$T$75 .dwtag DW_TAG_typedef .dwattr $C$DW$T$75, DW_AT_name("__critical_t") .dwattr $C$DW$T$75, DW_AT_type(*$C$DW$T$72) .dwattr $C$DW$T$75, DW_AT_language(DW_LANG_C) .dwattr $C$DW$T$75, DW_AT_decl_file("/home/pola/ti/ccsv8/tools/compiler/ti-cgt-arm_18.1.1.LTS/include/machine/_types.h") .dwattr $C$DW$T$75, DW_AT_decl_line(0x4e) .dwattr $C$DW$T$75, DW_AT_decl_column(0x13) $C$DW$T$76 .dwtag DW_TAG_typedef .dwattr $C$DW$T$76, DW_AT_name("__int_fast16_t") .dwattr $C$DW$T$76, DW_AT_type(*$C$DW$T$72) .dwattr $C$DW$T$76, DW_AT_language(DW_LANG_C) .dwattr $C$DW$T$76, DW_AT_decl_file("/home/pola/ti/ccsv8/tools/compiler/ti-cgt-arm_18.1.1.LTS/include/machine/_types.h") .dwattr $C$DW$T$76, DW_AT_decl_line(0x55) .dwattr $C$DW$T$76, DW_AT_decl_column(0x13) $C$DW$T$77 .dwtag DW_TAG_typedef .dwattr $C$DW$T$77, DW_AT_name("int_fast16_t") .dwattr $C$DW$T$77, DW_AT_type(*$C$DW$T$76) .dwattr $C$DW$T$77, DW_AT_language(DW_LANG_C) .dwattr $C$DW$T$77, DW_AT_decl_file("/home/pola/ti/ccsv8/tools/compiler/ti-cgt-arm_18.1.1.LTS/include/sys/stdint.h") .dwattr $C$DW$T$77, DW_AT_decl_line(0x33) .dwattr $C$DW$T$77, DW_AT_decl_column(0x19) $C$DW$T$78 .dwtag DW_TAG_typedef .dwattr $C$DW$T$78, DW_AT_name("__int_fast32_t") .dwattr $C$DW$T$78, DW_AT_type(*$C$DW$T$72) .dwattr $C$DW$T$78, DW_AT_language(DW_LANG_C) .dwattr $C$DW$T$78, DW_AT_decl_file("/home/pola/ti/ccsv8/tools/compiler/ti-cgt-arm_18.1.1.LTS/include/machine/_types.h") .dwattr $C$DW$T$78, DW_AT_decl_line(0x56) .dwattr $C$DW$T$78, DW_AT_decl_column(0x13) $C$DW$T$79 .dwtag DW_TAG_typedef .dwattr $C$DW$T$79, DW_AT_name("int_fast32_t") .dwattr $C$DW$T$79, DW_AT_type(*$C$DW$T$78) .dwattr $C$DW$T$79, DW_AT_language(DW_LANG_C) .dwattr $C$DW$T$79, DW_AT_decl_file("/home/pola/ti/ccsv8/tools/compiler/ti-cgt-arm_18.1.1.LTS/include/sys/stdint.h") .dwattr $C$DW$T$79, DW_AT_decl_line(0x34) .dwattr $C$DW$T$79, DW_AT_decl_column(0x19) $C$DW$T$80 .dwtag DW_TAG_typedef .dwattr $C$DW$T$80, DW_AT_name("__int_fast8_t") .dwattr $C$DW$T$80, DW_AT_type(*$C$DW$T$72) .dwattr $C$DW$T$80, DW_AT_language(DW_LANG_C) .dwattr $C$DW$T$80, DW_AT_decl_file("/home/pola/ti/ccsv8/tools/compiler/ti-cgt-arm_18.1.1.LTS/include/machine/_types.h") .dwattr $C$DW$T$80, DW_AT_decl_line(0x54) .dwattr $C$DW$T$80, DW_AT_decl_column(0x13) $C$DW$T$81 .dwtag DW_TAG_typedef .dwattr $C$DW$T$81, DW_AT_name("int_fast8_t") .dwattr $C$DW$T$81, DW_AT_type(*$C$DW$T$80) .dwattr $C$DW$T$81, DW_AT_language(DW_LANG_C) .dwattr $C$DW$T$81, DW_AT_decl_file("/home/pola/ti/ccsv8/tools/compiler/ti-cgt-arm_18.1.1.LTS/include/sys/stdint.h") .dwattr $C$DW$T$81, DW_AT_decl_line(0x32) .dwattr $C$DW$T$81, DW_AT_decl_column(0x18) $C$DW$T$82 .dwtag DW_TAG_typedef .dwattr $C$DW$T$82, DW_AT_name("__int_least32_t") .dwattr $C$DW$T$82, DW_AT_type(*$C$DW$T$72) .dwattr $C$DW$T$82, DW_AT_language(DW_LANG_C) .dwattr $C$DW$T$82, DW_AT_decl_file("/home/pola/ti/ccsv8/tools/compiler/ti-cgt-arm_18.1.1.LTS/include/machine/_types.h") .dwattr $C$DW$T$82, DW_AT_decl_line(0x5a) .dwattr $C$DW$T$82, DW_AT_decl_column(0x13) $C$DW$T$83 .dwtag DW_TAG_typedef .dwattr $C$DW$T$83, DW_AT_name("int_least32_t") .dwattr $C$DW$T$83, DW_AT_type(*$C$DW$T$82) .dwattr $C$DW$T$83, DW_AT_language(DW_LANG_C) .dwattr $C$DW$T$83, DW_AT_decl_file("/home/pola/ti/ccsv8/tools/compiler/ti-cgt-arm_18.1.1.LTS/include/sys/stdint.h") .dwattr $C$DW$T$83, DW_AT_decl_line(0x2a) .dwattr $C$DW$T$83, DW_AT_decl_column(0x1a) $C$DW$T$84 .dwtag DW_TAG_typedef .dwattr $C$DW$T$84, DW_AT_name("__intfptr_t") .dwattr $C$DW$T$84, DW_AT_type(*$C$DW$T$72) .dwattr $C$DW$T$84, DW_AT_language(DW_LANG_C) .dwattr $C$DW$T$84, DW_AT_decl_file("/home/pola/ti/ccsv8/tools/compiler/ti-cgt-arm_18.1.1.LTS/include/machine/_types.h") .dwattr $C$DW$T$84, DW_AT_decl_line(0x51) .dwattr $C$DW$T$84, DW_AT_decl_column(0x13) $C$DW$T$85 .dwtag DW_TAG_typedef .dwattr $C$DW$T$85, DW_AT_name("__intptr_t") .dwattr $C$DW$T$85, DW_AT_type(*$C$DW$T$72) .dwattr $C$DW$T$85, DW_AT_language(DW_LANG_C) .dwattr $C$DW$T$85, DW_AT_decl_file("/home/pola/ti/ccsv8/tools/compiler/ti-cgt-arm_18.1.1.LTS/include/machine/_types.h") .dwattr $C$DW$T$85, DW_AT_decl_line(0x53) .dwattr $C$DW$T$85, DW_AT_decl_column(0x13) $C$DW$T$86 .dwtag DW_TAG_typedef .dwattr $C$DW$T$86, DW_AT_name("intptr_t") .dwattr $C$DW$T$86, DW_AT_type(*$C$DW$T$85) .dwattr $C$DW$T$86, DW_AT_language(DW_LANG_C) .dwattr $C$DW$T$86, DW_AT_decl_file("/home/pola/ti/ccsv8/tools/compiler/ti-cgt-arm_18.1.1.LTS/include/sys/_stdint.h") .dwattr $C$DW$T$86, DW_AT_decl_line(0x4c) .dwattr $C$DW$T$86, DW_AT_decl_column(0x15) $C$DW$T$87 .dwtag DW_TAG_typedef .dwattr $C$DW$T$87, DW_AT_name("__lwpid_t") .dwattr $C$DW$T$87, DW_AT_type(*$C$DW$T$72) .dwattr $C$DW$T$87, DW_AT_language(DW_LANG_C) .dwattr $C$DW$T$87, DW_AT_decl_file("/home/pola/ti/ccsv8/tools/compiler/ti-cgt-arm_18.1.1.LTS/include/sys/_types.h") .dwattr $C$DW$T$87, DW_AT_decl_line(0x38) .dwattr $C$DW$T$87, DW_AT_decl_column(0x13) $C$DW$T$88 .dwtag DW_TAG_typedef .dwattr $C$DW$T$88, DW_AT_name("__pid_t") .dwattr $C$DW$T$88, DW_AT_type(*$C$DW$T$72) .dwattr $C$DW$T$88, DW_AT_language(DW_LANG_C) .dwattr $C$DW$T$88, DW_AT_decl_file("/home/pola/ti/ccsv8/tools/compiler/ti-cgt-arm_18.1.1.LTS/include/sys/_types.h") .dwattr $C$DW$T$88, DW_AT_decl_line(0x3f) .dwattr $C$DW$T$88, DW_AT_decl_column(0x13) $C$DW$T$89 .dwtag DW_TAG_typedef .dwattr $C$DW$T$89, DW_AT_name("__ptrdiff_t") .dwattr $C$DW$T$89, DW_AT_type(*$C$DW$T$72) .dwattr $C$DW$T$89, DW_AT_language(DW_LANG_C) .dwattr $C$DW$T$89, DW_AT_decl_file("/home/pola/ti/ccsv8/tools/compiler/ti-cgt-arm_18.1.1.LTS/include/machine/_types.h") .dwattr $C$DW$T$89, DW_AT_decl_line(0x5c) .dwattr $C$DW$T$89, DW_AT_decl_column(0x13) $C$DW$T$90 .dwtag DW_TAG_typedef .dwattr $C$DW$T$90, DW_AT_name("__register_t") .dwattr $C$DW$T$90, DW_AT_type(*$C$DW$T$72) .dwattr $C$DW$T$90, DW_AT_language(DW_LANG_C) .dwattr $C$DW$T$90, DW_AT_decl_file("/home/pola/ti/ccsv8/tools/compiler/ti-cgt-arm_18.1.1.LTS/include/machine/_types.h") .dwattr $C$DW$T$90, DW_AT_decl_line(0x5d) .dwattr $C$DW$T$90, DW_AT_decl_column(0x13) $C$DW$T$91 .dwtag DW_TAG_typedef .dwattr $C$DW$T$91, DW_AT_name("__segsz_t") .dwattr $C$DW$T$91, DW_AT_type(*$C$DW$T$72) .dwattr $C$DW$T$91, DW_AT_language(DW_LANG_C) .dwattr $C$DW$T$91, DW_AT_decl_file("/home/pola/ti/ccsv8/tools/compiler/ti-cgt-arm_18.1.1.LTS/include/machine/_types.h") .dwattr $C$DW$T$91, DW_AT_decl_line(0x5e) .dwattr $C$DW$T$91, DW_AT_decl_column(0x13) $C$DW$T$92 .dwtag DW_TAG_typedef .dwattr $C$DW$T$92, DW_AT_name("__ssize_t") .dwattr $C$DW$T$92, DW_AT_type(*$C$DW$T$72) .dwattr $C$DW$T$92, DW_AT_language(DW_LANG_C) .dwattr $C$DW$T$92, DW_AT_decl_file("/home/pola/ti/ccsv8/tools/compiler/ti-cgt-arm_18.1.1.LTS/include/machine/_types.h") .dwattr $C$DW$T$92, DW_AT_decl_line(0x60) .dwattr $C$DW$T$92, DW_AT_decl_column(0x13) $C$DW$T$93 .dwtag DW_TAG_typedef .dwattr $C$DW$T$93, DW_AT_name("int32_t") .dwattr $C$DW$T$93, DW_AT_type(*$C$DW$T$72) .dwattr $C$DW$T$93, DW_AT_language(DW_LANG_C) .dwattr $C$DW$T$93, DW_AT_decl_file("/home/pola/ti/ccsv8/tools/compiler/ti-cgt-arm_18.1.1.LTS/include/sys/_stdint.h") .dwattr $C$DW$T$93, DW_AT_decl_line(0x2e) .dwattr $C$DW$T$93, DW_AT_decl_column(0x14) $C$DW$T$95 .dwtag DW_TAG_typedef .dwattr $C$DW$T$95, DW_AT_name("__nl_item") .dwattr $C$DW$T$95, DW_AT_type(*$C$DW$T$10) .dwattr $C$DW$T$95, DW_AT_language(DW_LANG_C) .dwattr $C$DW$T$95, DW_AT_decl_file("/home/pola/ti/ccsv8/tools/compiler/ti-cgt-arm_18.1.1.LTS/include/sys/_types.h") .dwattr $C$DW$T$95, DW_AT_decl_line(0x3b) .dwattr $C$DW$T$95, DW_AT_decl_column(0x0e) $C$DW$T$11 .dwtag DW_TAG_base_type .dwattr $C$DW$T$11, DW_AT_encoding(DW_ATE_unsigned) .dwattr $C$DW$T$11, DW_AT_name("unsigned int") .dwattr $C$DW$T$11, DW_AT_byte_size(0x04) $C$DW$T$26 .dwtag DW_TAG_typedef .dwattr $C$DW$T$26, DW_AT_name("__uint32_t") .dwattr $C$DW$T$26, DW_AT_type(*$C$DW$T$11) .dwattr $C$DW$T$26, DW_AT_language(DW_LANG_C) .dwattr $C$DW$T$26, DW_AT_decl_file("/home/pola/ti/ccsv8/tools/compiler/ti-cgt-arm_18.1.1.LTS/include/machine/_types.h") .dwattr $C$DW$T$26, DW_AT_decl_line(0x3e) .dwattr $C$DW$T$26, DW_AT_decl_column(0x17) $C$DW$T$96 .dwtag DW_TAG_typedef .dwattr $C$DW$T$96, DW_AT_name("__clock_t") .dwattr $C$DW$T$96, DW_AT_type(*$C$DW$T$26) .dwattr $C$DW$T$96, DW_AT_language(DW_LANG_C) .dwattr $C$DW$T$96, DW_AT_decl_file("/home/pola/ti/ccsv8/tools/compiler/ti-cgt-arm_18.1.1.LTS/include/machine/_types.h") .dwattr $C$DW$T$96, DW_AT_decl_line(0x4d) .dwattr $C$DW$T$96, DW_AT_decl_column(0x14) $C$DW$T$97 .dwtag DW_TAG_typedef .dwattr $C$DW$T$97, DW_AT_name("__fflags_t") .dwattr $C$DW$T$97, DW_AT_type(*$C$DW$T$26) .dwattr $C$DW$T$97, DW_AT_language(DW_LANG_C) .dwattr $C$DW$T$97, DW_AT_decl_file("/home/pola/ti/ccsv8/tools/compiler/ti-cgt-arm_18.1.1.LTS/include/sys/_types.h") .dwattr $C$DW$T$97, DW_AT_decl_line(0x31) .dwattr $C$DW$T$97, DW_AT_decl_column(0x14) $C$DW$T$98 .dwtag DW_TAG_typedef .dwattr $C$DW$T$98, DW_AT_name("__fixpt_t") .dwattr $C$DW$T$98, DW_AT_type(*$C$DW$T$26) .dwattr $C$DW$T$98, DW_AT_language(DW_LANG_C) .dwattr $C$DW$T$98, DW_AT_decl_file("/home/pola/ti/ccsv8/tools/compiler/ti-cgt-arm_18.1.1.LTS/include/sys/_types.h") .dwattr $C$DW$T$98, DW_AT_decl_line(0x76) .dwattr $C$DW$T$98, DW_AT_decl_column(0x14) $C$DW$T$99 .dwtag DW_TAG_typedef .dwattr $C$DW$T$99, DW_AT_name("__gid_t") .dwattr $C$DW$T$99, DW_AT_type(*$C$DW$T$26) .dwattr $C$DW$T$99, DW_AT_language(DW_LANG_C) .dwattr $C$DW$T$99, DW_AT_decl_file("/home/pola/ti/ccsv8/tools/compiler/ti-cgt-arm_18.1.1.LTS/include/sys/_types.h") .dwattr $C$DW$T$99, DW_AT_decl_line(0x34) .dwattr $C$DW$T$99, DW_AT_decl_column(0x14) $C$DW$T$100 .dwtag DW_TAG_typedef .dwattr $C$DW$T$100, DW_AT_name("__size_t") .dwattr $C$DW$T$100, DW_AT_type(*$C$DW$T$26) .dwattr $C$DW$T$100, DW_AT_language(DW_LANG_C) .dwattr $C$DW$T$100, DW_AT_decl_file("/home/pola/ti/ccsv8/tools/compiler/ti-cgt-arm_18.1.1.LTS/include/machine/_types.h") .dwattr $C$DW$T$100, DW_AT_decl_line(0x5f) .dwattr $C$DW$T$100, DW_AT_decl_column(0x14) $C$DW$T$101 .dwtag DW_TAG_typedef .dwattr $C$DW$T$101, DW_AT_name("__socklen_t") .dwattr $C$DW$T$101, DW_AT_type(*$C$DW$T$26) .dwattr $C$DW$T$101, DW_AT_language(DW_LANG_C) .dwattr $C$DW$T$101, DW_AT_decl_file("/home/pola/ti/ccsv8/tools/compiler/ti-cgt-arm_18.1.1.LTS/include/sys/_types.h") .dwattr $C$DW$T$101, DW_AT_decl_line(0x44) .dwattr $C$DW$T$101, DW_AT_decl_column(0x14) $C$DW$T$102 .dwtag DW_TAG_typedef .dwattr $C$DW$T$102, DW_AT_name("__time_t") .dwattr $C$DW$T$102, DW_AT_type(*$C$DW$T$26) .dwattr $C$DW$T$102, DW_AT_language(DW_LANG_C) .dwattr $C$DW$T$102, DW_AT_decl_file("/home/pola/ti/ccsv8/tools/compiler/ti-cgt-arm_18.1.1.LTS/include/machine/_types.h") .dwattr $C$DW$T$102, DW_AT_decl_line(0x64) .dwattr $C$DW$T$102, DW_AT_decl_column(0x19) $C$DW$T$103 .dwtag DW_TAG_typedef .dwattr $C$DW$T$103, DW_AT_name("__u_register_t") .dwattr $C$DW$T$103, DW_AT_type(*$C$DW$T$26) .dwattr $C$DW$T$103, DW_AT_language(DW_LANG_C) .dwattr $C$DW$T$103, DW_AT_decl_file("/home/pola/ti/ccsv8/tools/compiler/ti-cgt-arm_18.1.1.LTS/include/machine/_types.h") .dwattr $C$DW$T$103, DW_AT_decl_line(0x71) .dwattr $C$DW$T$103, DW_AT_decl_column(0x14) $C$DW$T$104 .dwtag DW_TAG_typedef .dwattr $C$DW$T$104, DW_AT_name("__uid_t") .dwattr $C$DW$T$104, DW_AT_type(*$C$DW$T$26) .dwattr $C$DW$T$104, DW_AT_language(DW_LANG_C) .dwattr $C$DW$T$104, DW_AT_decl_file("/home/pola/ti/ccsv8/tools/compiler/ti-cgt-arm_18.1.1.LTS/include/sys/_types.h") .dwattr $C$DW$T$104, DW_AT_decl_line(0x48) .dwattr $C$DW$T$104, DW_AT_decl_column(0x14) $C$DW$T$105 .dwtag DW_TAG_typedef .dwattr $C$DW$T$105, DW_AT_name("__uint_fast16_t") .dwattr $C$DW$T$105, DW_AT_type(*$C$DW$T$26) .dwattr $C$DW$T$105, DW_AT_language(DW_LANG_C) .dwattr $C$DW$T$105, DW_AT_decl_file("/home/pola/ti/ccsv8/tools/compiler/ti-cgt-arm_18.1.1.LTS/include/machine/_types.h") .dwattr $C$DW$T$105, DW_AT_decl_line(0x6a) .dwattr $C$DW$T$105, DW_AT_decl_column(0x14) $C$DW$T$106 .dwtag DW_TAG_typedef .dwattr $C$DW$T$106, DW_AT_name("uint_fast16_t") .dwattr $C$DW$T$106, DW_AT_type(*$C$DW$T$105) .dwattr $C$DW$T$106, DW_AT_language(DW_LANG_C) .dwattr $C$DW$T$106, DW_AT_decl_file("/home/pola/ti/ccsv8/tools/compiler/ti-cgt-arm_18.1.1.LTS/include/sys/stdint.h") .dwattr $C$DW$T$106, DW_AT_decl_line(0x38) .dwattr $C$DW$T$106, DW_AT_decl_column(0x1a) $C$DW$T$107 .dwtag DW_TAG_typedef .dwattr $C$DW$T$107, DW_AT_name("__uint_fast32_t") .dwattr $C$DW$T$107, DW_AT_type(*$C$DW$T$26) .dwattr $C$DW$T$107, DW_AT_language(DW_LANG_C) .dwattr $C$DW$T$107, DW_AT_decl_file("/home/pola/ti/ccsv8/tools/compiler/ti-cgt-arm_18.1.1.LTS/include/machine/_types.h") .dwattr $C$DW$T$107, DW_AT_decl_line(0x6b) .dwattr $C$DW$T$107, DW_AT_decl_column(0x14) $C$DW$T$108 .dwtag DW_TAG_typedef .dwattr $C$DW$T$108, DW_AT_name("uint_fast32_t") .dwattr $C$DW$T$108, DW_AT_type(*$C$DW$T$107) .dwattr $C$DW$T$108, DW_AT_language(DW_LANG_C) .dwattr $C$DW$T$108, DW_AT_decl_file("/home/pola/ti/ccsv8/tools/compiler/ti-cgt-arm_18.1.1.LTS/include/sys/stdint.h") .dwattr $C$DW$T$108, DW_AT_decl_line(0x39) .dwattr $C$DW$T$108, DW_AT_decl_column(0x1a) $C$DW$T$109 .dwtag DW_TAG_typedef .dwattr $C$DW$T$109, DW_AT_name("__uint_fast8_t") .dwattr $C$DW$T$109, DW_AT_type(*$C$DW$T$26) .dwattr $C$DW$T$109, DW_AT_language(DW_LANG_C) .dwattr $C$DW$T$109, DW_AT_decl_file("/home/pola/ti/ccsv8/tools/compiler/ti-cgt-arm_18.1.1.LTS/include/machine/_types.h") .dwattr $C$DW$T$109, DW_AT_decl_line(0x69) .dwattr $C$DW$T$109, DW_AT_decl_column(0x14) $C$DW$T$110 .dwtag DW_TAG_typedef .dwattr $C$DW$T$110, DW_AT_name("uint_fast8_t") .dwattr $C$DW$T$110, DW_AT_type(*$C$DW$T$109) .dwattr $C$DW$T$110, DW_AT_language(DW_LANG_C) .dwattr $C$DW$T$110, DW_AT_decl_file("/home/pola/ti/ccsv8/tools/compiler/ti-cgt-arm_18.1.1.LTS/include/sys/stdint.h") .dwattr $C$DW$T$110, DW_AT_decl_line(0x37) .dwattr $C$DW$T$110, DW_AT_decl_column(0x19) $C$DW$T$111 .dwtag DW_TAG_typedef .dwattr $C$DW$T$111, DW_AT_name("__uint_least32_t") .dwattr $C$DW$T$111, DW_AT_type(*$C$DW$T$26) .dwattr $C$DW$T$111, DW_AT_language(DW_LANG_C) .dwattr $C$DW$T$111, DW_AT_decl_file("/home/pola/ti/ccsv8/tools/compiler/ti-cgt-arm_18.1.1.LTS/include/machine/_types.h") .dwattr $C$DW$T$111, DW_AT_decl_line(0x6f) .dwattr $C$DW$T$111, DW_AT_decl_column(0x14) $C$DW$T$112 .dwtag DW_TAG_typedef .dwattr $C$DW$T$112, DW_AT_name("__char32_t") .dwattr $C$DW$T$112, DW_AT_type(*$C$DW$T$111) .dwattr $C$DW$T$112, DW_AT_language(DW_LANG_C) .dwattr $C$DW$T$112, DW_AT_decl_file("/home/pola/ti/ccsv8/tools/compiler/ti-cgt-arm_18.1.1.LTS/include/sys/_types.h") .dwattr $C$DW$T$112, DW_AT_decl_line(0x67) .dwattr $C$DW$T$112, DW_AT_decl_column(0x1a) $C$DW$T$113 .dwtag DW_TAG_typedef .dwattr $C$DW$T$113, DW_AT_name("uint_least32_t") .dwattr $C$DW$T$113, DW_AT_type(*$C$DW$T$111) .dwattr $C$DW$T$113, DW_AT_language(DW_LANG_C) .dwattr $C$DW$T$113, DW_AT_decl_file("/home/pola/ti/ccsv8/tools/compiler/ti-cgt-arm_18.1.1.LTS/include/sys/stdint.h") .dwattr $C$DW$T$113, DW_AT_decl_line(0x2f) .dwattr $C$DW$T$113, DW_AT_decl_column(0x1a) $C$DW$T$114 .dwtag DW_TAG_typedef .dwattr $C$DW$T$114, DW_AT_name("__uintfptr_t") .dwattr $C$DW$T$114, DW_AT_type(*$C$DW$T$26) .dwattr $C$DW$T$114, DW_AT_language(DW_LANG_C) .dwattr $C$DW$T$114, DW_AT_decl_file("/home/pola/ti/ccsv8/tools/compiler/ti-cgt-arm_18.1.1.LTS/include/machine/_types.h") .dwattr $C$DW$T$114, DW_AT_decl_line(0x66) .dwattr $C$DW$T$114, DW_AT_decl_column(0x14) $C$DW$T$115 .dwtag DW_TAG_typedef .dwattr $C$DW$T$115, DW_AT_name("__uintptr_t") .dwattr $C$DW$T$115, DW_AT_type(*$C$DW$T$26) .dwattr $C$DW$T$115, DW_AT_language(DW_LANG_C) .dwattr $C$DW$T$115, DW_AT_decl_file("/home/pola/ti/ccsv8/tools/compiler/ti-cgt-arm_18.1.1.LTS/include/machine/_types.h") .dwattr $C$DW$T$115, DW_AT_decl_line(0x68) .dwattr $C$DW$T$115, DW_AT_decl_column(0x14) $C$DW$T$116 .dwtag DW_TAG_typedef .dwattr $C$DW$T$116, DW_AT_name("uintptr_t") .dwattr $C$DW$T$116, DW_AT_type(*$C$DW$T$115) .dwattr $C$DW$T$116, DW_AT_language(DW_LANG_C) .dwattr $C$DW$T$116, DW_AT_decl_file("/home/pola/ti/ccsv8/tools/compiler/ti-cgt-arm_18.1.1.LTS/include/sys/_stdint.h") .dwattr $C$DW$T$116, DW_AT_decl_line(0x50) .dwattr $C$DW$T$116, DW_AT_decl_column(0x16) $C$DW$T$117 .dwtag DW_TAG_typedef .dwattr $C$DW$T$117, DW_AT_name("__vm_offset_t") .dwattr $C$DW$T$117, DW_AT_type(*$C$DW$T$26) .dwattr $C$DW$T$117, DW_AT_language(DW_LANG_C) .dwattr $C$DW$T$117, DW_AT_decl_file("/home/pola/ti/ccsv8/tools/compiler/ti-cgt-arm_18.1.1.LTS/include/machine/_types.h") .dwattr $C$DW$T$117, DW_AT_decl_line(0x72) .dwattr $C$DW$T$117, DW_AT_decl_column(0x14) $C$DW$T$118 .dwtag DW_TAG_typedef .dwattr $C$DW$T$118, DW_AT_name("__vm_paddr_t") .dwattr $C$DW$T$118, DW_AT_type(*$C$DW$T$26) .dwattr $C$DW$T$118, DW_AT_language(DW_LANG_C) .dwattr $C$DW$T$118, DW_AT_decl_file("/home/pola/ti/ccsv8/tools/compiler/ti-cgt-arm_18.1.1.LTS/include/machine/_types.h") .dwattr $C$DW$T$118, DW_AT_decl_line(0x73) .dwattr $C$DW$T$118, DW_AT_decl_column(0x14) $C$DW$T$119 .dwtag DW_TAG_typedef .dwattr $C$DW$T$119, DW_AT_name("__vm_size_t") .dwattr $C$DW$T$119, DW_AT_type(*$C$DW$T$26) .dwattr $C$DW$T$119, DW_AT_language(DW_LANG_C) .dwattr $C$DW$T$119, DW_AT_decl_file("/home/pola/ti/ccsv8/tools/compiler/ti-cgt-arm_18.1.1.LTS/include/machine/_types.h") .dwattr $C$DW$T$119, DW_AT_decl_line(0x74) .dwattr $C$DW$T$119, DW_AT_decl_column(0x14) $C$DW$T$27 .dwtag DW_TAG_typedef .dwattr $C$DW$T$27, DW_AT_name("uint32_t") .dwattr $C$DW$T$27, DW_AT_type(*$C$DW$T$26) .dwattr $C$DW$T$27, DW_AT_language(DW_LANG_C) .dwattr $C$DW$T$27, DW_AT_decl_file("/home/pola/ti/ccsv8/tools/compiler/ti-cgt-arm_18.1.1.LTS/include/sys/_stdint.h") .dwattr $C$DW$T$27, DW_AT_decl_line(0x42) .dwattr $C$DW$T$27, DW_AT_decl_column(0x15) $C$DW$T$34 .dwtag DW_TAG_pointer_type .dwattr $C$DW$T$34, DW_AT_type(*$C$DW$T$27) .dwattr $C$DW$T$34, DW_AT_address_class(0x20) $C$DW$T$123 .dwtag DW_TAG_const_type .dwattr $C$DW$T$123, DW_AT_type(*$C$DW$T$27) $C$DW$T$124 .dwtag DW_TAG_array_type .dwattr $C$DW$T$124, DW_AT_type(*$C$DW$T$123) .dwattr $C$DW$T$124, DW_AT_language(DW_LANG_C) .dwattr $C$DW$T$124, DW_AT_byte_size(0x08) $C$DW$287 .dwtag DW_TAG_subrange_type .dwattr $C$DW$287, DW_AT_upper_bound(0x01) .dwendtag $C$DW$T$124 $C$DW$T$125 .dwtag DW_TAG_array_type .dwattr $C$DW$T$125, DW_AT_type(*$C$DW$T$123) .dwattr $C$DW$T$125, DW_AT_language(DW_LANG_C) .dwattr $C$DW$T$125, DW_AT_byte_size(0x40) $C$DW$288 .dwtag DW_TAG_subrange_type .dwattr $C$DW$288, DW_AT_upper_bound(0x07) $C$DW$289 .dwtag DW_TAG_subrange_type .dwattr $C$DW$289, DW_AT_upper_bound(0x01) .dwendtag $C$DW$T$125 $C$DW$T$126 .dwtag DW_TAG_pointer_type .dwattr $C$DW$T$126, DW_AT_type(*$C$DW$T$124) .dwattr $C$DW$T$126, DW_AT_address_class(0x20) $C$DW$T$130 .dwtag DW_TAG_typedef .dwattr $C$DW$T$130, DW_AT_name("__useconds_t") .dwattr $C$DW$T$130, DW_AT_type(*$C$DW$T$11) .dwattr $C$DW$T$130, DW_AT_language(DW_LANG_C) .dwattr $C$DW$T$130, DW_AT_decl_file("/home/pola/ti/ccsv8/tools/compiler/ti-cgt-arm_18.1.1.LTS/include/sys/_types.h") .dwattr $C$DW$T$130, DW_AT_decl_line(0x49) .dwattr $C$DW$T$130, DW_AT_decl_column(0x16) $C$DW$T$12 .dwtag DW_TAG_base_type .dwattr $C$DW$T$12, DW_AT_encoding(DW_ATE_signed) .dwattr $C$DW$T$12, DW_AT_name("long") .dwattr $C$DW$T$12, DW_AT_byte_size(0x04) $C$DW$T$131 .dwtag DW_TAG_typedef .dwattr $C$DW$T$131, DW_AT_name("__key_t") .dwattr $C$DW$T$131, DW_AT_type(*$C$DW$T$12) .dwattr $C$DW$T$131, DW_AT_language(DW_LANG_C) .dwattr $C$DW$T$131, DW_AT_decl_file("/home/pola/ti/ccsv8/tools/compiler/ti-cgt-arm_18.1.1.LTS/include/sys/_types.h") .dwattr $C$DW$T$131, DW_AT_decl_line(0x37) .dwattr $C$DW$T$131, DW_AT_decl_column(0x0f) $C$DW$T$132 .dwtag DW_TAG_typedef .dwattr $C$DW$T$132, DW_AT_name("__suseconds_t") .dwattr $C$DW$T$132, DW_AT_type(*$C$DW$T$12) .dwattr $C$DW$T$132, DW_AT_language(DW_LANG_C) .dwattr $C$DW$T$132, DW_AT_decl_file("/home/pola/ti/ccsv8/tools/compiler/ti-cgt-arm_18.1.1.LTS/include/sys/_types.h") .dwattr $C$DW$T$132, DW_AT_decl_line(0x45) .dwattr $C$DW$T$132, DW_AT_decl_column(0x0f) $C$DW$T$13 .dwtag DW_TAG_base_type .dwattr $C$DW$T$13, DW_AT_encoding(DW_ATE_unsigned) .dwattr $C$DW$T$13, DW_AT_name("unsigned long") .dwattr $C$DW$T$13, DW_AT_byte_size(0x04) $C$DW$T$14 .dwtag DW_TAG_base_type .dwattr $C$DW$T$14, DW_AT_encoding(DW_ATE_signed) .dwattr $C$DW$T$14, DW_AT_name("long long") .dwattr $C$DW$T$14, DW_AT_byte_size(0x08) $C$DW$T$133 .dwtag DW_TAG_typedef .dwattr $C$DW$T$133, DW_AT_name("__int64_t") .dwattr $C$DW$T$133, DW_AT_type(*$C$DW$T$14) .dwattr $C$DW$T$133, DW_AT_language(DW_LANG_C) .dwattr $C$DW$T$133, DW_AT_decl_file("/home/pola/ti/ccsv8/tools/compiler/ti-cgt-arm_18.1.1.LTS/include/machine/_types.h") .dwattr $C$DW$T$133, DW_AT_decl_line(0x43) .dwattr $C$DW$T$133, DW_AT_decl_column(0x14) $C$DW$T$134 .dwtag DW_TAG_typedef .dwattr $C$DW$T$134, DW_AT_name("__blkcnt_t") .dwattr $C$DW$T$134, DW_AT_type(*$C$DW$T$133) .dwattr $C$DW$T$134, DW_AT_language(DW_LANG_C) .dwattr $C$DW$T$134, DW_AT_decl_file("/home/pola/ti/ccsv8/tools/compiler/ti-cgt-arm_18.1.1.LTS/include/sys/_types.h") .dwattr $C$DW$T$134, DW_AT_decl_line(0x2f) .dwattr $C$DW$T$134, DW_AT_decl_column(0x13) $C$DW$T$135 .dwtag DW_TAG_typedef .dwattr $C$DW$T$135, DW_AT_name("__id_t") .dwattr $C$DW$T$135, DW_AT_type(*$C$DW$T$133) .dwattr $C$DW$T$135, DW_AT_language(DW_LANG_C) .dwattr $C$DW$T$135, DW_AT_decl_file("/home/pola/ti/ccsv8/tools/compiler/ti-cgt-arm_18.1.1.LTS/include/sys/_types.h") .dwattr $C$DW$T$135, DW_AT_decl_line(0x35) .dwattr $C$DW$T$135, DW_AT_decl_column(0x13) $C$DW$T$136 .dwtag DW_TAG_typedef .dwattr $C$DW$T$136, DW_AT_name("__int_fast64_t") .dwattr $C$DW$T$136, DW_AT_type(*$C$DW$T$133) .dwattr $C$DW$T$136, DW_AT_language(DW_LANG_C) .dwattr $C$DW$T$136, DW_AT_decl_file("/home/pola/ti/ccsv8/tools/compiler/ti-cgt-arm_18.1.1.LTS/include/machine/_types.h") .dwattr $C$DW$T$136, DW_AT_decl_line(0x57) .dwattr $C$DW$T$136, DW_AT_decl_column(0x13) $C$DW$T$137 .dwtag DW_TAG_typedef .dwattr $C$DW$T$137, DW_AT_name("int_fast64_t") .dwattr $C$DW$T$137, DW_AT_type(*$C$DW$T$136) .dwattr $C$DW$T$137, DW_AT_language(DW_LANG_C) .dwattr $C$DW$T$137, DW_AT_decl_file("/home/pola/ti/ccsv8/tools/compiler/ti-cgt-arm_18.1.1.LTS/include/sys/stdint.h") .dwattr $C$DW$T$137, DW_AT_decl_line(0x35) .dwattr $C$DW$T$137, DW_AT_decl_column(0x19) $C$DW$T$138 .dwtag DW_TAG_typedef .dwattr $C$DW$T$138, DW_AT_name("__int_least64_t") .dwattr $C$DW$T$138, DW_AT_type(*$C$DW$T$133) .dwattr $C$DW$T$138, DW_AT_language(DW_LANG_C) .dwattr $C$DW$T$138, DW_AT_decl_file("/home/pola/ti/ccsv8/tools/compiler/ti-cgt-arm_18.1.1.LTS/include/machine/_types.h") .dwattr $C$DW$T$138, DW_AT_decl_line(0x5b) .dwattr $C$DW$T$138, DW_AT_decl_column(0x13) $C$DW$T$139 .dwtag DW_TAG_typedef .dwattr $C$DW$T$139, DW_AT_name("int_least64_t") .dwattr $C$DW$T$139, DW_AT_type(*$C$DW$T$138) .dwattr $C$DW$T$139, DW_AT_language(DW_LANG_C) .dwattr $C$DW$T$139, DW_AT_decl_file("/home/pola/ti/ccsv8/tools/compiler/ti-cgt-arm_18.1.1.LTS/include/sys/stdint.h") .dwattr $C$DW$T$139, DW_AT_decl_line(0x2b) .dwattr $C$DW$T$139, DW_AT_decl_column(0x1a) $C$DW$T$140 .dwtag DW_TAG_typedef .dwattr $C$DW$T$140, DW_AT_name("__intmax_t") .dwattr $C$DW$T$140, DW_AT_type(*$C$DW$T$133) .dwattr $C$DW$T$140, DW_AT_language(DW_LANG_C) .dwattr $C$DW$T$140, DW_AT_decl_file("/home/pola/ti/ccsv8/tools/compiler/ti-cgt-arm_18.1.1.LTS/include/machine/_types.h") .dwattr $C$DW$T$140, DW_AT_decl_line(0x52) .dwattr $C$DW$T$140, DW_AT_decl_column(0x13) $C$DW$T$141 .dwtag DW_TAG_typedef .dwattr $C$DW$T$141, DW_AT_name("intmax_t") .dwattr $C$DW$T$141, DW_AT_type(*$C$DW$T$140) .dwattr $C$DW$T$141, DW_AT_language(DW_LANG_C) .dwattr $C$DW$T$141, DW_AT_decl_file("/home/pola/ti/ccsv8/tools/compiler/ti-cgt-arm_18.1.1.LTS/include/sys/_stdint.h") .dwattr $C$DW$T$141, DW_AT_decl_line(0x54) .dwattr $C$DW$T$141, DW_AT_decl_column(0x15) $C$DW$T$142 .dwtag DW_TAG_typedef .dwattr $C$DW$T$142, DW_AT_name("__off64_t") .dwattr $C$DW$T$142, DW_AT_type(*$C$DW$T$133) .dwattr $C$DW$T$142, DW_AT_language(DW_LANG_C) .dwattr $C$DW$T$142, DW_AT_decl_file("/home/pola/ti/ccsv8/tools/compiler/ti-cgt-arm_18.1.1.LTS/include/sys/_types.h") .dwattr $C$DW$T$142, DW_AT_decl_line(0x3e) .dwattr $C$DW$T$142, DW_AT_decl_column(0x13) $C$DW$T$143 .dwtag DW_TAG_typedef .dwattr $C$DW$T$143, DW_AT_name("__off_t") .dwattr $C$DW$T$143, DW_AT_type(*$C$DW$T$133) .dwattr $C$DW$T$143, DW_AT_language(DW_LANG_C) .dwattr $C$DW$T$143, DW_AT_decl_file("/home/pola/ti/ccsv8/tools/compiler/ti-cgt-arm_18.1.1.LTS/include/sys/_types.h") .dwattr $C$DW$T$143, DW_AT_decl_line(0x3d) .dwattr $C$DW$T$143, DW_AT_decl_column(0x13) $C$DW$T$144 .dwtag DW_TAG_typedef .dwattr $C$DW$T$144, DW_AT_name("__rlim_t") .dwattr $C$DW$T$144, DW_AT_type(*$C$DW$T$133) .dwattr $C$DW$T$144, DW_AT_language(DW_LANG_C) .dwattr $C$DW$T$144, DW_AT_decl_file("/home/pola/ti/ccsv8/tools/compiler/ti-cgt-arm_18.1.1.LTS/include/sys/_types.h") .dwattr $C$DW$T$144, DW_AT_decl_line(0x40) .dwattr $C$DW$T$144, DW_AT_decl_column(0x13) $C$DW$T$145 .dwtag DW_TAG_typedef .dwattr $C$DW$T$145, DW_AT_name("int64_t") .dwattr $C$DW$T$145, DW_AT_type(*$C$DW$T$133) .dwattr $C$DW$T$145, DW_AT_language(DW_LANG_C) .dwattr $C$DW$T$145, DW_AT_decl_file("/home/pola/ti/ccsv8/tools/compiler/ti-cgt-arm_18.1.1.LTS/include/sys/_stdint.h") .dwattr $C$DW$T$145, DW_AT_decl_line(0x33) .dwattr $C$DW$T$145, DW_AT_decl_column(0x14) $C$DW$T$15 .dwtag DW_TAG_base_type .dwattr $C$DW$T$15, DW_AT_encoding(DW_ATE_unsigned) .dwattr $C$DW$T$15, DW_AT_name("unsigned long long") .dwattr $C$DW$T$15, DW_AT_byte_size(0x08) $C$DW$T$146 .dwtag DW_TAG_typedef .dwattr $C$DW$T$146, DW_AT_name("__uint64_t") .dwattr $C$DW$T$146, DW_AT_type(*$C$DW$T$15) .dwattr $C$DW$T$146, DW_AT_language(DW_LANG_C) .dwattr $C$DW$T$146, DW_AT_decl_file("/home/pola/ti/ccsv8/tools/compiler/ti-cgt-arm_18.1.1.LTS/include/machine/_types.h") .dwattr $C$DW$T$146, DW_AT_decl_line(0x48) .dwattr $C$DW$T$146, DW_AT_decl_column(0x1c) $C$DW$T$147 .dwtag DW_TAG_typedef .dwattr $C$DW$T$147, DW_AT_name("__dev_t") .dwattr $C$DW$T$147, DW_AT_type(*$C$DW$T$146) .dwattr $C$DW$T$147, DW_AT_language(DW_LANG_C) .dwattr $C$DW$T$147, DW_AT_decl_file("/home/pola/ti/ccsv8/tools/compiler/ti-cgt-arm_18.1.1.LTS/include/sys/_types.h") .dwattr $C$DW$T$147, DW_AT_decl_line(0x74) .dwattr $C$DW$T$147, DW_AT_decl_column(0x14) $C$DW$T$148 .dwtag DW_TAG_typedef .dwattr $C$DW$T$148, DW_AT_name("__fsblkcnt_t") .dwattr $C$DW$T$148, DW_AT_type(*$C$DW$T$146) .dwattr $C$DW$T$148, DW_AT_language(DW_LANG_C) .dwattr $C$DW$T$148, DW_AT_decl_file("/home/pola/ti/ccsv8/tools/compiler/ti-cgt-arm_18.1.1.LTS/include/sys/_types.h") .dwattr $C$DW$T$148, DW_AT_decl_line(0x32) .dwattr $C$DW$T$148, DW_AT_decl_column(0x14) $C$DW$T$149 .dwtag DW_TAG_typedef .dwattr $C$DW$T$149, DW_AT_name("__fsfilcnt_t") .dwattr $C$DW$T$149, DW_AT_type(*$C$DW$T$146) .dwattr $C$DW$T$149, DW_AT_language(DW_LANG_C) .dwattr $C$DW$T$149, DW_AT_decl_file("/home/pola/ti/ccsv8/tools/compiler/ti-cgt-arm_18.1.1.LTS/include/sys/_types.h") .dwattr $C$DW$T$149, DW_AT_decl_line(0x33) .dwattr $C$DW$T$149, DW_AT_decl_column(0x14) $C$DW$T$150 .dwtag DW_TAG_typedef .dwattr $C$DW$T$150, DW_AT_name("__ino_t") .dwattr $C$DW$T$150, DW_AT_type(*$C$DW$T$146) .dwattr $C$DW$T$150, DW_AT_language(DW_LANG_C) .dwattr $C$DW$T$150, DW_AT_decl_file("/home/pola/ti/ccsv8/tools/compiler/ti-cgt-arm_18.1.1.LTS/include/sys/_types.h") .dwattr $C$DW$T$150, DW_AT_decl_line(0x36) .dwattr $C$DW$T$150, DW_AT_decl_column(0x14) $C$DW$T$151 .dwtag DW_TAG_typedef .dwattr $C$DW$T$151, DW_AT_name("__nlink_t") .dwattr $C$DW$T$151, DW_AT_type(*$C$DW$T$146) .dwattr $C$DW$T$151, DW_AT_language(DW_LANG_C) .dwattr $C$DW$T$151, DW_AT_decl_file("/home/pola/ti/ccsv8/tools/compiler/ti-cgt-arm_18.1.1.LTS/include/sys/_types.h") .dwattr $C$DW$T$151, DW_AT_decl_line(0x3c) .dwattr $C$DW$T$151, DW_AT_decl_column(0x14) $C$DW$T$152 .dwtag DW_TAG_typedef .dwattr $C$DW$T$152, DW_AT_name("__uint_fast64_t") .dwattr $C$DW$T$152, DW_AT_type(*$C$DW$T$146) .dwattr $C$DW$T$152, DW_AT_language(DW_LANG_C) .dwattr $C$DW$T$152, DW_AT_decl_file("/home/pola/ti/ccsv8/tools/compiler/ti-cgt-arm_18.1.1.LTS/include/machine/_types.h") .dwattr $C$DW$T$152, DW_AT_decl_line(0x6c) .dwattr $C$DW$T$152, DW_AT_decl_column(0x14) $C$DW$T$153 .dwtag DW_TAG_typedef .dwattr $C$DW$T$153, DW_AT_name("uint_fast64_t") .dwattr $C$DW$T$153, DW_AT_type(*$C$DW$T$152) .dwattr $C$DW$T$153, DW_AT_language(DW_LANG_C) .dwattr $C$DW$T$153, DW_AT_decl_file("/home/pola/ti/ccsv8/tools/compiler/ti-cgt-arm_18.1.1.LTS/include/sys/stdint.h") .dwattr $C$DW$T$153, DW_AT_decl_line(0x3a) .dwattr $C$DW$T$153, DW_AT_decl_column(0x1a) $C$DW$T$154 .dwtag DW_TAG_typedef .dwattr $C$DW$T$154, DW_AT_name("__uint_least64_t") .dwattr $C$DW$T$154, DW_AT_type(*$C$DW$T$146) .dwattr $C$DW$T$154, DW_AT_language(DW_LANG_C) .dwattr $C$DW$T$154, DW_AT_decl_file("/home/pola/ti/ccsv8/tools/compiler/ti-cgt-arm_18.1.1.LTS/include/machine/_types.h") .dwattr $C$DW$T$154, DW_AT_decl_line(0x70) .dwattr $C$DW$T$154, DW_AT_decl_column(0x14) $C$DW$T$155 .dwtag DW_TAG_typedef .dwattr $C$DW$T$155, DW_AT_name("uint_least64_t") .dwattr $C$DW$T$155, DW_AT_type(*$C$DW$T$154) .dwattr $C$DW$T$155, DW_AT_language(DW_LANG_C) .dwattr $C$DW$T$155, DW_AT_decl_file("/home/pola/ti/ccsv8/tools/compiler/ti-cgt-arm_18.1.1.LTS/include/sys/stdint.h") .dwattr $C$DW$T$155, DW_AT_decl_line(0x30) .dwattr $C$DW$T$155, DW_AT_decl_column(0x1a) $C$DW$T$156 .dwtag DW_TAG_typedef .dwattr $C$DW$T$156, DW_AT_name("__uintmax_t") .dwattr $C$DW$T$156, DW_AT_type(*$C$DW$T$146) .dwattr $C$DW$T$156, DW_AT_language(DW_LANG_C) .dwattr $C$DW$T$156, DW_AT_decl_file("/home/pola/ti/ccsv8/tools/compiler/ti-cgt-arm_18.1.1.LTS/include/machine/_types.h") .dwattr $C$DW$T$156, DW_AT_decl_line(0x67) .dwattr $C$DW$T$156, DW_AT_decl_column(0x14) $C$DW$T$157 .dwtag DW_TAG_typedef .dwattr $C$DW$T$157, DW_AT_name("__rman_res_t") .dwattr $C$DW$T$157, DW_AT_type(*$C$DW$T$156) .dwattr $C$DW$T$157, DW_AT_language(DW_LANG_C) .dwattr $C$DW$T$157, DW_AT_decl_file("/home/pola/ti/ccsv8/tools/compiler/ti-cgt-arm_18.1.1.LTS/include/sys/_types.h") .dwattr $C$DW$T$157, DW_AT_decl_line(0x8f) .dwattr $C$DW$T$157, DW_AT_decl_column(0x19) $C$DW$T$158 .dwtag DW_TAG_typedef .dwattr $C$DW$T$158, DW_AT_name("uintmax_t") .dwattr $C$DW$T$158, DW_AT_type(*$C$DW$T$156) .dwattr $C$DW$T$158, DW_AT_language(DW_LANG_C) .dwattr $C$DW$T$158, DW_AT_decl_file("/home/pola/ti/ccsv8/tools/compiler/ti-cgt-arm_18.1.1.LTS/include/sys/_stdint.h") .dwattr $C$DW$T$158, DW_AT_decl_line(0x58) .dwattr $C$DW$T$158, DW_AT_decl_column(0x16) $C$DW$T$159 .dwtag DW_TAG_typedef .dwattr $C$DW$T$159, DW_AT_name("uint64_t") .dwattr $C$DW$T$159, DW_AT_type(*$C$DW$T$146) .dwattr $C$DW$T$159, DW_AT_language(DW_LANG_C) .dwattr $C$DW$T$159, DW_AT_decl_file("/home/pola/ti/ccsv8/tools/compiler/ti-cgt-arm_18.1.1.LTS/include/sys/_stdint.h") .dwattr $C$DW$T$159, DW_AT_decl_line(0x47) .dwattr $C$DW$T$159, DW_AT_decl_column(0x15) $C$DW$T$16 .dwtag DW_TAG_base_type .dwattr $C$DW$T$16, DW_AT_encoding(DW_ATE_float) .dwattr $C$DW$T$16, DW_AT_name("float") .dwattr $C$DW$T$16, DW_AT_byte_size(0x04) $C$DW$T$160 .dwtag DW_TAG_typedef .dwattr $C$DW$T$160, DW_AT_name("__float_t") .dwattr $C$DW$T$160, DW_AT_type(*$C$DW$T$16) .dwattr $C$DW$T$160, DW_AT_language(DW_LANG_C) .dwattr $C$DW$T$160, DW_AT_decl_file("/home/pola/ti/ccsv8/tools/compiler/ti-cgt-arm_18.1.1.LTS/include/machine/_types.h") .dwattr $C$DW$T$160, DW_AT_decl_line(0x50) .dwattr $C$DW$T$160, DW_AT_decl_column(0x10) $C$DW$T$17 .dwtag DW_TAG_base_type .dwattr $C$DW$T$17, DW_AT_encoding(DW_ATE_float) .dwattr $C$DW$T$17, DW_AT_name("double") .dwattr $C$DW$T$17, DW_AT_byte_size(0x08) $C$DW$T$161 .dwtag DW_TAG_typedef .dwattr $C$DW$T$161, DW_AT_name("__double_t") .dwattr $C$DW$T$161, DW_AT_type(*$C$DW$T$17) .dwattr $C$DW$T$161, DW_AT_language(DW_LANG_C) .dwattr $C$DW$T$161, DW_AT_decl_file("/home/pola/ti/ccsv8/tools/compiler/ti-cgt-arm_18.1.1.LTS/include/machine/_types.h") .dwattr $C$DW$T$161, DW_AT_decl_line(0x4f) .dwattr $C$DW$T$161, DW_AT_decl_column(0x11) $C$DW$T$18 .dwtag DW_TAG_base_type .dwattr $C$DW$T$18, DW_AT_encoding(DW_ATE_float) .dwattr $C$DW$T$18, DW_AT_name("long double") .dwattr $C$DW$T$18, DW_AT_byte_size(0x08) $C$DW$T$38 .dwtag DW_TAG_base_type .dwattr $C$DW$T$38, DW_AT_encoding(DW_ATE_unsigned_char) .dwattr $C$DW$T$38, DW_AT_name("unsigned char") .dwattr $C$DW$T$38, DW_AT_byte_size(0x01) $C$DW$T$19 .dwtag DW_TAG_structure_type .dwattr $C$DW$T$19, DW_AT_name("__mq") .dwattr $C$DW$T$19, DW_AT_declaration .dwattr $C$DW$T$19, DW_AT_decl_file("/home/pola/ti/ccsv8/tools/compiler/ti-cgt-arm_18.1.1.LTS/include/sys/_types.h") .dwattr $C$DW$T$19, DW_AT_decl_line(0x47) .dwattr $C$DW$T$19, DW_AT_decl_column(0x10) .dwendtag $C$DW$T$19 $C$DW$T$164 .dwtag DW_TAG_pointer_type .dwattr $C$DW$T$164, DW_AT_type(*$C$DW$T$19) .dwattr $C$DW$T$164, DW_AT_address_class(0x20) $C$DW$T$165 .dwtag DW_TAG_typedef .dwattr $C$DW$T$165, DW_AT_name("__mqd_t") .dwattr $C$DW$T$165, DW_AT_type(*$C$DW$T$164) .dwattr $C$DW$T$165, DW_AT_language(DW_LANG_C) .dwattr $C$DW$T$165, DW_AT_decl_file("/home/pola/ti/ccsv8/tools/compiler/ti-cgt-arm_18.1.1.LTS/include/sys/_types.h") .dwattr $C$DW$T$165, DW_AT_decl_line(0x47) .dwattr $C$DW$T$165, DW_AT_decl_column(0x16) $C$DW$T$20 .dwtag DW_TAG_structure_type .dwattr $C$DW$T$20, DW_AT_name("__timer") .dwattr $C$DW$T$20, DW_AT_declaration .dwattr $C$DW$T$20, DW_AT_decl_file("/home/pola/ti/ccsv8/tools/compiler/ti-cgt-arm_18.1.1.LTS/include/sys/_types.h") .dwattr $C$DW$T$20, DW_AT_decl_line(0x46) .dwattr $C$DW$T$20, DW_AT_decl_column(0x10) .dwendtag $C$DW$T$20 $C$DW$T$166 .dwtag DW_TAG_pointer_type .dwattr $C$DW$T$166, DW_AT_type(*$C$DW$T$20) .dwattr $C$DW$T$166, DW_AT_address_class(0x20) $C$DW$T$167 .dwtag DW_TAG_typedef .dwattr $C$DW$T$167, DW_AT_name("__timer_t") .dwattr $C$DW$T$167, DW_AT_type(*$C$DW$T$166) .dwattr $C$DW$T$167, DW_AT_language(DW_LANG_C) .dwattr $C$DW$T$167, DW_AT_decl_file("/home/pola/ti/ccsv8/tools/compiler/ti-cgt-arm_18.1.1.LTS/include/sys/_types.h") .dwattr $C$DW$T$167, DW_AT_decl_line(0x46) .dwattr $C$DW$T$167, DW_AT_decl_column(0x19) $C$DW$T$22 .dwtag DW_TAG_structure_type .dwattr $C$DW$T$22, DW_AT_name("__va_list_t") .dwattr $C$DW$T$22, DW_AT_byte_size(0x04) $C$DW$290 .dwtag DW_TAG_member .dwattr $C$DW$290, DW_AT_type(*$C$DW$T$3) .dwattr $C$DW$290, DW_AT_name("__ap") .dwattr $C$DW$290, DW_AT_TI_symbol_name("__ap") .dwattr $C$DW$290, DW_AT_data_member_location[DW_OP_plus_uconst 0x0] .dwattr $C$DW$290, DW_AT_accessibility(DW_ACCESS_public) .dwattr $C$DW$290, DW_AT_decl_file("/home/pola/ti/ccsv8/tools/compiler/ti-cgt-arm_18.1.1.LTS/include/machine/_types.h") .dwattr $C$DW$290, DW_AT_decl_line(0x88) .dwattr $C$DW$290, DW_AT_decl_column(0x0c) .dwattr $C$DW$T$22, DW_AT_decl_file("/home/pola/ti/ccsv8/tools/compiler/ti-cgt-arm_18.1.1.LTS/include/machine/_types.h") .dwattr $C$DW$T$22, DW_AT_decl_line(0x87) .dwattr $C$DW$T$22, DW_AT_decl_column(0x10) .dwendtag $C$DW$T$22 $C$DW$T$168 .dwtag DW_TAG_typedef .dwattr $C$DW$T$168, DW_AT_name("__va_list") .dwattr $C$DW$T$168, DW_AT_type(*$C$DW$T$22) .dwattr $C$DW$T$168, DW_AT_language(DW_LANG_C) .dwattr $C$DW$T$168, DW_AT_decl_file("/home/pola/ti/ccsv8/tools/compiler/ti-cgt-arm_18.1.1.LTS/include/machine/_types.h") .dwattr $C$DW$T$168, DW_AT_decl_line(0x89) .dwattr $C$DW$T$168, DW_AT_decl_column(0x03) .dwattr $C$DW$CU, DW_AT_language(DW_LANG_C) ;*************************************************************** ;* DWARF CIE ENTRIES * ;*************************************************************** $C$DW$CIE .dwcie 14 .dwcfi cfa_register, 13 .dwcfi cfa_offset, 0 .dwcfi same_value, 4 .dwcfi same_value, 5 .dwcfi same_value, 6 .dwcfi same_value, 7 .dwcfi same_value, 8 .dwcfi same_value, 9 .dwcfi same_value, 10 .dwcfi same_value, 11 .dwcfi same_value, 80 .dwcfi same_value, 81 .dwcfi same_value, 82 .dwcfi same_value, 83 .dwcfi same_value, 84 .dwcfi same_value, 85 .dwcfi same_value, 86 .dwcfi same_value, 87 .dwcfi same_value, 88 .dwcfi same_value, 89 .dwcfi same_value, 90 .dwcfi same_value, 91 .dwcfi same_value, 92 .dwcfi same_value, 93 .dwcfi same_value, 94 .dwcfi same_value, 95 .dwendentry ;*************************************************************** ;* DWARF REGISTER MAP * ;*************************************************************** $C$DW$291 .dwtag DW_TAG_TI_assign_register .dwattr $C$DW$291, DW_AT_name("A1") .dwattr $C$DW$291, DW_AT_location[DW_OP_reg0] $C$DW$292 .dwtag DW_TAG_TI_assign_register .dwattr $C$DW$292, DW_AT_name("A2") .dwattr $C$DW$292, DW_AT_location[DW_OP_reg1] $C$DW$293 .dwtag DW_TAG_TI_assign_register .dwattr $C$DW$293, DW_AT_name("A3") .dwattr $C$DW$293, DW_AT_location[DW_OP_reg2] $C$DW$294 .dwtag DW_TAG_TI_assign_register .dwattr $C$DW$294, DW_AT_name("A4") .dwattr $C$DW$294, DW_AT_location[DW_OP_reg3] $C$DW$295 .dwtag DW_TAG_TI_assign_register .dwattr $C$DW$295, DW_AT_name("V1") .dwattr $C$DW$295, DW_AT_location[DW_OP_reg4] $C$DW$296 .dwtag DW_TAG_TI_assign_register .dwattr $C$DW$296, DW_AT_name("V2") .dwattr $C$DW$296, DW_AT_location[DW_OP_reg5] $C$DW$297 .dwtag DW_TAG_TI_assign_register .dwattr $C$DW$297, DW_AT_name("V3") .dwattr $C$DW$297, DW_AT_location[DW_OP_reg6] $C$DW$298 .dwtag DW_TAG_TI_assign_register .dwattr $C$DW$298, DW_AT_name("V4") .dwattr $C$DW$298, DW_AT_location[DW_OP_reg7] $C$DW$299 .dwtag DW_TAG_TI_assign_register .dwattr $C$DW$299, DW_AT_name("V5") .dwattr $C$DW$299, DW_AT_location[DW_OP_reg8] $C$DW$300 .dwtag DW_TAG_TI_assign_register .dwattr $C$DW$300, DW_AT_name("V6") .dwattr $C$DW$300, DW_AT_location[DW_OP_reg9] $C$DW$301 .dwtag DW_TAG_TI_assign_register .dwattr $C$DW$301, DW_AT_name("V7") .dwattr $C$DW$301, DW_AT_location[DW_OP_reg10] $C$DW$302 .dwtag DW_TAG_TI_assign_register .dwattr $C$DW$302, DW_AT_name("V8") .dwattr $C$DW$302, DW_AT_location[DW_OP_reg11] $C$DW$303 .dwtag DW_TAG_TI_assign_register .dwattr $C$DW$303, DW_AT_name("V9") .dwattr $C$DW$303, DW_AT_location[DW_OP_reg12] $C$DW$304 .dwtag DW_TAG_TI_assign_register .dwattr $C$DW$304, DW_AT_name("SP") .dwattr $C$DW$304, DW_AT_location[DW_OP_reg13] $C$DW$305 .dwtag DW_TAG_TI_assign_register .dwattr $C$DW$305, DW_AT_name("LR") .dwattr $C$DW$305, DW_AT_location[DW_OP_reg14] $C$DW$306 .dwtag DW_TAG_TI_assign_register .dwattr $C$DW$306, DW_AT_name("PC") .dwattr $C$DW$306, DW_AT_location[DW_OP_reg15] $C$DW$307 .dwtag DW_TAG_TI_assign_register .dwattr $C$DW$307, DW_AT_name("SR") .dwattr $C$DW$307, DW_AT_location[DW_OP_reg17] $C$DW$308 .dwtag DW_TAG_TI_assign_register .dwattr $C$DW$308, DW_AT_name("AP") .dwattr $C$DW$308, DW_AT_location[DW_OP_reg7] $C$DW$309 .dwtag DW_TAG_TI_assign_register .dwattr $C$DW$309, DW_AT_name("D0") .dwattr $C$DW$309, DW_AT_location[DW_OP_regx 0x40] $C$DW$310 .dwtag DW_TAG_TI_assign_register .dwattr $C$DW$310, DW_AT_name("D0_hi") .dwattr $C$DW$310, DW_AT_location[DW_OP_regx 0x41] $C$DW$311 .dwtag DW_TAG_TI_assign_register .dwattr $C$DW$311, DW_AT_name("D1") .dwattr $C$DW$311, DW_AT_location[DW_OP_regx 0x42] $C$DW$312 .dwtag DW_TAG_TI_assign_register .dwattr $C$DW$312, DW_AT_name("D1_hi") .dwattr $C$DW$312, DW_AT_location[DW_OP_regx 0x43] $C$DW$313 .dwtag DW_TAG_TI_assign_register .dwattr $C$DW$313, DW_AT_name("D2") .dwattr $C$DW$313, DW_AT_location[DW_OP_regx 0x44] $C$DW$314 .dwtag DW_TAG_TI_assign_register .dwattr $C$DW$314, DW_AT_name("D2_hi") .dwattr $C$DW$314, DW_AT_location[DW_OP_regx 0x45] $C$DW$315 .dwtag DW_TAG_TI_assign_register .dwattr $C$DW$315, DW_AT_name("D3") .dwattr $C$DW$315, DW_AT_location[DW_OP_regx 0x46] $C$DW$316 .dwtag DW_TAG_TI_assign_register .dwattr $C$DW$316, DW_AT_name("D3_hi") .dwattr $C$DW$316, DW_AT_location[DW_OP_regx 0x47] $C$DW$317 .dwtag DW_TAG_TI_assign_register .dwattr $C$DW$317, DW_AT_name("D4") .dwattr $C$DW$317, DW_AT_location[DW_OP_regx 0x48] $C$DW$318 .dwtag DW_TAG_TI_assign_register .dwattr $C$DW$318, DW_AT_name("D4_hi") .dwattr $C$DW$318, DW_AT_location[DW_OP_regx 0x49] $C$DW$319 .dwtag DW_TAG_TI_assign_register .dwattr $C$DW$319, DW_AT_name("D5") .dwattr $C$DW$319, DW_AT_location[DW_OP_regx 0x4a] $C$DW$320 .dwtag DW_TAG_TI_assign_register .dwattr $C$DW$320, DW_AT_name("D5_hi") .dwattr $C$DW$320, DW_AT_location[DW_OP_regx 0x4b] $C$DW$321 .dwtag DW_TAG_TI_assign_register .dwattr $C$DW$321, DW_AT_name("D6") .dwattr $C$DW$321, DW_AT_location[DW_OP_regx 0x4c] $C$DW$322 .dwtag DW_TAG_TI_assign_register .dwattr $C$DW$322, DW_AT_name("D6_hi") .dwattr $C$DW$322, DW_AT_location[DW_OP_regx 0x4d] $C$DW$323 .dwtag DW_TAG_TI_assign_register .dwattr $C$DW$323, DW_AT_name("D7") .dwattr $C$DW$323, DW_AT_location[DW_OP_regx 0x4e] $C$DW$324 .dwtag DW_TAG_TI_assign_register .dwattr $C$DW$324, DW_AT_name("D7_hi") .dwattr $C$DW$324, DW_AT_location[DW_OP_regx 0x4f] $C$DW$325 .dwtag DW_TAG_TI_assign_register .dwattr $C$DW$325, DW_AT_name("D8") .dwattr $C$DW$325, DW_AT_location[DW_OP_regx 0x50] $C$DW$326 .dwtag DW_TAG_TI_assign_register .dwattr $C$DW$326, DW_AT_name("D8_hi") .dwattr $C$DW$326, DW_AT_location[DW_OP_regx 0x51] $C$DW$327 .dwtag DW_TAG_TI_assign_register .dwattr $C$DW$327, DW_AT_name("D9") .dwattr $C$DW$327, DW_AT_location[DW_OP_regx 0x52] $C$DW$328 .dwtag DW_TAG_TI_assign_register .dwattr $C$DW$328, DW_AT_name("D9_hi") .dwattr $C$DW$328, DW_AT_location[DW_OP_regx 0x53] $C$DW$329 .dwtag DW_TAG_TI_assign_register .dwattr $C$DW$329, DW_AT_name("D10") .dwattr $C$DW$329, DW_AT_location[DW_OP_regx 0x54] $C$DW$330 .dwtag DW_TAG_TI_assign_register .dwattr $C$DW$330, DW_AT_name("D10_hi") .dwattr $C$DW$330, DW_AT_location[DW_OP_regx 0x55] $C$DW$331 .dwtag DW_TAG_TI_assign_register .dwattr $C$DW$331, DW_AT_name("D11") .dwattr $C$DW$331, DW_AT_location[DW_OP_regx 0x56] $C$DW$332 .dwtag DW_TAG_TI_assign_register .dwattr $C$DW$332, DW_AT_name("D11_hi") .dwattr $C$DW$332, DW_AT_location[DW_OP_regx 0x57] $C$DW$333 .dwtag DW_TAG_TI_assign_register .dwattr $C$DW$333, DW_AT_name("D12") .dwattr $C$DW$333, DW_AT_location[DW_OP_regx 0x58] $C$DW$334 .dwtag DW_TAG_TI_assign_register .dwattr $C$DW$334, DW_AT_name("D12_hi") .dwattr $C$DW$334, DW_AT_location[DW_OP_regx 0x59] $C$DW$335 .dwtag DW_TAG_TI_assign_register .dwattr $C$DW$335, DW_AT_name("D13") .dwattr $C$DW$335, DW_AT_location[DW_OP_regx 0x5a] $C$DW$336 .dwtag DW_TAG_TI_assign_register .dwattr $C$DW$336, DW_AT_name("D13_hi") .dwattr $C$DW$336, DW_AT_location[DW_OP_regx 0x5b] $C$DW$337 .dwtag DW_TAG_TI_assign_register .dwattr $C$DW$337, DW_AT_name("D14") .dwattr $C$DW$337, DW_AT_location[DW_OP_regx 0x5c] $C$DW$338 .dwtag DW_TAG_TI_assign_register .dwattr $C$DW$338, DW_AT_name("D14_hi") .dwattr $C$DW$338, DW_AT_location[DW_OP_regx 0x5d] $C$DW$339 .dwtag DW_TAG_TI_assign_register .dwattr $C$DW$339, DW_AT_name("D15") .dwattr $C$DW$339, DW_AT_location[DW_OP_regx 0x5e] $C$DW$340 .dwtag DW_TAG_TI_assign_register .dwattr $C$DW$340, DW_AT_name("D15_hi") .dwattr $C$DW$340, DW_AT_location[DW_OP_regx 0x5f] $C$DW$341 .dwtag DW_TAG_TI_assign_register .dwattr $C$DW$341, DW_AT_name("FPEXC") .dwattr $C$DW$341, DW_AT_location[DW_OP_reg18] $C$DW$342 .dwtag DW_TAG_TI_assign_register .dwattr $C$DW$342, DW_AT_name("FPSCR") .dwattr $C$DW$342, DW_AT_location[DW_OP_reg19] .dwendtag $C$DW$CU
src/wiki-parsers-html-entities.ads
jquorning/ada-wiki
18
11338
-- Generated by gen-ada-entities.pl latin1.ent symbol.ent special.ent private package Wiki.Parsers.Html.Entities is pragma Preelaborate; AELIG_NAME : aliased constant String := "AElig"; AACUTE_NAME : aliased constant String := "Aacute"; ACIRC_NAME : aliased constant String := "Acirc"; AGRAVE_NAME : aliased constant String := "Agrave"; ALPHA_NAME : aliased constant String := "Alpha"; ARING_NAME : aliased constant String := "Aring"; ATILDE_NAME : aliased constant String := "Atilde"; AUML_NAME : aliased constant String := "Auml"; BETA_NAME : aliased constant String := "Beta"; CCEDIL_NAME : aliased constant String := "Ccedil"; CHI_NAME : aliased constant String := "Chi"; DAGGER_NAME : aliased constant String := "Dagger"; DELTA_NAME : aliased constant String := "Delta"; ETH_NAME : aliased constant String := "ETH"; EACUTE_NAME : aliased constant String := "Eacute"; ECIRC_NAME : aliased constant String := "Ecirc"; EGRAVE_NAME : aliased constant String := "Egrave"; EPSILON_NAME : aliased constant String := "Epsilon"; ETA_NAME : aliased constant String := "Eta"; EUML_NAME : aliased constant String := "Euml"; GAMMA_NAME : aliased constant String := "Gamma"; IACUTE_NAME : aliased constant String := "Iacute"; ICIRC_NAME : aliased constant String := "Icirc"; IGRAVE_NAME : aliased constant String := "Igrave"; IOTA_NAME : aliased constant String := "Iota"; IUML_NAME : aliased constant String := "Iuml"; KAPPA_NAME : aliased constant String := "Kappa"; LAMBDA_NAME : aliased constant String := "Lambda"; MU_NAME : aliased constant String := "Mu"; NTILDE_NAME : aliased constant String := "Ntilde"; NU_NAME : aliased constant String := "Nu"; OELIG_NAME : aliased constant String := "OElig"; OACUTE_NAME : aliased constant String := "Oacute"; OCIRC_NAME : aliased constant String := "Ocirc"; OGRAVE_NAME : aliased constant String := "Ograve"; OMEGA_NAME : aliased constant String := "Omega"; OMICRON_NAME : aliased constant String := "Omicron"; OSLASH_NAME : aliased constant String := "Oslash"; OTILDE_NAME : aliased constant String := "Otilde"; OUML_NAME : aliased constant String := "Ouml"; PHI_NAME : aliased constant String := "Phi"; PI_NAME : aliased constant String := "Pi"; PRIME_NAME : aliased constant String := "Prime"; PSI_NAME : aliased constant String := "Psi"; RHO_NAME : aliased constant String := "Rho"; SCARON_NAME : aliased constant String := "Scaron"; SIGMA_NAME : aliased constant String := "Sigma"; THORN_NAME : aliased constant String := "THORN"; TAU_NAME : aliased constant String := "Tau"; THETA_NAME : aliased constant String := "Theta"; UACUTE_NAME : aliased constant String := "Uacute"; UCIRC_NAME : aliased constant String := "Ucirc"; UGRAVE_NAME : aliased constant String := "Ugrave"; UPSILON_NAME : aliased constant String := "Upsilon"; UUML_NAME : aliased constant String := "Uuml"; XI_NAME : aliased constant String := "Xi"; YACUTE_NAME : aliased constant String := "Yacute"; YUML_NAME : aliased constant String := "Yuml"; ZETA_NAME : aliased constant String := "Zeta"; N59_NAME : aliased constant String := "aacute"; N60_NAME : aliased constant String := "acirc"; ACUTE_NAME : aliased constant String := "acute"; N62_NAME : aliased constant String := "aelig"; N63_NAME : aliased constant String := "agrave"; ALEFSYM_NAME : aliased constant String := "alefsym"; N65_NAME : aliased constant String := "alpha"; AMP_NAME : aliased constant String := "amp"; AND_NAME : aliased constant String := "and"; ANG_NAME : aliased constant String := "ang"; APOS_NAME : aliased constant String := "apos"; N70_NAME : aliased constant String := "aring"; ASYMP_NAME : aliased constant String := "asymp"; N72_NAME : aliased constant String := "atilde"; N73_NAME : aliased constant String := "auml"; BDQUO_NAME : aliased constant String := "bdquo"; N75_NAME : aliased constant String := "beta"; BRVBAR_NAME : aliased constant String := "brvbar"; BULL_NAME : aliased constant String := "bull"; CAP_NAME : aliased constant String := "cap"; N79_NAME : aliased constant String := "ccedil"; CEDIL_NAME : aliased constant String := "cedil"; CENT_NAME : aliased constant String := "cent"; N82_NAME : aliased constant String := "chi"; CIRC_NAME : aliased constant String := "circ"; CLUBS_NAME : aliased constant String := "clubs"; CONG_NAME : aliased constant String := "cong"; COPY_NAME : aliased constant String := "copy"; CRARR_NAME : aliased constant String := "crarr"; CUP_NAME : aliased constant String := "cup"; CURREN_NAME : aliased constant String := "curren"; DARR_NAME : aliased constant String := "dArr"; N91_NAME : aliased constant String := "dagger"; N92_NAME : aliased constant String := "darr"; DEG_NAME : aliased constant String := "deg"; N94_NAME : aliased constant String := "delta"; DIAMS_NAME : aliased constant String := "diams"; DIVIDE_NAME : aliased constant String := "divide"; N97_NAME : aliased constant String := "eacute"; N98_NAME : aliased constant String := "ecirc"; N99_NAME : aliased constant String := "egrave"; EMPTY_NAME : aliased constant String := "empty"; EMSP_NAME : aliased constant String := "emsp"; ENSP_NAME : aliased constant String := "ensp"; N103_NAME : aliased constant String := "epsilon"; EQUIV_NAME : aliased constant String := "equiv"; N105_NAME : aliased constant String := "eta"; N106_NAME : aliased constant String := "eth"; N107_NAME : aliased constant String := "euml"; EURO_NAME : aliased constant String := "euro"; EXIST_NAME : aliased constant String := "exist"; FNOF_NAME : aliased constant String := "fnof"; FORALL_NAME : aliased constant String := "forall"; FRAC12_NAME : aliased constant String := "frac12"; FRAC14_NAME : aliased constant String := "frac14"; FRAC34_NAME : aliased constant String := "frac34"; FRASL_NAME : aliased constant String := "frasl"; N116_NAME : aliased constant String := "gamma"; GE_NAME : aliased constant String := "ge"; GT_NAME : aliased constant String := "gt"; HARR_NAME : aliased constant String := "hArr"; N120_NAME : aliased constant String := "harr"; HEARTS_NAME : aliased constant String := "hearts"; HELLIP_NAME : aliased constant String := "hellip"; N123_NAME : aliased constant String := "iacute"; N124_NAME : aliased constant String := "icirc"; IEXCL_NAME : aliased constant String := "iexcl"; N126_NAME : aliased constant String := "igrave"; IMAGE_NAME : aliased constant String := "image"; INFIN_NAME : aliased constant String := "infin"; INT_NAME : aliased constant String := "int"; N130_NAME : aliased constant String := "iota"; IQUEST_NAME : aliased constant String := "iquest"; ISIN_NAME : aliased constant String := "isin"; N133_NAME : aliased constant String := "iuml"; N134_NAME : aliased constant String := "kappa"; LARR_NAME : aliased constant String := "lArr"; N136_NAME : aliased constant String := "lambda"; LANG_NAME : aliased constant String := "lang"; LAQUO_NAME : aliased constant String := "laquo"; N139_NAME : aliased constant String := "larr"; LCEIL_NAME : aliased constant String := "lceil"; LDQUO_NAME : aliased constant String := "ldquo"; LE_NAME : aliased constant String := "le"; LFLOOR_NAME : aliased constant String := "lfloor"; LOWAST_NAME : aliased constant String := "lowast"; LOZ_NAME : aliased constant String := "loz"; LRM_NAME : aliased constant String := "lrm"; LSAQUO_NAME : aliased constant String := "lsaquo"; LSQUO_NAME : aliased constant String := "lsquo"; LT_NAME : aliased constant String := "lt"; MACR_NAME : aliased constant String := "macr"; MDASH_NAME : aliased constant String := "mdash"; MICRO_NAME : aliased constant String := "micro"; MIDDOT_NAME : aliased constant String := "middot"; MINUS_NAME : aliased constant String := "minus"; N155_NAME : aliased constant String := "mu"; NABLA_NAME : aliased constant String := "nabla"; NBSP_NAME : aliased constant String := "nbsp"; NDASH_NAME : aliased constant String := "ndash"; NE_NAME : aliased constant String := "ne"; NI_NAME : aliased constant String := "ni"; NOT_NAME : aliased constant String := "not"; NOTIN_NAME : aliased constant String := "notin"; NSUB_NAME : aliased constant String := "nsub"; N164_NAME : aliased constant String := "ntilde"; N165_NAME : aliased constant String := "nu"; N166_NAME : aliased constant String := "oacute"; N167_NAME : aliased constant String := "ocirc"; N168_NAME : aliased constant String := "oelig"; N169_NAME : aliased constant String := "ograve"; OLINE_NAME : aliased constant String := "oline"; N171_NAME : aliased constant String := "omega"; N172_NAME : aliased constant String := "omicron"; OPLUS_NAME : aliased constant String := "oplus"; OR_NAME : aliased constant String := "or"; ORDF_NAME : aliased constant String := "ordf"; ORDM_NAME : aliased constant String := "ordm"; N177_NAME : aliased constant String := "oslash"; N178_NAME : aliased constant String := "otilde"; OTIMES_NAME : aliased constant String := "otimes"; N180_NAME : aliased constant String := "ouml"; PARA_NAME : aliased constant String := "para"; PART_NAME : aliased constant String := "part"; PERMIL_NAME : aliased constant String := "permil"; PERP_NAME : aliased constant String := "perp"; N185_NAME : aliased constant String := "phi"; N186_NAME : aliased constant String := "pi"; PIV_NAME : aliased constant String := "piv"; PLUSMN_NAME : aliased constant String := "plusmn"; POUND_NAME : aliased constant String := "pound"; N190_NAME : aliased constant String := "prime"; PROD_NAME : aliased constant String := "prod"; PROP_NAME : aliased constant String := "prop"; N193_NAME : aliased constant String := "psi"; QUOT_NAME : aliased constant String := "quot"; RARR_NAME : aliased constant String := "rArr"; RADIC_NAME : aliased constant String := "radic"; RANG_NAME : aliased constant String := "rang"; RAQUO_NAME : aliased constant String := "raquo"; N199_NAME : aliased constant String := "rarr"; RCEIL_NAME : aliased constant String := "rceil"; RDQUO_NAME : aliased constant String := "rdquo"; REAL_NAME : aliased constant String := "real"; REG_NAME : aliased constant String := "reg"; RFLOOR_NAME : aliased constant String := "rfloor"; N205_NAME : aliased constant String := "rho"; RLM_NAME : aliased constant String := "rlm"; RSAQUO_NAME : aliased constant String := "rsaquo"; RSQUO_NAME : aliased constant String := "rsquo"; SBQUO_NAME : aliased constant String := "sbquo"; N210_NAME : aliased constant String := "scaron"; SDOT_NAME : aliased constant String := "sdot"; SECT_NAME : aliased constant String := "sect"; SHY_NAME : aliased constant String := "shy"; N214_NAME : aliased constant String := "sigma"; SIGMAF_NAME : aliased constant String := "sigmaf"; SIM_NAME : aliased constant String := "sim"; SPADES_NAME : aliased constant String := "spades"; SUB_NAME : aliased constant String := "sub"; SUBE_NAME : aliased constant String := "sube"; SUM_NAME : aliased constant String := "sum"; SUP_NAME : aliased constant String := "sup"; SUP1_NAME : aliased constant String := "sup1"; SUP2_NAME : aliased constant String := "sup2"; SUP3_NAME : aliased constant String := "sup3"; SUPE_NAME : aliased constant String := "supe"; SZLIG_NAME : aliased constant String := "szlig"; N227_NAME : aliased constant String := "tau"; THERE4_NAME : aliased constant String := "there4"; N229_NAME : aliased constant String := "theta"; THETASYM_NAME : aliased constant String := "thetasym"; THINSP_NAME : aliased constant String := "thinsp"; N232_NAME : aliased constant String := "thorn"; TILDE_NAME : aliased constant String := "tilde"; TIMES_NAME : aliased constant String := "times"; TRADE_NAME : aliased constant String := "trade"; UARR_NAME : aliased constant String := "uArr"; N237_NAME : aliased constant String := "uacute"; N238_NAME : aliased constant String := "uarr"; N239_NAME : aliased constant String := "ucirc"; N240_NAME : aliased constant String := "ugrave"; UML_NAME : aliased constant String := "uml"; UPSIH_NAME : aliased constant String := "upsih"; N243_NAME : aliased constant String := "upsilon"; N244_NAME : aliased constant String := "uuml"; WEIERP_NAME : aliased constant String := "weierp"; N246_NAME : aliased constant String := "xi"; N247_NAME : aliased constant String := "yacute"; YEN_NAME : aliased constant String := "yen"; N249_NAME : aliased constant String := "yuml"; N250_NAME : aliased constant String := "zeta"; ZWJ_NAME : aliased constant String := "zwj"; ZWNJ_NAME : aliased constant String := "zwnj"; type String_Access is access constant String; type Keyword_Array is array (Positive range 1 .. 253) of String_Access; type Char_Array is array (Positive range 1 .. 253) of Wide_Wide_Character; Keywords : constant Keyword_Array := ( AELIG_NAME'Access, AACUTE_NAME'Access, ACIRC_NAME'Access, AGRAVE_NAME'Access, ALPHA_NAME'Access, ARING_NAME'Access, ATILDE_NAME'Access, AUML_NAME'Access, BETA_NAME'Access, CCEDIL_NAME'Access, CHI_NAME'Access, DAGGER_NAME'Access, DELTA_NAME'Access, ETH_NAME'Access, EACUTE_NAME'Access, ECIRC_NAME'Access, EGRAVE_NAME'Access, EPSILON_NAME'Access, ETA_NAME'Access, EUML_NAME'Access, GAMMA_NAME'Access, IACUTE_NAME'Access, ICIRC_NAME'Access, IGRAVE_NAME'Access, IOTA_NAME'Access, IUML_NAME'Access, KAPPA_NAME'Access, LAMBDA_NAME'Access, MU_NAME'Access, NTILDE_NAME'Access, NU_NAME'Access, OELIG_NAME'Access, OACUTE_NAME'Access, OCIRC_NAME'Access, OGRAVE_NAME'Access, OMEGA_NAME'Access, OMICRON_NAME'Access, OSLASH_NAME'Access, OTILDE_NAME'Access, OUML_NAME'Access, PHI_NAME'Access, PI_NAME'Access, PRIME_NAME'Access, PSI_NAME'Access, RHO_NAME'Access, SCARON_NAME'Access, SIGMA_NAME'Access, THORN_NAME'Access, TAU_NAME'Access, THETA_NAME'Access, UACUTE_NAME'Access, UCIRC_NAME'Access, UGRAVE_NAME'Access, UPSILON_NAME'Access, UUML_NAME'Access, XI_NAME'Access, YACUTE_NAME'Access, YUML_NAME'Access, ZETA_NAME'Access, N59_NAME'Access, N60_NAME'Access, ACUTE_NAME'Access, N62_NAME'Access, N63_NAME'Access, ALEFSYM_NAME'Access, N65_NAME'Access, AMP_NAME'Access, AND_NAME'Access, ANG_NAME'Access, APOS_NAME'Access, N70_NAME'Access, ASYMP_NAME'Access, N72_NAME'Access, N73_NAME'Access, BDQUO_NAME'Access, N75_NAME'Access, BRVBAR_NAME'Access, BULL_NAME'Access, CAP_NAME'Access, N79_NAME'Access, CEDIL_NAME'Access, CENT_NAME'Access, N82_NAME'Access, CIRC_NAME'Access, CLUBS_NAME'Access, CONG_NAME'Access, COPY_NAME'Access, CRARR_NAME'Access, CUP_NAME'Access, CURREN_NAME'Access, DARR_NAME'Access, N91_NAME'Access, N92_NAME'Access, DEG_NAME'Access, N94_NAME'Access, DIAMS_NAME'Access, DIVIDE_NAME'Access, N97_NAME'Access, N98_NAME'Access, N99_NAME'Access, EMPTY_NAME'Access, EMSP_NAME'Access, ENSP_NAME'Access, N103_NAME'Access, EQUIV_NAME'Access, N105_NAME'Access, N106_NAME'Access, N107_NAME'Access, EURO_NAME'Access, EXIST_NAME'Access, FNOF_NAME'Access, FORALL_NAME'Access, FRAC12_NAME'Access, FRAC14_NAME'Access, FRAC34_NAME'Access, FRASL_NAME'Access, N116_NAME'Access, GE_NAME'Access, GT_NAME'Access, HARR_NAME'Access, N120_NAME'Access, HEARTS_NAME'Access, HELLIP_NAME'Access, N123_NAME'Access, N124_NAME'Access, IEXCL_NAME'Access, N126_NAME'Access, IMAGE_NAME'Access, INFIN_NAME'Access, INT_NAME'Access, N130_NAME'Access, IQUEST_NAME'Access, ISIN_NAME'Access, N133_NAME'Access, N134_NAME'Access, LARR_NAME'Access, N136_NAME'Access, LANG_NAME'Access, LAQUO_NAME'Access, N139_NAME'Access, LCEIL_NAME'Access, LDQUO_NAME'Access, LE_NAME'Access, LFLOOR_NAME'Access, LOWAST_NAME'Access, LOZ_NAME'Access, LRM_NAME'Access, LSAQUO_NAME'Access, LSQUO_NAME'Access, LT_NAME'Access, MACR_NAME'Access, MDASH_NAME'Access, MICRO_NAME'Access, MIDDOT_NAME'Access, MINUS_NAME'Access, N155_NAME'Access, NABLA_NAME'Access, NBSP_NAME'Access, NDASH_NAME'Access, NE_NAME'Access, NI_NAME'Access, NOT_NAME'Access, NOTIN_NAME'Access, NSUB_NAME'Access, N164_NAME'Access, N165_NAME'Access, N166_NAME'Access, N167_NAME'Access, N168_NAME'Access, N169_NAME'Access, OLINE_NAME'Access, N171_NAME'Access, N172_NAME'Access, OPLUS_NAME'Access, OR_NAME'Access, ORDF_NAME'Access, ORDM_NAME'Access, N177_NAME'Access, N178_NAME'Access, OTIMES_NAME'Access, N180_NAME'Access, PARA_NAME'Access, PART_NAME'Access, PERMIL_NAME'Access, PERP_NAME'Access, N185_NAME'Access, N186_NAME'Access, PIV_NAME'Access, PLUSMN_NAME'Access, POUND_NAME'Access, N190_NAME'Access, PROD_NAME'Access, PROP_NAME'Access, N193_NAME'Access, QUOT_NAME'Access, RARR_NAME'Access, RADIC_NAME'Access, RANG_NAME'Access, RAQUO_NAME'Access, N199_NAME'Access, RCEIL_NAME'Access, RDQUO_NAME'Access, REAL_NAME'Access, REG_NAME'Access, RFLOOR_NAME'Access, N205_NAME'Access, RLM_NAME'Access, RSAQUO_NAME'Access, RSQUO_NAME'Access, SBQUO_NAME'Access, N210_NAME'Access, SDOT_NAME'Access, SECT_NAME'Access, SHY_NAME'Access, N214_NAME'Access, SIGMAF_NAME'Access, SIM_NAME'Access, SPADES_NAME'Access, SUB_NAME'Access, SUBE_NAME'Access, SUM_NAME'Access, SUP_NAME'Access, SUP1_NAME'Access, SUP2_NAME'Access, SUP3_NAME'Access, SUPE_NAME'Access, SZLIG_NAME'Access, N227_NAME'Access, THERE4_NAME'Access, N229_NAME'Access, THETASYM_NAME'Access, THINSP_NAME'Access, N232_NAME'Access, TILDE_NAME'Access, TIMES_NAME'Access, TRADE_NAME'Access, UARR_NAME'Access, N237_NAME'Access, N238_NAME'Access, N239_NAME'Access, N240_NAME'Access, UML_NAME'Access, UPSIH_NAME'Access, N243_NAME'Access, N244_NAME'Access, WEIERP_NAME'Access, N246_NAME'Access, N247_NAME'Access, YEN_NAME'Access, N249_NAME'Access, N250_NAME'Access, ZWJ_NAME'Access, ZWNJ_NAME'Access); Mapping : constant Char_Array := ( Wide_Wide_Character'Val (198), Wide_Wide_Character'Val (193), Wide_Wide_Character'Val (194), Wide_Wide_Character'Val (192), Wide_Wide_Character'Val (913), Wide_Wide_Character'Val (197), Wide_Wide_Character'Val (195), Wide_Wide_Character'Val (196), Wide_Wide_Character'Val (914), Wide_Wide_Character'Val (199), Wide_Wide_Character'Val (935), Wide_Wide_Character'Val (8225), Wide_Wide_Character'Val (916), Wide_Wide_Character'Val (208), Wide_Wide_Character'Val (201), Wide_Wide_Character'Val (202), Wide_Wide_Character'Val (200), Wide_Wide_Character'Val (917), Wide_Wide_Character'Val (919), Wide_Wide_Character'Val (203), Wide_Wide_Character'Val (915), Wide_Wide_Character'Val (205), Wide_Wide_Character'Val (206), Wide_Wide_Character'Val (204), Wide_Wide_Character'Val (921), Wide_Wide_Character'Val (207), Wide_Wide_Character'Val (922), Wide_Wide_Character'Val (923), Wide_Wide_Character'Val (924), Wide_Wide_Character'Val (209), Wide_Wide_Character'Val (925), Wide_Wide_Character'Val (338), Wide_Wide_Character'Val (211), Wide_Wide_Character'Val (212), Wide_Wide_Character'Val (210), Wide_Wide_Character'Val (937), Wide_Wide_Character'Val (927), Wide_Wide_Character'Val (216), Wide_Wide_Character'Val (213), Wide_Wide_Character'Val (214), Wide_Wide_Character'Val (934), Wide_Wide_Character'Val (928), Wide_Wide_Character'Val (8243), Wide_Wide_Character'Val (936), Wide_Wide_Character'Val (929), Wide_Wide_Character'Val (352), Wide_Wide_Character'Val (931), Wide_Wide_Character'Val (222), Wide_Wide_Character'Val (932), Wide_Wide_Character'Val (920), Wide_Wide_Character'Val (218), Wide_Wide_Character'Val (219), Wide_Wide_Character'Val (217), Wide_Wide_Character'Val (933), Wide_Wide_Character'Val (220), Wide_Wide_Character'Val (926), Wide_Wide_Character'Val (221), Wide_Wide_Character'Val (376), Wide_Wide_Character'Val (918), Wide_Wide_Character'Val (225), Wide_Wide_Character'Val (226), Wide_Wide_Character'Val (180), Wide_Wide_Character'Val (230), Wide_Wide_Character'Val (224), Wide_Wide_Character'Val (8501), Wide_Wide_Character'Val (945), Wide_Wide_Character'Val (38), Wide_Wide_Character'Val (8743), Wide_Wide_Character'Val (8736), Wide_Wide_Character'Val (39), Wide_Wide_Character'Val (229), Wide_Wide_Character'Val (8776), Wide_Wide_Character'Val (227), Wide_Wide_Character'Val (228), Wide_Wide_Character'Val (8222), Wide_Wide_Character'Val (946), Wide_Wide_Character'Val (166), Wide_Wide_Character'Val (8226), Wide_Wide_Character'Val (8745), Wide_Wide_Character'Val (231), Wide_Wide_Character'Val (184), Wide_Wide_Character'Val (162), Wide_Wide_Character'Val (967), Wide_Wide_Character'Val (710), Wide_Wide_Character'Val (9827), Wide_Wide_Character'Val (8773), Wide_Wide_Character'Val (169), Wide_Wide_Character'Val (8629), Wide_Wide_Character'Val (8746), Wide_Wide_Character'Val (164), Wide_Wide_Character'Val (8659), Wide_Wide_Character'Val (8224), Wide_Wide_Character'Val (8595), Wide_Wide_Character'Val (176), Wide_Wide_Character'Val (948), Wide_Wide_Character'Val (9830), Wide_Wide_Character'Val (247), Wide_Wide_Character'Val (233), Wide_Wide_Character'Val (234), Wide_Wide_Character'Val (232), Wide_Wide_Character'Val (8709), Wide_Wide_Character'Val (8195), Wide_Wide_Character'Val (8194), Wide_Wide_Character'Val (949), Wide_Wide_Character'Val (8801), Wide_Wide_Character'Val (951), Wide_Wide_Character'Val (240), Wide_Wide_Character'Val (235), Wide_Wide_Character'Val (8364), Wide_Wide_Character'Val (8707), Wide_Wide_Character'Val (402), Wide_Wide_Character'Val (8704), Wide_Wide_Character'Val (189), Wide_Wide_Character'Val (188), Wide_Wide_Character'Val (190), Wide_Wide_Character'Val (8260), Wide_Wide_Character'Val (947), Wide_Wide_Character'Val (8805), Wide_Wide_Character'Val (62), Wide_Wide_Character'Val (8660), Wide_Wide_Character'Val (8596), Wide_Wide_Character'Val (9829), Wide_Wide_Character'Val (8230), Wide_Wide_Character'Val (237), Wide_Wide_Character'Val (238), Wide_Wide_Character'Val (161), Wide_Wide_Character'Val (236), Wide_Wide_Character'Val (8465), Wide_Wide_Character'Val (8734), Wide_Wide_Character'Val (8747), Wide_Wide_Character'Val (953), Wide_Wide_Character'Val (191), Wide_Wide_Character'Val (8712), Wide_Wide_Character'Val (239), Wide_Wide_Character'Val (954), Wide_Wide_Character'Val (8656), Wide_Wide_Character'Val (955), Wide_Wide_Character'Val (9001), Wide_Wide_Character'Val (171), Wide_Wide_Character'Val (8592), Wide_Wide_Character'Val (8968), Wide_Wide_Character'Val (8220), Wide_Wide_Character'Val (8804), Wide_Wide_Character'Val (8970), Wide_Wide_Character'Val (8727), Wide_Wide_Character'Val (9674), Wide_Wide_Character'Val (8206), Wide_Wide_Character'Val (8249), Wide_Wide_Character'Val (8216), Wide_Wide_Character'Val (60), Wide_Wide_Character'Val (175), Wide_Wide_Character'Val (8212), Wide_Wide_Character'Val (181), Wide_Wide_Character'Val (183), Wide_Wide_Character'Val (8722), Wide_Wide_Character'Val (956), Wide_Wide_Character'Val (8711), Wide_Wide_Character'Val (160), Wide_Wide_Character'Val (8211), Wide_Wide_Character'Val (8800), Wide_Wide_Character'Val (8715), Wide_Wide_Character'Val (172), Wide_Wide_Character'Val (8713), Wide_Wide_Character'Val (8836), Wide_Wide_Character'Val (241), Wide_Wide_Character'Val (957), Wide_Wide_Character'Val (243), Wide_Wide_Character'Val (244), Wide_Wide_Character'Val (339), Wide_Wide_Character'Val (242), Wide_Wide_Character'Val (8254), Wide_Wide_Character'Val (969), Wide_Wide_Character'Val (959), Wide_Wide_Character'Val (8853), Wide_Wide_Character'Val (8744), Wide_Wide_Character'Val (170), Wide_Wide_Character'Val (186), Wide_Wide_Character'Val (248), Wide_Wide_Character'Val (245), Wide_Wide_Character'Val (8855), Wide_Wide_Character'Val (246), Wide_Wide_Character'Val (182), Wide_Wide_Character'Val (8706), Wide_Wide_Character'Val (8240), Wide_Wide_Character'Val (8869), Wide_Wide_Character'Val (966), Wide_Wide_Character'Val (960), Wide_Wide_Character'Val (982), Wide_Wide_Character'Val (177), Wide_Wide_Character'Val (163), Wide_Wide_Character'Val (8242), Wide_Wide_Character'Val (8719), Wide_Wide_Character'Val (8733), Wide_Wide_Character'Val (968), Wide_Wide_Character'Val (34), Wide_Wide_Character'Val (8658), Wide_Wide_Character'Val (8730), Wide_Wide_Character'Val (9002), Wide_Wide_Character'Val (187), Wide_Wide_Character'Val (8594), Wide_Wide_Character'Val (8969), Wide_Wide_Character'Val (8221), Wide_Wide_Character'Val (8476), Wide_Wide_Character'Val (174), Wide_Wide_Character'Val (8971), Wide_Wide_Character'Val (961), Wide_Wide_Character'Val (8207), Wide_Wide_Character'Val (8250), Wide_Wide_Character'Val (8217), Wide_Wide_Character'Val (8218), Wide_Wide_Character'Val (353), Wide_Wide_Character'Val (8901), Wide_Wide_Character'Val (167), Wide_Wide_Character'Val (173), Wide_Wide_Character'Val (963), Wide_Wide_Character'Val (962), Wide_Wide_Character'Val (8764), Wide_Wide_Character'Val (9824), Wide_Wide_Character'Val (8834), Wide_Wide_Character'Val (8838), Wide_Wide_Character'Val (8721), Wide_Wide_Character'Val (8835), Wide_Wide_Character'Val (185), Wide_Wide_Character'Val (178), Wide_Wide_Character'Val (179), Wide_Wide_Character'Val (8839), Wide_Wide_Character'Val (223), Wide_Wide_Character'Val (964), Wide_Wide_Character'Val (8756), Wide_Wide_Character'Val (952), Wide_Wide_Character'Val (977), Wide_Wide_Character'Val (8201), Wide_Wide_Character'Val (254), Wide_Wide_Character'Val (732), Wide_Wide_Character'Val (215), Wide_Wide_Character'Val (8482), Wide_Wide_Character'Val (8657), Wide_Wide_Character'Val (250), Wide_Wide_Character'Val (8593), Wide_Wide_Character'Val (251), Wide_Wide_Character'Val (249), Wide_Wide_Character'Val (168), Wide_Wide_Character'Val (978), Wide_Wide_Character'Val (965), Wide_Wide_Character'Val (252), Wide_Wide_Character'Val (8472), Wide_Wide_Character'Val (958), Wide_Wide_Character'Val (253), Wide_Wide_Character'Val (165), Wide_Wide_Character'Val (255), Wide_Wide_Character'Val (950), Wide_Wide_Character'Val (8205), Wide_Wide_Character'Val (8204)); end Wiki.Parsers.Html.Entities;
src/transition.asm
SlyryD/Beta-Quest
1
14261
<filename>src/transition.asm<gh_stars>1-10 .org 0x8009A2B0 .area (0x8009A340 - 0x8009A2B0), 0 //a0 = Global Context //a1 = screen transition effect addiu sp, sp, 0xFFE0 sw ra, 0x0014(sp) sw a0, 0x0020(sp) andi t0, a1, -2 //drop least significant bit so that we can test for 0x0E and 0x0F li at, 0x000E //sandstorm effect bne t0, at, @skip_check sw a1, 0x0024(sp) b @check_if_object_loaded nop @return_check_if_object_loaded: bgez v0, @skip_check li at, 0x04 //replacement transition effect sw at, 0x0024(sp) @skip_check: lw a2, 0x0020(sp) li at, 0x121C8 addu a0, a2, at sw a0, 0x0018(sp) jal 0x80002E80 addiu a1, r0, 0x0250 //replacement lw v0, 0x0024(sp) lw a0, 0x0018(sp) lw a2, 0x0020(sp) addiu at, r0, 0x0001 sra t6, v0, 5 bne t6, at, @b_0x8009A368 sw v0, 0x0228(a0) lui at, 0x800A addiu t7, at, 0x8DEC addiu t8, at, 0x8E18 addiu t9, at, 0x8C00 addiu t0, at, 0x9244 addiu t1, at, 0x8FA8 addiu t2, at, 0x8E24 addiu t3, at, 0x9250 addiu t4, at, 0x92A8 addiu t5, at, 0x92B4 .endarea .org 0x8009A368 @b_0x8009A368: .org 0x8009A390 .area (0x8009A3D0 - 0x8009A390), 0 @check_if_object_loaded: li at, 0x117A4 //object table addu a0, a0, at jal 0x80081628 //check if object file is loaded addiu a1, r0, 0x02 //gameplay_field_keep b @return_check_if_object_loaded nop @transition_0_jump: lui at, 0x800A addiu t7, at, 0x8218 addiu t8, at, 0x82B8 addiu t9, at, 0x81E0 addiu t0, at, 0x8700 addiu t1, at, 0x83FC addiu t2, at, 0x82C4 addiu t3, at, 0x83E4 addiu t4, at, 0x83D8 .endarea .org 0x80108CEC .word @transition_0_jump
code/datastudio/src/org.opengauss.mppdbide.parser/src/org/opengauss/mppdbide/parser/grammar/PostgresLexer.g4
opengauss-mirror/DataStudio
0
5847
<filename>code/datastudio/src/org.opengauss.mppdbide.parser/src/org/opengauss/mppdbide/parser/grammar/PostgresLexer.g4 lexer grammar PostgresLexer; @header { package org.opengauss.mppdbide.parser.grammar; } /* ordinary key words in alphabetical order */ ABORT_P : A B O R T; ABSOLUTE_P : A B S O L U T E; ACCESS : A C C E S S; ACCOUNT : A C C O U N T; ACTION : A C T I O N; ADD_P : A D D; ADMIN : A D M I N; AFTER : A F T E R; AGGREGATE : A G G R E G A T E; ALL : A L L; ALSO : A L S O; ALTER : A L T E R; ALWAYS : A L W A Y S; ANALYSE : A N A L Y S E; ANALYZE : A N A L Y Z E; AND : A N D; ANOYBLOCK : A N O Y B L O C K; ANY : A N Y; APP : A P P; ARRAY : A R R A Y; AS : A S; ASC : A S C; ASSERTION : A S S E R T I O N; ASSIGNMENT : A S S I G N M E N T; ASYMMETRIC : A S Y M M E T R I C; AT : A T; ATTRIBUTE : A T T R I B U T E; AUTHID : A U T H I D; AUTHORIZATION : A U T H O R I Z A T I O N; AUTOEXTEND : A U T O E X T E N D; AUTOMAPPED : A U T O M A P P E D; BACKWARD : B A C K W A R D; BARRIER : B A R R I E R; BEFORE : B E F O R E; BEGIN_P : B E G I N; BETWEEN : B E T W E E N; BIGINT : B I G I N T; BINARY : B I N A R Y; BINARY_DOUBLE : B I N A R Y UNDERSCORE D O U B L E; BINARY_INTEGER : B I N A R Y UNDERSCORE I N T E G E R; BIT : B I T; BLOB_P : B L O B; BODY : B O D Y; BOGUS : B O G U S; BOOLEAN_P : B O O L E A N; BOTH : B O T H; BUCKETS : B U C K E T S; BY : B Y; CACHE : C A C H E; CALL : C A L L; CALLED : C A L L E D; CASCADE : C A S C A D E; CASCADED : C A S C A D E D; CASE : C A S E; CAST : C A S T; CATALOG_P : C A T A L O G; CHAIN : C H A I N; CHAR_P : C H A R; CHARACTER : C H A R A C T E R; CHARACTERISTICS : C H A R A C T E R I S T I C S; CHECK : C H E C K; CHECKPOINT : C H E C K P O I N T; CLASS : C L A S S; CLEAN : C L E A N; CLOB : C L O B; CLOSE : C L O S E; CLUSTER : C L U S T E R; COALESCE : C O A L E S C E; COLLATE : C O L L A T E; COLLATION : C O L L A T I O N; COLUMN : C O L U M N; COMMENT : C O M M E N T; COMMENTS : C O M M E N T S; COMMIT : C O M M I T; COMMITTED : C O M M I T T E D; COMPACT : C O M P A C T; COMPATIBLE_ILLEGAL_CHARS : C O M P A T I B L E UNDERSCORE I L L E G A L UNDERSCORE C H A R S; COMPRESS : C O M P R E S S; CONCURRENTLY : C O N C U R R E N T L Y; CONFIGURATION : C O N F I G U R A T I O N; CONNECTION : C O N N E C T I O N; CONSTRAINT : C O N S T R A I N T; CONSTRAINTS : C O N S T R A I N T S; CONTENT_P : C O N T E N T; CONTINUE_P : C O N T I N U E; CONVERSION_P : C O N V E R S I O N; COORDINATOR : C O O R D I N A T O R; COPY : C O P Y; COST : C O S T; CREATE : C R E A T E; CROSS : C R O S S; CSV : C S V; CUBE : C U B E; CURRENT_P : C U R R E N T; CURRENT_CATALOG : C U R R E N T UNDERSCORE C A T A L O G; CURRENT_DATE : C U R R E N T UNDERSCORE D A T E; CURRENT_ROLE : C U R R E N T UNDERSCORE R O L E; CURRENT_SCHEMA : C U R R E N T UNDERSCORE S C H E M A; CURRENT_TIME : C U R R E N T UNDERSCORE T I M E; CURRENT_TIMESTAMP : C U R R E N T UNDERSCORE T I M E S T A M P; CURRENT_USER : C U R R E N T UNDERSCORE U S E R; CURSOR : C U R S O R; CYCLE : C Y C L E; DATA_P : D A T A; DATABASE : D A T A B A S E; DATAFILE : D A T A F I L E; DATE_P : D A T E; DATE_FORMAT_P : D A T E UNDERSCORE F O R M A T; DAY_P : D A Y; DBCOMPATIBILITY_P : D B C O M P A T I B I L I T Y; DEALLOCATE : D E A L L O C A T E; DEC : D E C; DECIMAL_P : D E C I M A L; DECLARE : D E C L A R E; DECODE : D E C O D E; DEFAULT : D E F A U L T; DEFAULTS : D E F A U L T S; DEFERRABLE : D E F E R R A B L E; DEFERRED : D E F E R R E D; DEFINER : D E F I N E R; DELETE_P : D E L E T E; DELIMITER : D E L I M I T E R; DELIMITERS : D E L I M I T E R S; DELTA : D E L T A; DELTAMERGE : D E L T A M E R G E; DESC : D E S C; DETERMINISTIC : D E T E R M I N I S T I C; DICTIONARY : D I C T I O N A R Y; DIRECT : D I R E C T; DISABLE_P : D I S A B L E; DISCARD : D I S C A R D; DISTINCT : D I S T I N C T; DISTRIBUTE : D I S T R I B U T E; DISTRIBUTION : D I S T R I B U T I O N; DO : D O; DOCUMENT_P : D O C U M E N T; DOMAIN_P : D O M A I N; DOUBLE_P : D O U B L E; DROP : D R O P; EACH : E A C H; ELSE : E L S E; ENABLE_P : E N A B L E; ENCODING : E N C O D I N G; ENCRYPTED : E N C R Y P T E D; END_P : E N D; ENFORCED : E N F O R C E D; ENUM_P : E N U M; ESCAPE : E S C A P E; EOL : E O L; ESCAPING : E S C A P I N G; EXCEPT : E X C E P T; EXCHANGE : E X C H A N G E; EXCLUDE : E X C L U D E; EXCLUDING : E X C L U D I N G; EXCLUSIVE : E X C L U S I V E; EXECUTE : E X E C U T E; EXISTS : E X I S T S; EXPLAIN : E X P L A I N; EXTENSION : E X T E N S I O N; EXTERNAL : E X T E R N A L; EXTRACT : E X T R A C T; FALSE_P : F A L S E; FAMILY : F A M I L Y; FETCH : F E T C H; FILEHEADER_P : F I L E H E A D E R; FIRST_P : F I R S T; FIXED_P : F I X E D; FLOAT_P : F L O A T; FOLLOWING : F O L L O W I N G; FOR : F O R; FORCE : F O R C E; FOREIGN : F O R E I G N; FORMATTER : F O R M A T T E R; FORWARD : F O R W A R D; FREEZE : F R E E Z E; FROM : F R O M; FULL : F U L L; FUNCTION : F U N C T I O N; FUNCTIONS : F U N C T I O N S; GLOBAL : G L O B A L; GRANT : G R A N T; GRANTED : G R A N T E D; GREATEST : G R E A T E S T; GROUP_P : G R O U P; GROUPING_P : G R O U P I N G; HANDLER : H A N D L E R; HAVING : H A V I N G; HDFSDIRECTORY : H D F S D I R E C T O R Y; HEADER_P : H E A D E R; HOLD : H O L D; HOUR_P : H O U R; IDENTIFIED : I D E N T I F I E D; IDENTITY_P : I D E N T I T Y; IF_P : I F; IGNORE_EXTRA_DATA : I G N O R E UNDERSCORE E X T R A UNDERSCORE D A T A; ILIKE : I L I K E; IMMEDIATE : I M M E D I A T E; IMMUTABLE : I M M U T A B L E; IMPLICIT_P : I M P L I C I T; IN_P : I N; INCLUDING : I N C L U D I N G; INCREMENT : I N C R E M E N T; INDEX : I N D E X; INDEXES : I N D E X E S; INHERIT : I N H E R I T; INHERITS : I N H E R I T S; INITIAL_P : I N I T I A L; INITIALLY : I N I T I A L L Y; INITRANS : I N I T R A N S; INLINE_P : I N L I N E; INNER_P : I N N E R; INOUT : I N O U T; INPUT_P : I N P U T; INSENSITIVE : I N S E N S I T I V E; INSERT : I N S E R T; INSTEAD : I N S T E A D; INT_P : I N T; INTEGER : I N T E G E R; INTERSECT : I N T E R S E C T; INTERVAL : I N T E R V A L; INTO : I N T O; INVOKER : I N V O K E R; IS : I S; ISNULL : I S N U L L; ISOLATION : I S O L A T I O N; JOIN : J O I N; KEY : K E Y; LABEL : L A B E L; LANGUAGE : L A N G U A G E; LARGE_P : L A R G E; LAST_P : L A S T; LC_COLLATE_P : L C UNDERSCORE C O L L A T E; LC_CTYPE_P : L C UNDERSCORE C T Y P E; LEADING : L E A D I N G; LEAKPROOF : L E A K P R O O F; LEAST : L E A S T; LESS : L E S S; LEFT : L E F T; LEVEL : L E V E L; LIKE : L I K E; LIMIT : L I M I T; LISTEN : L I S T E N; LOAD : L O A D; LOCAL : L O C A L; LOCALTIME : L O C A L T I M E; LOCALTIMESTAMP : L O C A L T I M E S T A M P; LOCATION : L O C A T I O N; LOCK_P : L O C K; LOG_P : L O G; LOGGING : L O G G I N G; LOOP : L O O P; MAPPING : M A P P I N G; MATCH : M A T C H; MAXEXTENTS : M A X E X T E N T S; MAXSIZE : M A X S I Z E; MAXTRANS : M A X T R A N S; MAXVALUE : M A X V A L U E; MERGE : M E R G E; MINUS_P : M I N U S; MINUTE_P : M I N U T E; MINVALUE : M I N V A L U E; MINEXTENTS : M I N E X T E N T S; MODE : M O D E; MODIFY_P : M O D I F Y; MONTH_P : M O N T H; MOVE : M O V E; MOVEMENT : M O V E M E N T; NAME_P : N A M E; NAMES : N A M E S; NATIONAL : N A T I O N A L; NATURAL : N A T U R A L; NCHAR : N C H A R; NEXT : N E X T; NLSSORT : N L S S O R T; NO : N O; NOCOMPRESS : N O C O M P R E S S; NOCYCLE : N O C Y C L E; NODE : N O D E; NOLOGGING : N O L O G G I N G; NOMAXVALUE : N O M A X V A L U E; NOMINVALUE : N O M I N V A L U E; NON : N O N; NONE : N O N E; NOT : N O T; NOTHING : N O T H I N G; NOTIFY : N O T I F Y; NOTNULL : N O T N U L L; NOWAIT : N O W A I T; NULL_P : N U L L; NULLIF : N U L L I F; NULLS_P : N U L L S; NUMBER_P : N U M B E R; NUMERIC : N U M E R I C; NUMSTR : N U M S T R; NVARCHAR2 : N V A R C H A R '2'; NVL : N V L; OBJECT_P : O B J E C T; OF : O F; OFF : O F F; OFFSET : O F F S E T; OIDS : O I D S; ON : O N; ONLY : O N L Y; OPERATOR : O P E R A T O R; OPTIMIZATION : O P T I M I Z A T I O N; OPTION : O P T I O N; OPTIONS : O P T I O N S; OR : O R; ORDER : O R D E R; OUT_P : O U T; OUTER_P : O U T E R; OVER : O V E R; OVERLAPS : O V E R L A P S; OVERLAY : O V E R L A Y; OWNED : O W N E D; OWNER : O W N E R; PARSER : P A R S E R; PARTIAL : P A R T I A L; PARTITION : P A R T I T I O N; PARTITIONS : P A R T I T I O N S; PASSING : P A S S I N G; PASSWORD : <NAME>; PCTFREE : P C T F R E E; PER_P : P E R; PERCENT : P E R C E N T; PERFORMANCE : P E R F O R M A N C E; PERM : P E R M; PLACING : P L A C I N G; PLANS : P L A N S; POSITION : P O S I T I O N; POOL : P O O L; PRECEDING : P R E C E D I N G; PRECISION : P R E C I S I O N; PREFERRED : P R E F E R R E D; PREFIX : P R E F I X; PRESERVE : P R E S E R V E; PREPARE : P R E P A R E; PREPARED : P R E P A R E D; PRIMARY : P R I M A R Y; PRIOR : P R I O R; PRIVILEGES : P R I V I L E G E S; PRIVILEGE : P R I V I L E G E; PROCEDURAL : P R O C E D U R A L; PROCEDURE : P R O C E D U R E; PACKAGE : P A C K A G E; PROFILE : P R O F I L E; QUERY : Q U E R Y; QUOTE : Q U O T E; RANGE : R A N G E; RAW : R A W; READ : R E A D; REAL : R E A L; REASSIGN : R E A S S I G N; REBUILD : R E B U I L D; RECHECK : R E C H E C K; RECURSIVE : R E C U R S I V E; REF : R E F; REFERENCES : R E F E R E N C E S; REINDEX : R E I N D E X; REJECT_P : R E J E C T; RELATIVE_P : R E L A T I V E; RELEASE : R E L E A S E; RELOPTIONS : R E L O P T I O N S; REMOTE_P : R E M O T E; RENAME : R E N A M E; REPEATABLE : R E P E A T A B L E; REPLACE : R E P L A C E; REPLICA : R E P L I C A; RESET : R E S E T; RESIZE : R E S I Z E; RESOURCE : R E S O U R C E; RESTART : R E S T A R T; RESTRICT : R E S T R I C T; RETURN : R E T U R N; RETURNING : R E T U R N I N G; RETURNS : R E T U R N S; REUSE : R E U S E; REVOKE : R E V O K E; RIGHT : R I G H T; ROLE : R O L E; ROLLBACK : R O L L B A C K; ROLLUP : R O L L U P; ROW : R O W; ROWS : R O W S; RULE : R U L E; SAVEPOINT : S A V E P O I N T; SCHEMA : S C H E M A; SCROLL : S C R O L L; SEARCH : S E A R C H; SECOND_P : S E C O N D; SECURITY : S E C U R I T Y; SELECT : S E L E C T; SEQUENCE : S E Q U E N C E; SEQUENCES : S E Q U E N C E S; SERIALIZABLE : S E R I A L I Z A B L E; SERVER : S E R V E R; SESSION : S E S S I O N; SESSION_USER : S E S S I O N UNDERSCORE U S E R; SET : S E T; SETS : S E T S; SETOF : S E T O F; SHARE : S H A R E; SHOW : S H O W; SIMILAR : S I M I L A R; SIMPLE : S I M P L E; SIZE : S I Z E; SMALLDATETIME : S M A L L D A T E T I M E; SMALLDATETIME_FORMAT_P : S M A L L D A T E T I M E UNDERSCORE F O R M A T; SMALLINT : S M A L L I N T; SNAPSHOT : S N A P S H O T; SOME : S O M E; SPACE : S P A C E; SPLIT : S P L I T; STABLE : S T A B L E; STANDALONE_P : S T A N D A L O N E; START : S T A R T; STATEMENT : S T A T E M E N T; STATISTICS : S T A T I S T I C S; STDIN : S T D I N; STDOUT : S T D O U T; STORAGE : S T O R A G E; STORE_P : S T O R E; STRICT_P : S T R I C T; STRIP_P : S T R I P; SUBSTRING : S U B S T R I N G; SYMMETRIC : S Y M M E T R I C; SYSDATE : S Y S D A T E; SYSID : S Y S I D; SYSTEM_P : S Y S T E M; SYS_REFCURSOR : S Y S UNDERSCORE R E F C U R S O R; TABLE : T A B L E; TABLES : T A B L E S; TABLESPACE : T A B L E S P A C E; TEMP : T E M P; TEMPLATE : T E M P L A T E; TEMPORARY : T E M P O R A R Y; TEXT_P : T E X T; THAN : T H A N; THEN : T H E N; TIME : T I M E; TIME_FORMAT_P : T I M E UNDERSCORE F O R M A T; TIMESTAMP : T I M E S T A M P; TIMESTAMP_FORMAT_P : T I M E S T A M P UNDERSCORE F O R M A T; TINYINT : T I N Y I N T; TO : T O; TRAILING : T R A I L I N G; TRANSACTION : T R A N S A C T I O N; TREAT : T R E A T; TRIGGER : T R I G G E R; TRIM : T R I M; TRUE_P : T R U E; TRUNCATE : T R U N C A T E; TRUSTED : T R U S T E D; TYPE_P : T Y P E; TYPES_P : T Y P E S; UNBOUNDED : U N B O U N D E D; UNCOMMITTED : U N C O M M I T T E D; UNENCRYPTED : U N E N C R Y P T E D; UNION : U N I O N; UNIQUE : U N I Q U E; UNKNOWN : U N K N O W N; UNLIMITED : U N L I M I T E D; UNLISTEN : U N L I S T E N; UNLOCK : U N L O C K; UNLOGGED : U N L O G G E D; UNTIL : U N T I L; UNUSABLE : U N U S A B L E; UPDATE : U P D A T E; USER : U S E R; USING : U S I N G; VACUUM : V A C U U M; VALID : V A L I D; VALIDATE : V A L I D A T E; VALIDATION : V A L I D A T I O N; VALIDATOR : V A L I D A T O R; VALUE_P : V A L U E; VALUES : V A L U E S; VARCHAR : V A R C H A R; VARCHAR2 : V A R C H A R '2'; VARIADIC : V A R I A D I C; VARRAY : V A R R A Y; VARYING : V A R Y I N G; VERBOSE : V E R B O S E; VERSION_P : V E R S I O N; VIEW : V I E W; VOLATILE : V O L A T I L E; WHEN : W H E N; WHERE : W H E R E; WHITESPACE_P : W H I T E S P A C E; WINDOW : W I N D O W; WITH : W I T H; WITHOUT : W I T H O U T; WORK : W O R K; WORKLOAD : W O R K L O A D; WRAPPER : W R A P P E R; WRITE : W R I T E; XML_P : X M L; XMLATTRIBUTES : X M L A T T R I B U T E S; XMLCONCAT : X M L C O N C A T; XMLELEMENT : X M L E L E M E N T; XMLEXISTS : X M L E X I S T S; XMLFOREST : X M L F O R E S T; XMLPARSE : X M L P A R S E; XMLPI : X M L P I; XMLROOT : X M L R O O T; XMLSERIALIZE : X M L S E R I A L I Z E; YEAR_P : Y E A R; YES_P : Y E S; ZONE : Z O N E; /* * The grammar thinks these are keywords, but they are not in the kwlist.h * list and so can never be entered directly. The filter in parser.c * creates these tokens when required. */ NULLS_FIRST : NULLS_P T_whitespace+ FIRST_P; NULLS_LAST : NULLS_P T_whitespace+ LAST_P; WITH_TIME : WITH T_whitespace+ TIME; PARTITION_FOR : PARTITION T_whitespace+ FOR; BEGIN_NON_ANOYBLOCK : BEGIN_P T_whitespace+ NON T_whitespace+ ANOYBLOCK; T_TYPECAST : '::'; T_PARAM : '$' T_integer; T_COLON_EQUALS : ':='; T_PARA_EQUALS : '=>'; /* making lexer case insensitive */ fragment A:('a'|'A'); fragment B:('b'|'B'); fragment C:('c'|'C'); fragment D:('d'|'D'); fragment E:('e'|'E'); fragment F:('f'|'F'); fragment G:('g'|'G'); fragment H:('h'|'H'); fragment I:('i'|'I'); fragment J:('j'|'J'); fragment K:('k'|'K'); fragment L:('l'|'L'); fragment M:('m'|'M'); fragment N:('n'|'N'); fragment O:('o'|'O'); fragment P:('p'|'P'); fragment Q:('q'|'Q'); fragment R:('r'|'R'); fragment S:('s'|'S'); fragment T:('t'|'T'); fragment U:('u'|'U'); fragment V:('v'|'V'); fragment W:('w'|'W'); fragment X:('x'|'X'); fragment Y:('y'|'Y'); fragment Z:('z'|'Z'); fragment UNDERSCORE: '_'; /* common symbols used in parser grammar */ T_LEFTBRACKET : '('; T_RIGHTBRACKET : ')'; T_LEFT_SQBRACKET : '['; T_RIGHT_SQBRACKET : ']'; T_COMMA : ','; T_EQUALS : '='; T_COLON : ':'; T_PLUS : '+'; T_MINUS : '-'; T_PRODUCT : '*'; T_DIVIDE : '/'; T_MODULO : '%'; T_EXPONENT : '^'; T_LESSTHAN : '<'; T_GREATERTHAN : '>'; T_DOT : '.'; T_SEMICOLON : ';'; LESS_LESS : '<<'; GREATER_GREATER : '>>'; DOT_DOT : '..' ; SCONST : XQString | XNString | XEString | XDOLQString ; BCONST : XBString; XCONST : XHString; IDENT : '`'? XDQString '`'? | XUIString | IDENT_START IDENT_CONT* | OLTP_IDENT | IDENT_START_SPC T_space* | IDENT_START_SPC IDENT_CONT* ; PARAM : '$' T_integer ; FCONST : T_real | T_decimal; ICONST : T_integer; fragment OP_SIMPLE : ( '<' | '>' | '=' | '/' { _input.LA(1) != '*' }? | '*' )+ ; fragment OP_MINUS : '-' { _input.LA(1) != '-' }? ; fragment OP_PLUS : '+' ; fragment OP_PLUSMINUS : ( OP_PLUS | OP_MINUS ) ; fragment OP_COMPLEX : [~!@#%&|`?^]+ ; fragment OP_WITH_COMPLEX : ( OP_PLUSMINUS | OP_SIMPLE )* OP_COMPLEX ( OP_PLUSMINUS | OP_SIMPLE | OP_COMPLEX )* ; fragment OP_WITHOUT_COMPLEX : ( OP_SIMPLE | OP_PLUSMINUS )* OP_SIMPLE ; Op : ( OP_WITHOUT_COMPLEX | OP_WITH_COMPLEX | OP_PLUSMINUS ) ; /** Line comment */ T_comment : '--' ( ~[\n\r] )* -> channel(HIDDEN); /** C-style comments */ T_ccomment : '/*' ( T_ccomment | . )*? '*/' -> channel(HIDDEN); T_space : [ \t\n\r\f] -> channel(HIDDEN); T_newline : [\n\r] -> channel(HIDDEN); T_whitespace : ( T_space+ | T_comment ) -> channel(HIDDEN); /** Numbers */ fragment T_real : ( T_integer | T_decimal ) [Ee] [-+]? DIGIT+ ; fragment T_decimal : ( ( DIGIT* '.' DIGIT+ ) | ( DIGIT+ '.' DIGIT* ) ) ; fragment T_integer : DIGIT+ ; /* * SQL requires at least one newline in the whitespace separating * string literals that are to be concatenated. Silly, but who are we * to argue? Note that {whitespace_with_newline} should not have * after * it, whereas {whitespace} should generally have a * after it... */ T_special_whitespace : ( T_space+ | T_comment T_newline) -> channel(HIDDEN); T_horiz_whitespace : (T_horiz_space | T_comment) -> channel(HIDDEN); T_whitespace_with_newline : T_horiz_whitespace* T_newline T_special_whitespace* -> channel(HIDDEN); T_horiz_space : [ \t\f] -> channel(HIDDEN); /* * To ensure that {quotecontinue} can be scanned without having to back up * if the full pattern isn't matched, we include trailing whitespace in * {quotestop}. This matches all cases where {quotecontinue} fails to match, * except for {quote} followed by whitespace and just one "-" (not two, * which would start a {comment}). To cover that we have {quotefail}. * The actions for {quotestop} and {quotefail} must throw back characters * beyond the quote proper. */ fragment T_quote : '\'' ; fragment T_nonquote : ~'\''+ ; fragment T_xeinside : ~[\\']+ ; fragment T_quotecontinue : T_quote T_whitespace_with_newline T_quote ; fragment T_xqdouble : T_quote T_quote ; fragment OLTP_IDENT : '`' (T_dquote | T_nondquote)+ '`'; /** Quoted string */ fragment XQString : T_quote ( T_xqdouble | T_quotecontinue | T_nonquote )* T_quote ; /** Binary string number */ fragment XBString : B T_quote ( T_quotecontinue | [01]+ )* T_quote ; /** Hexadecimal number */ fragment XHString : X T_quote ( T_quotecontinue | HDIGIT+ )* T_quote ; /** National character */ fragment XNString : N XQString ; /* Quoted string that allows backslash escapes */ fragment XEString : E T_quote ( T_xqdouble | T_quotecontinue | '\\' ( 'x' ( HDIGIT HDIGIT? ) // hex | ( 'u' HDIGIT HDIGIT HDIGIT HDIGIT | 'U' HDIGIT HDIGIT HDIGIT HDIGIT HDIGIT HDIGIT HDIGIT HDIGIT ) // unicode | NOT_ODIGIT // escape | ( ODIGIT ODIGIT ODIGIT | ODIGIT ODIGIT | ODIGIT ) // octets ) // escapes | T_xeinside )* T_quote ; fragment DIGIT : [0-9] ; fragment ODIGIT : [0-7] ; fragment NOT_ODIGIT : ~[0-7] ; fragment HDIGIT : [0-9A-Fa-f] ; /* $foo$ style quotes ("dollar quoting") * The quoted string starts with $foo$ where "foo" is an optional string * in the form of an identifier, except that it may not contain "$", * and extends to the first occurrence of an identical string. * There is *no* processing of the quoted text. * * {dolqfailed} is an error rule to avoid scanner backup when {dolqdelim} * fails to match its trailing "$". */ fragment XDOLQString : '$$' .*? '$$' | '$BODY$' .*? '$BODY$' // this is a hack until the $$ string is implemented | '$function$' .*? '$function$' ; //support unicode characters fragment IDENT_START_SPC : [`~{}@#$%/\\^&|:-] ; fragment IDENT_START : [A-Za-z] | ~[\u0000-\u007F\uD800-\uDBFF] | [\uD800-\uDBFF] [\uDC00-\uDFFF]; fragment IDENT_CONT : [A-Za-z0-9$_] | ~[\u0000-\u007F\uD800-\uDBFF] | [\uD800-\uDBFF] [\uDC00-\uDFFF] ; /* Double quote * Allows embedded spaces and other special characters into identifiers. */ /* * Gauss when has two double quotes inside a double quoted string, it takes it as one double quote. * i.e "Hello""World" = "Hello"World" * so the simple XDQString has been replaced with a new rule. */ /*fragment XDQString : T_dquote ( T_xddouble | T_nondquote )*? T_dquote ;*/ fragment XDQString : T_dquote ( '""' | T_nondquote )* T_dquote { String s = getText(); s = s.substring(1, s.length() - 1); // strip the leading and trailing quotes s = s.replace("\"\"", "\""); // replace all double quotes with single quotes setText(s); } ; fragment T_dquote : '"' ; fragment T_nondquote : ~'"'+ ; fragment T_xddouble : T_dquote T_dquote ; /* Unicode escapes */ fragment T_uescape : U E S C A P E T_whitespace* T_quote T_nondquote*? T_quote ; fragment XUIString : U '&' XDQString ( T_whitespace* T_uescape )? ; PSQL_COMMAND : '\\' ( ~[\n\r] )*; ErrorChar : . ;
ejercicios4/rellenar_aula_1.adb
iyan22/AprendeAda
0
1526
<gh_stars>0 with copia_examenes; use copia_examenes; procedure rellenar_aula_1 (Aula_1: out T_Aula) is begin --Rellenar el aula_1 fila 1 ------------------------------- aula_1(1,1).Ocupada:=True; Aula_1(1,1).Ident:=111; Aula_1(1,1).Ex.Num_palabras_diferentes:=5; --rellenando_las palabras y sus frecuencias --0123456789 Aula_1(1,1).Ex.Palabras(1).Palabra:="I "; Aula_1(1,1).Ex.Palabras(1).n_apariciones:=4; Aula_1(1,1).Ex.Palabras(2).Palabra:="Indice "; Aula_1(1,1).Ex.palabras(2).n_apariciones:=5; Aula_1(1,1).Ex.Palabras(3).Palabra:="var3 "; Aula_1(1,1).Ex.palabras(3).n_apariciones:=7; Aula_1(1,1).Ex.Palabras(4).Palabra:="var5 "; Aula_1(1,1).Ex.palabras(4).n_apariciones:=9; Aula_1(1,1).Ex.Palabras(5).Palabra:="var7 "; Aula_1(1,1).Ex.palabras(5).n_apariciones:=2; aula_1(1,2).Ocupada:=true; Aula_1(1,2).Ident:=112; Aula_1(1,2).Ex.Num_palabras_diferentes:=5; --rellenando_las palabras y sus frecuencias --0123456789 Aula_1(1,2).Ex.Palabras(1).Palabra:="elem "; Aula_1(1,2).Ex.Palabras(1).n_apariciones:=7; Aula_1(1,2).Ex.Palabras(2).Palabra:="Indice2 "; Aula_1(1,2).Ex.palabras(2).n_apariciones:=5; Aula_1(1,2).Ex.Palabras(3).Palabra:="j "; Aula_1(1,2).Ex.palabras(3).n_apariciones:=9; Aula_1(1,2).Ex.Palabras(4).Palabra:="x "; Aula_1(1,2).Ex.palabras(4).n_apariciones:=2; Aula_1(1,2).Ex.Palabras(5).Palabra:="z "; Aula_1(1,2).Ex.palabras(5).n_apariciones:=2; aula_1(1,3).Ocupada:=True; Aula_1(1,3).Ident:=113; Aula_1(1,3).Ex.Num_palabras_diferentes:=5; --rellenando_las palabras y sus frecuencias --0123456789 Aula_1(1,3).Ex.Palabras(1).Palabra:="elem "; Aula_1(1,3).Ex.Palabras(1).n_apariciones:=7; Aula_1(1,3).Ex.Palabras(2).Palabra:="Indice2 "; Aula_1(1,3).Ex.palabras(2).n_apariciones:=5; Aula_1(1,3).Ex.Palabras(3).Palabra:="j "; Aula_1(1,3).Ex.palabras(3).n_apariciones:=2; Aula_1(1,3).Ex.Palabras(4).Palabra:="var3 "; Aula_1(1,3).Ex.palabras(4).n_apariciones:=9; Aula_1(1,3).Ex.Palabras(5).Palabra:="var19 "; Aula_1(1,3).Ex.palabras(5).n_apariciones:=9; aula_1(1,4).Ocupada:=True; Aula_1(1,4).Ident:=114; Aula_1(1,4).Ex.Num_palabras_diferentes:=6; --rellenando_las palabras y sus frecuencias --0123456789 Aula_1(1,4).Ex.Palabras(1).Palabra:="cont "; Aula_1(1,4).Ex.Palabras(1).n_apariciones:=2; Aula_1(1,4).Ex.Palabras(2).Palabra:="cont2 "; Aula_1(1,4).Ex.palabras(2).n_apariciones:=3; Aula_1(1,4).Ex.Palabras(3).Palabra:="j "; Aula_1(1,4).Ex.palabras(3).n_apariciones:=6; Aula_1(1,4).Ex.Palabras(4).Palabra:="w "; Aula_1(1,4).Ex.palabras(4).n_apariciones:=4; Aula_1(1,4).Ex.Palabras(5).Palabra:="z1 "; Aula_1(1,4).Ex.Palabras(5).n_apariciones:=7; Aula_1(1,4).Ex.Palabras(6).Palabra:="z5 "; Aula_1(1,4).Ex.palabras(6).n_apariciones:=3; aula_1(1,5).Ocupada:=True; Aula_1(1,5).Ident:=115; Aula_1(1,5).Ex.Num_palabras_diferentes:=6; --rellenando_las palabras y sus frecuencias --0123456789 Aula_1(1,5).Ex.Palabras(1).Palabra:="c "; Aula_1(1,5).Ex.Palabras(1).n_apariciones:=1; Aula_1(1,5).Ex.Palabras(2).Palabra:="cont2 "; Aula_1(1,5).Ex.palabras(2).n_apariciones:=2; Aula_1(1,5).Ex.Palabras(3).Palabra:="j "; Aula_1(1,5).Ex.palabras(3).n_apariciones:=6; Aula_1(1,5).Ex.Palabras(4).Palabra:="a "; Aula_1(1,5).Ex.palabras(4).n_apariciones:=4; Aula_1(1,5).Ex.Palabras(5).Palabra:="b "; Aula_1(1,5).Ex.Palabras(5).n_apariciones:=1; Aula_1(1,5).Ex.Palabras(6).Palabra:="c "; Aula_1(1,5).Ex.palabras(6).n_apariciones:=1; aula_1(1,6).Ocupada:=false; aula_1(1,7).Ocupada:=false; aula_1(1,8).Ocupada:=false; aula_1(1,9).Ocupada:=True; Aula_1(1,9).Ident:=119; Aula_1(1,9).Ex.Num_palabras_diferentes:=6; --rellenando_las palabras y sus frecuencias --0123456789 Aula_1(1,9).Ex.Palabras(1).Palabra:="cont "; Aula_1(1,9).Ex.Palabras(1).n_apariciones:=2; Aula_1(1,9).Ex.Palabras(2).Palabra:="cont2 "; Aula_1(1,9).Ex.palabras(2).n_apariciones:=3; Aula_1(1,9).Ex.Palabras(3).Palabra:="j "; Aula_1(1,9).Ex.palabras(3).n_apariciones:=6; Aula_1(1,9).Ex.Palabras(4).Palabra:="w "; Aula_1(1,9).Ex.palabras(4).n_apariciones:=4; Aula_1(1,9).Ex.Palabras(5).Palabra:="z1 "; Aula_1(1,9).Ex.Palabras(5).n_apariciones:=7; Aula_1(1,9).Ex.Palabras(6).Palabra:="z5 "; Aula_1(1,9).Ex.palabras(6).n_apariciones:=3; aula_1(1,10).Ocupada:=True; Aula_1(1,10).Ident:=1110; Aula_1(1,10).Ex.Num_palabras_diferentes:=6; --rellenando_las palabras y sus frecuencias --0123456789 Aula_1(1,10).Ex.Palabras(1).Palabra:="c "; Aula_1(1,10).Ex.Palabras(1).n_apariciones:=1; Aula_1(1,10).Ex.Palabras(2).Palabra:="cont2 "; Aula_1(1,10).Ex.palabras(2).n_apariciones:=2; Aula_1(1,10).Ex.Palabras(3).Palabra:="j "; Aula_1(1,10).Ex.palabras(3).n_apariciones:=6; Aula_1(1,10).Ex.Palabras(4).Palabra:="a "; Aula_1(1,10).Ex.palabras(4).n_apariciones:=4; Aula_1(1,10).Ex.Palabras(5).Palabra:="b "; Aula_1(1,10).Ex.Palabras(5).n_apariciones:=1; Aula_1(1,10).Ex.Palabras(6).Palabra:="c "; Aula_1(1,10).Ex.palabras(6).n_apariciones:=1; --rellenando_las palabras y sus frecuencias --Rellenar el aula_1 fila 2 ---------------------------------- aula_1(2,1).Ocupada:=true; Aula_1(2,1).Ident:=221; Aula_1(2,1).Ex.Num_palabras_diferentes:=4; --rellenando_las palabras y sus frecuencias --0123456789 Aula_1(2,1).Ex.Palabras(1).Palabra:="I "; Aula_1(2,1).Ex.Palabras(1).n_apariciones:=2; Aula_1(2,1).Ex.Palabras(2).Palabra:="Indice "; Aula_1(2,1).Ex.palabras(2).n_apariciones:=5; Aula_1(2,1).Ex.Palabras(3).Palabra:="var3 "; Aula_1(2,1).Ex.palabras(3).n_apariciones:=7; Aula_1(2,1).Ex.Palabras(4).Palabra:="var5 "; Aula_1(2,1).Ex.palabras(4).n_apariciones:=9; -- aula_1(2,2).Ocupada:=True; Aula_1(2,2).Ident:=222; Aula_1(2,2).Ex.Num_palabras_diferentes:=4; --rellenando_las palabras y sus frecuencias --0123456789 Aula_1(2,2).Ex.Palabras(1).Palabra:="elem "; Aula_1(2,2).Ex.Palabras(1).n_apariciones:=2; Aula_1(2,2).Ex.Palabras(2).Palabra:="Indice2 "; Aula_1(2,2).Ex.palabras(2).n_apariciones:=5; Aula_1(2,2).Ex.Palabras(3).Palabra:="j "; Aula_1(2,2).Ex.palabras(3).n_apariciones:=9; Aula_1(2,2).Ex.Palabras(4).Palabra:="x "; Aula_1(2,2).Ex.palabras(4).n_apariciones:=7; aula_1(2,3).Ocupada:=True; Aula_1(2,3).Ident:=223; Aula_1(2,3).Ex.Num_palabras_diferentes:=5; --rellenando_las palabras y sus frecuencias --0123456789 Aula_1(2,3).Ex.Palabras(1).Palabra:="elem "; Aula_1(2,3).Ex.Palabras(1).n_apariciones:=7; Aula_1(2,3).Ex.Palabras(2).Palabra:="Indice2 "; Aula_1(2,3).Ex.palabras(2).n_apariciones:=5; Aula_1(2,3).Ex.Palabras(3).Palabra:="j "; Aula_1(2,3).Ex.palabras(3).n_apariciones:=2; Aula_1(2,3).Ex.Palabras(4).Palabra:="var3 "; Aula_1(2,3).Ex.palabras(4).n_apariciones:=9; Aula_1(2,3).Ex.Palabras(5).Palabra:="var19 "; Aula_1(2,3).Ex.palabras(5).n_apariciones:=9; aula_1(2,4).Ocupada:=false; aula_1(2,4).Ocupada:=false; aula_1(2,4).Ocupada:=false; aula_1(2,5).Ocupada:=True; Aula_1(2,5).Ident:=225; Aula_1(2,5).Ex.Num_palabras_diferentes:=6; --rellenando_las palabras y sus frecuencias --0123456789 Aula_1(2,5).Ex.Palabras(1).Palabra:="cont "; Aula_1(2,5).Ex.Palabras(1).n_apariciones:=2; Aula_1(2,5).Ex.Palabras(2).Palabra:="cont2 "; Aula_1(2,5).Ex.palabras(2).n_apariciones:=5; Aula_1(2,5).Ex.Palabras(3).Palabra:="j "; Aula_1(2,5).Ex.palabras(3).n_apariciones:=5; Aula_1(2,5).Ex.Palabras(4).Palabra:="w "; Aula_1(2,5).Ex.palabras(4).n_apariciones:=4; Aula_1(2,5).Ex.Palabras(5).Palabra:="z1 "; Aula_1(2,5).Ex.Palabras(5).n_apariciones:=4; Aula_1(2,5).Ex.Palabras(6).Palabra:="z5 "; Aula_1(2,5).Ex.palabras(6).n_apariciones:=3; aula_1(2,6).Ocupada:=True; Aula_1(2,6).Ident:=226; Aula_1(2,6).Ex.Num_palabras_diferentes:=6; --rellenando_las palabras y sus frecuencias --0123456789 Aula_1(2,6).Ex.Palabras(1).Palabra:="c "; Aula_1(2,6).Ex.Palabras(1).n_apariciones:=2; Aula_1(2,6).Ex.Palabras(2).Palabra:="cont2 "; Aula_1(2,6).Ex.palabras(2).n_apariciones:=2; Aula_1(2,6).Ex.Palabras(3).Palabra:="j "; Aula_1(2,6).Ex.palabras(3).n_apariciones:=5; Aula_1(2,6).Ex.Palabras(4).Palabra:="f "; Aula_1(2,6).Ex.palabras(4).n_apariciones:=5; Aula_1(2,6).Ex.Palabras(5).Palabra:="v "; Aula_1(2,6).Ex.Palabras(5).n_apariciones:=4; Aula_1(2,6).Ex.Palabras(6).Palabra:="z "; Aula_1(2,6).Ex.palabras(6).n_apariciones:=3; aula_1(2,7).Ocupada:=false; aula_1(2,8).Ocupada:=false; aula_1(2,9).Ocupada:=true; Aula_1(2,9).Ident:=229; Aula_1(2,9).Ex.Num_palabras_diferentes:=6; --rellenando_las palabras y sus frecuencias --0123456789 Aula_1(2,9).Ex.Palabras(1).Palabra:="c "; Aula_1(2,9).Ex.Palabras(1).n_apariciones:=5; Aula_1(2,9).Ex.Palabras(2).Palabra:="cont2 "; Aula_1(2,9).Ex.palabras(2).n_apariciones:=2; Aula_1(2,9).Ex.Palabras(3).Palabra:="j "; Aula_1(2,9).Ex.palabras(3).n_apariciones:=2; Aula_1(2,9).Ex.Palabras(4).Palabra:="f "; Aula_1(2,9).Ex.palabras(4).n_apariciones:=2; Aula_1(2,9).Ex.Palabras(5).Palabra:="v "; Aula_1(2,9).Ex.Palabras(5).n_apariciones:=4; Aula_1(2,9).Ex.Palabras(6).Palabra:="z "; Aula_1(2,9).Ex.palabras(6).n_apariciones:=3; aula_1(2,10).Ocupada:=True; Aula_1(2,10).Ident:=2210; Aula_1(2,10).Ex.Num_palabras_diferentes:=6; --rellenando_las palabras y sus frecuencias --0123456789 Aula_1(2,10).Ex.Palabras(1).Palabra:="c "; Aula_1(2,10).Ex.Palabras(1).n_apariciones:=2; Aula_1(2,10).Ex.Palabras(2).Palabra:="cont3 "; Aula_1(2,10).Ex.palabras(2).n_apariciones:=2; Aula_1(2,10).Ex.Palabras(3).Palabra:="j "; Aula_1(2,10).Ex.palabras(3).n_apariciones:=2; Aula_1(2,10).Ex.Palabras(4).Palabra:="f "; Aula_1(2,10).Ex.palabras(4).n_apariciones:=5; Aula_1(2,10).Ex.Palabras(5).Palabra:="v "; Aula_1(2,10).Ex.Palabras(5).n_apariciones:=4; Aula_1(2,10).Ex.Palabras(6).Palabra:="z "; Aula_1(2,10).Ex.palabras(6).n_apariciones:=3; --rellenar aula_1 fila 3 ------------------------- aula_1(3,1).Ocupada:=True; Aula_1(3,1).Ident:=331; Aula_1(3,1).Ex.Num_palabras_diferentes:=5; --rellenando_las palabras y sus frecuencias --0123456789 Aula_1(3,1).Ex.Palabras(1).Palabra:="I "; Aula_1(3,1).Ex.Palabras(1).n_apariciones:=2; Aula_1(3,1).Ex.Palabras(2).Palabra:="ind "; Aula_1(3,1).Ex.palabras(2).n_apariciones:=3; Aula_1(3,1).Ex.Palabras(3).Palabra:="var3 "; Aula_1(3,1).Ex.palabras(3).n_apariciones:=7; Aula_1(3,1).Ex.Palabras(4).Palabra:="var5 "; Aula_1(3,1).Ex.palabras(4).n_apariciones:=9; Aula_1(3,1).Ex.Palabras(5).Palabra:="var7 "; Aula_1(3,1).Ex.palabras(5).n_apariciones:=2; aula_1(3,2).Ocupada:=True; Aula_1(3,2).Ident:=332; Aula_1(3,2).Ex.Num_palabras_diferentes:=5; --rellenando_las palabras y sus frecuencias --0123456789 Aula_1(3,2).Ex.Palabras(1).Palabra:="elem "; Aula_1(3,2).Ex.Palabras(1).n_apariciones:=7; Aula_1(3,2).Ex.Palabras(2).Palabra:="Indice2 "; Aula_1(3,2).Ex.palabras(2).n_apariciones:=5; Aula_1(3,2).Ex.Palabras(3).Palabra:="j "; Aula_1(3,2).Ex.palabras(3).n_apariciones:=9; Aula_1(3,2).Ex.Palabras(4).Palabra:="x "; Aula_1(3,2).Ex.palabras(4).n_apariciones:=7; Aula_1(3,2).Ex.Palabras(5).Palabra:="z "; Aula_1(3,2).Ex.palabras(5).n_apariciones:=2; aula_1(3,3).Ocupada:=True; Aula_1(3,3).Ident:=333; Aula_1(3,3).Ex.Num_palabras_diferentes:=5; --rellenando_las palabras y sus frecuencias --0123456789 Aula_1(3,3).Ex.Palabras(1).Palabra:="elem "; Aula_1(3,3).Ex.Palabras(1).n_apariciones:=7; Aula_1(3,3).Ex.Palabras(2).Palabra:="Indice2 "; Aula_1(3,3).Ex.palabras(2).n_apariciones:=5; Aula_1(3,3).Ex.Palabras(3).Palabra:="j "; Aula_1(3,3).Ex.palabras(3).n_apariciones:=2; Aula_1(3,3).Ex.Palabras(4).Palabra:="var3 "; Aula_1(3,3).Ex.palabras(4).n_apariciones:=8; Aula_1(3,3).Ex.Palabras(5).Palabra:="var19 "; Aula_1(3,3).Ex.palabras(5).n_apariciones:=9; aula_1(3,4).Ocupada:=True; Aula_1(3,4).Ident:=334; Aula_1(3,4).Ex.Num_palabras_diferentes:=6; --rellenando_las palabras y sus frecuencias --0123456789 Aula_1(3,4).Ex.Palabras(1).Palabra:="cont "; Aula_1(3,4).Ex.Palabras(1).n_apariciones:=2; Aula_1(3,4).Ex.Palabras(2).Palabra:="cont2 "; Aula_1(3,4).Ex.palabras(2).n_apariciones:=3; Aula_1(3,4).Ex.Palabras(3).Palabra:="j "; Aula_1(3,4).Ex.palabras(3).n_apariciones:=6; Aula_1(3,4).Ex.Palabras(4).Palabra:="w "; Aula_1(3,4).Ex.palabras(4).n_apariciones:=4; Aula_1(3,4).Ex.Palabras(5).Palabra:="z1 "; Aula_1(3,4).Ex.Palabras(5).n_apariciones:=8; Aula_1(3,4).Ex.Palabras(6).Palabra:="z5 "; Aula_1(3,4).Ex.palabras(6).n_apariciones:=8; aula_1(3,5).Ocupada:=True; Aula_1(3,5).Ident:=335; Aula_1(3,5).Ex.Num_palabras_diferentes:=6; --rellenando_las palabras y sus frecuencias --0123456789 Aula_1(3,5).Ex.Palabras(1).Palabra:="c "; Aula_1(3,5).Ex.Palabras(1).n_apariciones:=1; Aula_1(3,5).Ex.Palabras(2).Palabra:="cont2 "; Aula_1(3,5).Ex.palabras(2).n_apariciones:=2; Aula_1(3,5).Ex.Palabras(3).Palabra:="j "; Aula_1(3,5).Ex.palabras(3).n_apariciones:=6; Aula_1(3,5).Ex.Palabras(4).Palabra:="a "; Aula_1(3,5).Ex.palabras(4).n_apariciones:=4; Aula_1(3,5).Ex.Palabras(5).Palabra:="b "; Aula_1(3,5).Ex.Palabras(5).n_apariciones:=1; Aula_1(3,5).Ex.Palabras(6).Palabra:="c "; Aula_1(3,5).Ex.palabras(6).n_apariciones:=1; aula_1(3,6).Ocupada:=false; aula_1(3,7).Ocupada:=false; aula_1(3,8).Ocupada:=false; aula_1(3,9).Ocupada:=false; aula_1(3,10).Ocupada:=false; --rellenar aula_1 fila 4 --------------------------- aula_1(4,1).Ocupada:=True; Aula_1(4,1).Ident:=441; Aula_1(4,1).Ex.Num_palabras_diferentes:=5; --rellenando_las palabras y sus frecuencias --0123456789 Aula_1(4,1).Ex.Palabras(1).Palabra:="I "; Aula_1(4,1).Ex.Palabras(1).n_apariciones:=2; Aula_1(4,1).Ex.Palabras(2).Palabra:="Indice "; Aula_1(4,1).Ex.palabras(2).n_apariciones:=3; Aula_1(4,1).Ex.Palabras(3).Palabra:="var3 "; Aula_1(4,1).Ex.palabras(3).n_apariciones:=7; Aula_1(4,1).Ex.Palabras(4).Palabra:="var5 "; Aula_1(4,1).Ex.palabras(4).n_apariciones:=9; Aula_1(4,1).Ex.Palabras(5).Palabra:="var7 "; Aula_1(4,1).Ex.palabras(5).n_apariciones:=2; aula_1(4,2).Ocupada:=True; Aula_1(4,2).Ident:=442; Aula_1(4,2).Ex.Num_palabras_diferentes:=5; --rellenando_las palabras y sus frecuencias --0123456789 Aula_1(4,2).Ex.Palabras(1).Palabra:="elem "; Aula_1(4,2).Ex.Palabras(1).n_apariciones:=7; Aula_1(4,2).Ex.Palabras(2).Palabra:="Indice2 "; Aula_1(4,2).Ex.palabras(2).n_apariciones:=5; Aula_1(4,2).Ex.Palabras(3).Palabra:="j "; Aula_1(4,2).Ex.palabras(3).n_apariciones:=9; Aula_1(4,2).Ex.Palabras(4).Palabra:="x "; Aula_1(4,2).Ex.palabras(4).n_apariciones:=3; Aula_1(4,2).Ex.Palabras(5).Palabra:="z "; Aula_1(4,2).Ex.palabras(5).n_apariciones:=2; aula_1(4,3).Ocupada:=True; Aula_1(4,3).Ident:=443; Aula_1(4,3).Ex.Num_palabras_diferentes:=5; --rellenando_las palabras y sus frecuencias --0123456789 Aula_1(4,3).Ex.Palabras(1).Palabra:="elem "; Aula_1(4,3).Ex.Palabras(1).n_apariciones:=7; Aula_1(4,3).Ex.Palabras(2).Palabra:="Indice2 "; Aula_1(4,3).Ex.palabras(2).n_apariciones:=5; Aula_1(4,3).Ex.Palabras(3).Palabra:="j "; Aula_1(4,3).Ex.palabras(3).n_apariciones:=2; Aula_1(4,3).Ex.Palabras(4).Palabra:="var3 "; Aula_1(4,3).Ex.palabras(4).n_apariciones:=3; Aula_1(4,3).Ex.Palabras(5).Palabra:="var19 "; Aula_1(4,3).Ex.palabras(5).n_apariciones:=3; aula_1(4,4).Ocupada:=True; Aula_1(4,4).Ident:=444; Aula_1(4,4).Ex.Num_palabras_diferentes:=6; --rellenando_las palabras y sus frecuencias --0123456789 Aula_1(4,4).Ex.Palabras(1).Palabra:="cont "; Aula_1(4,4).Ex.Palabras(1).n_apariciones:=2; Aula_1(4,4).Ex.Palabras(2).Palabra:="cont2 "; Aula_1(4,4).Ex.palabras(2).n_apariciones:=3; Aula_1(4,4).Ex.Palabras(3).Palabra:="j "; Aula_1(4,4).Ex.palabras(3).n_apariciones:=1; Aula_1(4,4).Ex.Palabras(4).Palabra:="w "; Aula_1(4,4).Ex.palabras(4).n_apariciones:=4; Aula_1(4,4).Ex.Palabras(5).Palabra:="z1 "; Aula_1(4,4).Ex.Palabras(5).n_apariciones:=5; Aula_1(4,4).Ex.Palabras(6).Palabra:="z5 "; Aula_1(4,4).Ex.palabras(6).n_apariciones:=5; aula_1(4,5).Ocupada:=True; Aula_1(4,5).Ident:=445; Aula_1(4,5).Ex.Num_palabras_diferentes:=6; --rellenando_las palabras y sus frecuencias --0123456789 Aula_1(4,5).Ex.Palabras(1).Palabra:="c "; Aula_1(4,5).Ex.Palabras(1).n_apariciones:=1; Aula_1(4,5).Ex.Palabras(2).Palabra:="cont2 "; Aula_1(4,5).Ex.palabras(2).n_apariciones:=2; Aula_1(4,5).Ex.Palabras(3).Palabra:="j "; Aula_1(4,5).Ex.palabras(3).n_apariciones:=8; Aula_1(4,5).Ex.Palabras(4).Palabra:="a "; Aula_1(4,5).Ex.palabras(4).n_apariciones:=3; Aula_1(4,5).Ex.Palabras(5).Palabra:="b "; Aula_1(4,5).Ex.Palabras(5).n_apariciones:=6; Aula_1(4,5).Ex.Palabras(6).Palabra:="c "; Aula_1(4,5).Ex.palabras(6).n_apariciones:=9; aula_1(4,6).Ocupada:=false; aula_1(4,7).Ocupada:=false; aula_1(4,8).Ocupada:=false; aula_1(4,9).Ocupada:=false; aula_1(4,10).Ocupada:=false; --rellenar aula_1 fila 5 ------------------------ aula_1(5,1).Ocupada:=True; Aula_1(5,1).Ident:=551; Aula_1(5,1).Ex.Num_palabras_diferentes:=5; --rellenando_las palabras y sus frecuencias --0123456789 Aula_1(5,1).Ex.Palabras(1).Palabra:="I "; Aula_1(5,1).Ex.Palabras(1).n_apariciones:=2; Aula_1(5,1).Ex.Palabras(2).Palabra:="Indice "; Aula_1(5,1).Ex.palabras(2).n_apariciones:=3; Aula_1(5,1).Ex.Palabras(3).Palabra:="var3 "; Aula_1(5,1).Ex.palabras(3).n_apariciones:=7; Aula_1(5,1).Ex.Palabras(4).Palabra:="var5 "; Aula_1(5,1).Ex.palabras(4).n_apariciones:=9; Aula_1(5,1).Ex.Palabras(5).Palabra:="var7 "; Aula_1(5,1).Ex.palabras(5).n_apariciones:=2; aula_1(5,2).Ocupada:=True; Aula_1(5,2).Ident:=552; Aula_1(5,2).Ex.Num_palabras_diferentes:=5; --rellenando_las palabras y sus frecuencias --0123456789 Aula_1(5,2).Ex.Palabras(1).Palabra:="elem "; Aula_1(5,2).Ex.Palabras(1).n_apariciones:=7; Aula_1(5,2).Ex.Palabras(2).Palabra:="Indice2 "; Aula_1(5,2).Ex.palabras(2).n_apariciones:=5; Aula_1(5,2).Ex.Palabras(3).Palabra:="j "; Aula_1(5,2).Ex.palabras(3).n_apariciones:=9; Aula_1(5,2).Ex.Palabras(4).Palabra:="x "; Aula_1(5,2).Ex.palabras(4).n_apariciones:=2; Aula_1(5,2).Ex.Palabras(5).Palabra:="z "; Aula_1(5,2).Ex.palabras(5).n_apariciones:=2; aula_1(5,3).Ocupada:=True; Aula_1(5,3).Ident:=553; Aula_1(5,3).Ex.Num_palabras_diferentes:=5; --rellenando_las palabras y sus frecuencias --0123456789 Aula_1(5,3).Ex.Palabras(1).Palabra:="elem "; Aula_1(5,3).Ex.Palabras(1).n_apariciones:=7; Aula_1(5,3).Ex.Palabras(2).Palabra:="Indice2 "; Aula_1(5,3).Ex.palabras(2).n_apariciones:=5; Aula_1(5,3).Ex.Palabras(3).Palabra:="j "; Aula_1(5,3).Ex.palabras(3).n_apariciones:=2; Aula_1(5,3).Ex.Palabras(4).Palabra:="var3 "; Aula_1(5,3).Ex.palabras(4).n_apariciones:=9; Aula_1(5,3).Ex.Palabras(5).Palabra:="var19 "; Aula_1(5,3).Ex.palabras(5).n_apariciones:=9; aula_1(5,4).Ocupada:=True; Aula_1(5,4).Ident:=554; Aula_1(5,4).Ex.Num_palabras_diferentes:=6; --rellenando_las palabras y sus frecuencias --0123456789 Aula_1(5,4).Ex.Palabras(1).Palabra:="cont "; Aula_1(5,4).Ex.Palabras(1).n_apariciones:=2; Aula_1(5,4).Ex.Palabras(2).Palabra:="cont2 "; Aula_1(5,4).Ex.palabras(2).n_apariciones:=3; Aula_1(5,4).Ex.Palabras(3).Palabra:="j "; Aula_1(5,4).Ex.palabras(3).n_apariciones:=6; Aula_1(5,4).Ex.Palabras(4).Palabra:="w "; Aula_1(5,4).Ex.palabras(4).n_apariciones:=4; Aula_1(5,4).Ex.Palabras(5).Palabra:="z1 "; Aula_1(5,4).Ex.Palabras(5).n_apariciones:=7; Aula_1(5,4).Ex.Palabras(6).Palabra:="z5 "; Aula_1(5,4).Ex.palabras(6).n_apariciones:=3; aula_1(5,5).Ocupada:=True; Aula_1(5,5).Ident:=555; Aula_1(5,5).Ex.Num_palabras_diferentes:=6; --rellenando_las palabras y sus frecuencias --0123456789 Aula_1(5,5).Ex.Palabras(1).Palabra:="c "; Aula_1(5,5).Ex.Palabras(1).n_apariciones:=1; Aula_1(5,5).Ex.Palabras(2).Palabra:="cont2 "; Aula_1(5,5).Ex.palabras(2).n_apariciones:=2; Aula_1(5,5).Ex.Palabras(3).Palabra:="j "; Aula_1(5,5).Ex.palabras(3).n_apariciones:=6; Aula_1(5,5).Ex.Palabras(4).Palabra:="a "; Aula_1(5,5).Ex.palabras(4).n_apariciones:=4; Aula_1(5,5).Ex.Palabras(5).Palabra:="b "; Aula_1(5,5).Ex.Palabras(5).n_apariciones:=1; Aula_1(5,5).Ex.Palabras(6).Palabra:="c "; Aula_1(5,5).Ex.palabras(6).n_apariciones:=1; aula_1(5,6).Ocupada:=false; aula_1(5,7).Ocupada:=false; aula_1(5,8).Ocupada:=false; aula_1(5,9).Ocupada:=false; aula_1(5,10).Ocupada:=false; aula_1(6,1).Ocupada:=false; aula_1(6,2).Ocupada:=false; aula_1(6,3).Ocupada:=false; aula_1(6,4).Ocupada:=false; aula_1(6,5).Ocupada:=false; aula_1(6,6).Ocupada:=false; aula_1(6,7).Ocupada:=false; aula_1(6,8).Ocupada:=false; aula_1(6,9).Ocupada:=false; aula_1(6,10).Ocupada:=false; aula_1(7,1).Ocupada:=false; aula_1(7,2).Ocupada:=false; aula_1(7,3).Ocupada:=false; aula_1(7,4).Ocupada:=false; aula_1(7,5).Ocupada:=false; aula_1(7,6).Ocupada:=false; aula_1(7,7).Ocupada:=false; aula_1(7,8).Ocupada:=false; aula_1(7,9).Ocupada:=false; aula_1(7,10).Ocupada:=false; aula_1(8,1).Ocupada:=false; aula_1(8,2).Ocupada:=false; aula_1(8,3).Ocupada:=false; aula_1(8,4).Ocupada:=false; aula_1(8,5).Ocupada:=false; aula_1(8,6).Ocupada:=false; aula_1(8,7).Ocupada:=false; aula_1(8,8).Ocupada:=false; aula_1(8,9).Ocupada:=false; aula_1(8,10).Ocupada:=false; --Rellenar el aula_1 fila 1 ------------------------------- aula_1(9,1).Ocupada:=True; Aula_1(9,1).Ident:=991; Aula_1(9,1).Ex.Num_palabras_diferentes:=5; --rellenando_las palabras y sus frecuencias --0123456789 Aula_1(9,1).Ex.Palabras(1).Palabra:="I "; Aula_1(9,1).Ex.Palabras(1).n_apariciones:=2; Aula_1(9,1).Ex.Palabras(2).Palabra:="Indice "; Aula_1(9,1).Ex.palabras(2).n_apariciones:=5; Aula_1(9,1).Ex.Palabras(3).Palabra:="var3 "; Aula_1(9,1).Ex.palabras(3).n_apariciones:=7; Aula_1(9,1).Ex.Palabras(4).Palabra:="var5 "; Aula_1(9,1).Ex.palabras(4).n_apariciones:=9; Aula_1(9,1).Ex.Palabras(5).Palabra:="var7 "; Aula_1(9,1).Ex.palabras(5).n_apariciones:=2; aula_1(9,2).Ocupada:=true; Aula_1(9,2).Ident:=992; Aula_1(9,2).Ex.Num_palabras_diferentes:=5; --rellenando_las palabras y sus frecuencias --0123456789 Aula_1(9,2).Ex.Palabras(1).Palabra:="elem "; Aula_1(9,2).Ex.Palabras(1).n_apariciones:=7; Aula_1(9,2).Ex.Palabras(2).Palabra:="Indice2 "; Aula_1(9,2).Ex.palabras(2).n_apariciones:=5; Aula_1(9,2).Ex.Palabras(3).Palabra:="j "; Aula_1(9,2).Ex.palabras(3).n_apariciones:=9; Aula_1(9,2).Ex.Palabras(4).Palabra:="x "; Aula_1(9,2).Ex.palabras(4).n_apariciones:=2; Aula_1(9,2).Ex.Palabras(5).Palabra:="z "; Aula_1(9,2).Ex.palabras(5).n_apariciones:=2; aula_1(9,3).Ocupada:=True; Aula_1(9,3).Ident:=993; Aula_1(9,3).Ex.Num_palabras_diferentes:=5; --rellenando_las palabras y sus frecuencias --0123456789 Aula_1(9,3).Ex.Palabras(1).Palabra:="elem "; Aula_1(9,3).Ex.Palabras(1).n_apariciones:=7; Aula_1(9,3).Ex.Palabras(2).Palabra:="Indice2 "; Aula_1(9,3).Ex.palabras(2).n_apariciones:=5; Aula_1(9,3).Ex.Palabras(3).Palabra:="j "; Aula_1(9,3).Ex.palabras(3).n_apariciones:=2; Aula_1(9,3).Ex.Palabras(4).Palabra:="var3 "; Aula_1(9,3).Ex.palabras(4).n_apariciones:=7; Aula_1(9,3).Ex.Palabras(5).Palabra:="var19 "; Aula_1(9,3).Ex.palabras(5).n_apariciones:=9; aula_1(9,4).Ocupada:=True; Aula_1(9,4).Ident:=994; Aula_1(9,4).Ex.Num_palabras_diferentes:=6; --rellenando_las palabras y sus frecuencias --0123456789 Aula_1(9,4).Ex.Palabras(1).Palabra:="cont "; Aula_1(9,4).Ex.Palabras(1).n_apariciones:=2; Aula_1(9,4).Ex.Palabras(2).Palabra:="cont2 "; Aula_1(9,4).Ex.palabras(2).n_apariciones:=3; Aula_1(9,4).Ex.Palabras(3).Palabra:="j "; Aula_1(9,4).Ex.palabras(3).n_apariciones:=6; Aula_1(9,4).Ex.Palabras(4).Palabra:="w "; Aula_1(9,4).Ex.palabras(4).n_apariciones:=4; Aula_1(9,4).Ex.Palabras(5).Palabra:="z1 "; Aula_1(9,4).Ex.Palabras(5).n_apariciones:=7; Aula_1(9,4).Ex.Palabras(6).Palabra:="z5 "; Aula_1(9,4).Ex.palabras(6).n_apariciones:=3; aula_1(9,5).Ocupada:=True; Aula_1(9,5).Ident:=995; Aula_1(9,5).Ex.Num_palabras_diferentes:=6; --rellenando_las palabras y sus frecuencias --0123456789 Aula_1(9,5).Ex.Palabras(1).Palabra:="c "; Aula_1(9,5).Ex.Palabras(1).n_apariciones:=1; Aula_1(9,5).Ex.Palabras(2).Palabra:="cont2 "; Aula_1(9,5).Ex.palabras(2).n_apariciones:=2; Aula_1(9,5).Ex.Palabras(3).Palabra:="j "; Aula_1(9,5).Ex.palabras(3).n_apariciones:=6; Aula_1(9,5).Ex.Palabras(4).Palabra:="a "; Aula_1(9,5).Ex.palabras(4).n_apariciones:=4; Aula_1(9,5).Ex.Palabras(5).Palabra:="b "; Aula_1(9,5).Ex.Palabras(5).n_apariciones:=1; Aula_1(9,5).Ex.Palabras(6).Palabra:="c "; Aula_1(9,5).Ex.palabras(6).n_apariciones:=1; aula_1(9,6).Ocupada:=false; aula_1(9,7).Ocupada:=false; aula_1(9,8).Ocupada:=false; aula_1(9,9).Ocupada:=True; Aula_1(9,9).Ident:=999; Aula_1(9,9).Ex.Num_palabras_diferentes:=6; --rellenando_las palabras y sus frecuencias --0123456789 Aula_1(9,9).Ex.Palabras(1).Palabra:="cont "; Aula_1(9,9).Ex.Palabras(1).n_apariciones:=2; Aula_1(9,9).Ex.Palabras(2).Palabra:="cont2 "; Aula_1(9,9).Ex.palabras(2).n_apariciones:=3; Aula_1(9,9).Ex.Palabras(3).Palabra:="j "; Aula_1(9,9).Ex.palabras(3).n_apariciones:=6; Aula_1(9,9).Ex.Palabras(4).Palabra:="w "; Aula_1(9,9).Ex.palabras(4).n_apariciones:=4; Aula_1(9,9).Ex.Palabras(5).Palabra:="z1 "; Aula_1(9,9).Ex.Palabras(5).n_apariciones:=7; Aula_1(9,9).Ex.Palabras(6).Palabra:="z5 "; Aula_1(9,9).Ex.palabras(6).n_apariciones:=3; aula_1(9,10).Ocupada:=True; Aula_1(9,10).Ident:=9910; Aula_1(9,10).Ex.Num_palabras_diferentes:=6; --rellenando_las palabras y sus frecuencias --0123456789 Aula_1(9,10).Ex.Palabras(1).Palabra:="c "; Aula_1(9,10).Ex.Palabras(1).n_apariciones:=2; Aula_1(9,10).Ex.Palabras(2).Palabra:="cont2 "; Aula_1(9,10).Ex.palabras(2).n_apariciones:=3; Aula_1(9,10).Ex.Palabras(3).Palabra:="j "; Aula_1(9,10).Ex.palabras(3).n_apariciones:=6; Aula_1(9,10).Ex.Palabras(4).Palabra:="a "; Aula_1(9,10).Ex.palabras(4).n_apariciones:=4; Aula_1(9,10).Ex.Palabras(5).Palabra:="b "; Aula_1(9,10).Ex.Palabras(5).n_apariciones:=7; Aula_1(9,10).Ex.Palabras(6).Palabra:="c "; Aula_1(9,10).Ex.palabras(6).n_apariciones:=3; --rellenando_las palabras y sus frecuencias --Rellenar el aula_1 fila 2 ---------------------------------- aula_1(10,1).Ocupada:=true; Aula_1(10,1).Ident:=1011; Aula_1(10,1).Ex.Num_palabras_diferentes:=4; --rellenando_las palabras y sus frecuencias --0123456789 Aula_1(10,1).Ex.Palabras(1).Palabra:="I "; Aula_1(10,1).Ex.Palabras(1).n_apariciones:=2; Aula_1(10,1).Ex.Palabras(2).Palabra:="Indice "; Aula_1(10,1).Ex.palabras(2).n_apariciones:=5; Aula_1(10,1).Ex.Palabras(3).Palabra:="var3 "; Aula_1(10,1).Ex.palabras(3).n_apariciones:=7; Aula_1(10,1).Ex.Palabras(4).Palabra:="var5 "; Aula_1(10,1).Ex.palabras(4).n_apariciones:=9; -- aula_1(10,2).Ocupada:=True; Aula_1(10,2).Ident:=1012; Aula_1(10,2).Ex.Num_palabras_diferentes:=4; --rellenando_las palabras y sus frecuencias --0123456789 Aula_1(10,2).Ex.Palabras(1).Palabra:="elem "; Aula_1(10,2).Ex.Palabras(1).n_apariciones:=2; Aula_1(10,2).Ex.Palabras(2).Palabra:="Indice2 "; Aula_1(10,2).Ex.palabras(2).n_apariciones:=5; Aula_1(10,2).Ex.Palabras(3).Palabra:="j "; Aula_1(10,2).Ex.palabras(3).n_apariciones:=9; Aula_1(10,2).Ex.Palabras(4).Palabra:="x "; Aula_1(10,2).Ex.palabras(4).n_apariciones:=7; aula_1(10,3).Ocupada:=True; Aula_1(10,3).Ident:=1013; Aula_1(10,3).Ex.Num_palabras_diferentes:=5; --rellenando_las palabras y sus frecuencias --0123456789 Aula_1(10,3).Ex.Palabras(1).Palabra:="elem "; Aula_1(10,3).Ex.Palabras(1).n_apariciones:=7; Aula_1(10,3).Ex.Palabras(2).Palabra:="Indice2 "; Aula_1(10,3).Ex.palabras(2).n_apariciones:=5; Aula_1(10,3).Ex.Palabras(3).Palabra:="j "; Aula_1(10,3).Ex.palabras(3).n_apariciones:=2; Aula_1(10,3).Ex.Palabras(4).Palabra:="var3 "; Aula_1(10,3).Ex.palabras(4).n_apariciones:=9; Aula_1(10,3).Ex.Palabras(5).Palabra:="var19 "; Aula_1(10,3).Ex.palabras(5).n_apariciones:=9; aula_1(10,4).Ocupada:=false; aula_1(10,4).Ocupada:=false; aula_1(10,4).Ocupada:=false; aula_1(10,5).Ocupada:=True; Aula_1(10,5).Ident:=1015; Aula_1(10,5).Ex.Num_palabras_diferentes:=6; --rellenando_las palabras y sus frecuencias --0123456789 Aula_1(10,5).Ex.Palabras(1).Palabra:="cont "; Aula_1(10,5).Ex.Palabras(1).n_apariciones:=2; Aula_1(10,5).Ex.Palabras(2).Palabra:="cont2 "; Aula_1(10,5).Ex.palabras(2).n_apariciones:=5; Aula_1(10,5).Ex.Palabras(3).Palabra:="j "; Aula_1(10,5).Ex.palabras(3).n_apariciones:=5; Aula_1(10,5).Ex.Palabras(4).Palabra:="w "; Aula_1(10,5).Ex.palabras(4).n_apariciones:=4; Aula_1(10,5).Ex.Palabras(5).Palabra:="z1 "; Aula_1(10,5).Ex.Palabras(5).n_apariciones:=4; Aula_1(10,5).Ex.Palabras(6).Palabra:="z5 "; Aula_1(10,5).Ex.palabras(6).n_apariciones:=3; aula_1(10,6).Ocupada:=True; Aula_1(10,6).Ident:=1016; Aula_1(10,6).Ex.Num_palabras_diferentes:=6; --rellenando_las palabras y sus frecuencias --0123456789 Aula_1(10,6).Ex.Palabras(1).Palabra:="c "; Aula_1(10,6).Ex.Palabras(1).n_apariciones:=2; Aula_1(10,6).Ex.Palabras(2).Palabra:="cont2 "; Aula_1(10,6).Ex.palabras(2).n_apariciones:=2; Aula_1(10,6).Ex.Palabras(3).Palabra:="j "; Aula_1(10,6).Ex.palabras(3).n_apariciones:=5; Aula_1(10,6).Ex.Palabras(4).Palabra:="f "; Aula_1(10,6).Ex.palabras(4).n_apariciones:=5; Aula_1(10,6).Ex.Palabras(5).Palabra:="v "; Aula_1(10,6).Ex.Palabras(5).n_apariciones:=4; Aula_1(10,6).Ex.Palabras(6).Palabra:="z "; Aula_1(10,6).Ex.palabras(6).n_apariciones:=3; aula_1(10,7).Ocupada:=false; aula_1(10,8).Ocupada:=false; aula_1(10,9).Ocupada:=true; Aula_1(10,9).Ident:=1019; Aula_1(10,9).Ex.Num_palabras_diferentes:=6; --rellenando_las palabras y sus frecuencias --0123456789 Aula_1(10,9).Ex.Palabras(1).Palabra:="c "; Aula_1(10,9).Ex.Palabras(1).n_apariciones:=5; Aula_1(10,9).Ex.Palabras(2).Palabra:="cont2 "; Aula_1(10,9).Ex.palabras(2).n_apariciones:=2; Aula_1(10,9).Ex.Palabras(3).Palabra:="j "; Aula_1(10,9).Ex.palabras(3).n_apariciones:=2; Aula_1(10,9).Ex.Palabras(4).Palabra:="f "; Aula_1(10,9).Ex.palabras(4).n_apariciones:=2; Aula_1(10,9).Ex.Palabras(5).Palabra:="v "; Aula_1(10,9).Ex.Palabras(5).n_apariciones:=4; Aula_1(10,9).Ex.Palabras(6).Palabra:="z "; Aula_1(10,9).Ex.palabras(6).n_apariciones:=3; aula_1(10,10).Ocupada:=True; Aula_1(10,10).Ident:=10110; Aula_1(10,10).Ex.Num_palabras_diferentes:=6; --rellenando_las palabras y sus frecuencias --0123456789 Aula_1(10,10).Ex.Palabras(1).Palabra:="c "; Aula_1(10,10).Ex.Palabras(1).n_apariciones:=2; Aula_1(10,10).Ex.Palabras(2).Palabra:="cont3 "; Aula_1(10,10).Ex.palabras(2).n_apariciones:=3; Aula_1(10,10).Ex.Palabras(3).Palabra:="j "; Aula_1(10,10).Ex.palabras(3).n_apariciones:=6; Aula_1(10,10).Ex.Palabras(4).Palabra:="f "; Aula_1(10,10).Ex.palabras(4).n_apariciones:=4; Aula_1(10,10).Ex.Palabras(5).Palabra:="v "; Aula_1(10,10).Ex.Palabras(5).n_apariciones:=7; Aula_1(10,10).Ex.Palabras(6).Palabra:="z "; Aula_1(10,10).Ex.palabras(6).n_apariciones:=3; end rellenar_aula_1;
Irvine/Examples/ch11/MessageBox.asm
alieonsido/ASM_TESTING
0
177233
<reponame>alieonsido/ASM_TESTING<filename>Irvine/Examples/ch11/MessageBox.asm ; Demonstrate MessageBoxA (MessageBox.asm) ; Demonstration of the Windows API MessageBox function, using ; various icons and button configurations. INCLUDE Irvine32.inc .data captionW BYTE "Warning",0 warningMsg BYTE "The current operation may take years " BYTE "to complete.",0 captionQ BYTE "Question",0 questionMsg BYTE "A matching user account was not found." BYTE 0dh,0ah,"Do you wish to continue?",0 captionC BYTE "Information",0 infoMsg BYTE "Select Yes to save a backup file " BYTE "before continuing,",0dh,0ah BYTE "or click Cancel to stop the operation",0 captionH BYTE "Cannot View User List",0 haltMsg BYTE "This operation not supported by your " BYTE "user account.",0 .code main PROC ; Display Exclamation icon with OK button INVOKE MessageBox, NULL, ADDR warningMsg, ADDR captionW, MB_OK + MB_ICONEXCLAMATION ; Display Question icon with Yes/No buttons INVOKE MessageBox, NULL, ADDR questionMsg, ADDR captionQ, MB_YESNO + MB_ICONQUESTION ; interpret the button clicked by the user cmp eax,IDYES ; YES button clicked? ; Display Information icon with Yes/No/Cancel buttons INVOKE MessageBox, NULL, ADDR infoMsg, ADDR captionC, MB_YESNOCANCEL + MB_ICONINFORMATION \ + MB_DEFBUTTON2 ; Display stop icon with OK button INVOKE MessageBox, NULL, ADDR haltMsg, ADDR captionH, MB_OK + MB_ICONSTOP exit main ENDP END main
programs/oeis/070/A070451.asm
neoneye/loda
22
273
; A070451: a(n) = n^2 mod 29. ; 0,1,4,9,16,25,7,20,6,23,13,5,28,24,22,22,24,28,5,13,23,6,20,7,25,16,9,4,1,0,1,4,9,16,25,7,20,6,23,13,5,28,24,22,22,24,28,5,13,23,6,20,7,25,16,9,4,1,0,1,4,9,16,25,7,20,6,23,13,5,28,24,22,22,24,28,5,13,23,6,20,7,25,16,9,4,1,0,1,4,9,16,25,7,20,6,23,13,5,28 pow $0,2 mod $0,29
include/sf-system-mutex.ads
Fabien-Chouteau/ASFML
0
26346
--////////////////////////////////////////////////////////// -- SFML - Simple and Fast Multimedia Library -- Copyright (C) 2007-2015 <NAME> (<EMAIL>) -- This software is provided 'as-is', without any express or implied warranty. -- In no event will the authors be held liable for any damages arising from the use of this software. -- Permission is granted to anyone to use this software for any purpose, -- including commercial applications, and to alter it and redistribute it freely, -- subject to the following restrictions: -- 1. The origin of this software must not be misrepresented; -- you must not claim that you wrote the original software. -- If you use this software in a product, an acknowledgment -- in the product documentation would be appreciated but is not required. -- 2. Altered source versions must be plainly marked as such, -- and must not be misrepresented as being the original software. -- 3. This notice may not be removed or altered from any source distribution. --////////////////////////////////////////////////////////// --////////////////////////////////////////////////////////// package Sf.System.Mutex is --////////////////////////////////////////////////////////// --////////////////////////////////////////////////////////// --////////////////////////////////////////////////////////// --////////////////////////////////////////////////////////// --////////////////////////////////////////////////////////// --/ @brief Create a new mutex --/ --/ @return A new sfMutex object --/ --////////////////////////////////////////////////////////// function create return sfMutex_Ptr; --////////////////////////////////////////////////////////// --/ @brief Destroy a mutex --/ --/ @param mutex Mutex to destroy --/ --////////////////////////////////////////////////////////// procedure destroy (mutex : sfMutex_Ptr); --////////////////////////////////////////////////////////// --/ @brief Lock a mutex --/ --/ @param mutex Mutex object --/ --////////////////////////////////////////////////////////// procedure lock (mutex : sfMutex_Ptr); --////////////////////////////////////////////////////////// --/ @brief Unlock a mutex --/ --/ @param mutex Mutex object --/ --////////////////////////////////////////////////////////// procedure unlock (mutex : sfMutex_Ptr); private pragma Import (C, create, "sfMutex_create"); pragma Import (C, destroy, "sfMutex_destroy"); pragma Import (C, lock, "sfMutex_lock"); pragma Import (C, unlock, "sfMutex_unlock"); end Sf.System.Mutex;
src/model/gen-database-model.ads
Letractively/ada-gen
0
3426
<reponame>Letractively/ada-gen<gh_stars>0 ----------------------------------------------------------------------- -- Gen.Database.Model -- Gen.Database.Model ----------------------------------------------------------------------- -- File generated by ada-gen DO NOT MODIFY -- Template used: templates/model/package-spec.xhtml -- Ada Generator: https://ada-gen.googlecode.com/svn/trunk Revision 305 ----------------------------------------------------------------------- -- Copyright (C) 2011 <NAME> -- Written by <NAME> (<EMAIL>) -- -- Licensed under the Apache License, Version 2.0 (the "License"); -- you may not use this file except in compliance with the License. -- You may obtain a copy of the License at -- -- http://www.apache.org/licenses/LICENSE-2.0 -- -- Unless required by applicable law or agreed to in writing, software -- distributed under the License is distributed on an "AS IS" BASIS, -- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -- See the License for the specific language governing permissions and -- limitations under the License. ----------------------------------------------------------------------- pragma Warnings (Off, "unit * is not referenced"); with ADO.Sessions; with ADO.Objects; with ADO.Statements; with ADO.SQL; with ADO.Schemas; with ADO.Queries; with ADO.Queries.Loaders; with Ada.Calendar; with Ada.Containers.Vectors; with Ada.Strings.Unbounded; with Util.Beans.Objects; with Util.Beans.Basic.Lists; pragma Warnings (On, "unit * is not referenced"); package Gen.Database.Model is -- -------------------- -- Application Schema information -- -------------------- -- Create an object key for Schema. function Schema_Key (Id : in ADO.Identifier) return ADO.Objects.Object_Key; -- Create an object key for Schema from a string. -- Raises Constraint_Error if the string cannot be converted into the object key. function Schema_Key (Id : in String) return ADO.Objects.Object_Key; type Schema_Ref is new ADO.Objects.Object_Ref with null record; Null_Schema : constant Schema_Ref; function "=" (Left, Right : Schema_Ref'Class) return Boolean; -- Set the model name procedure Set_Name (Object : in out Schema_Ref; Value : in Ada.Strings.Unbounded.Unbounded_String); procedure Set_Name (Object : in out Schema_Ref; Value : in String); -- Get the model name function Get_Name (Object : in Schema_Ref) return Ada.Strings.Unbounded.Unbounded_String; function Get_Name (Object : in Schema_Ref) return String; -- Set the schema version procedure Set_Version (Object : in out Schema_Ref; Value : in Integer); -- Get the schema version function Get_Version (Object : in Schema_Ref) return Integer; -- Set the upgrade date procedure Set_Date (Object : in out Schema_Ref; Value : in ADO.Nullable_Time); -- Get the upgrade date function Get_Date (Object : in Schema_Ref) return ADO.Nullable_Time; -- Load the entity identified by 'Id'. -- Raises the NOT_FOUND exception if it does not exist. procedure Load (Object : in out Schema_Ref; Session : in out ADO.Sessions.Session'Class; Id : in Ada.Strings.Unbounded.Unbounded_String); -- Load the entity identified by 'Id'. -- Returns True in <b>Found</b> if the object was found and False if it does not exist. procedure Load (Object : in out Schema_Ref; Session : in out ADO.Sessions.Session'Class; Id : in Ada.Strings.Unbounded.Unbounded_String; Found : out Boolean); -- Find and load the entity. overriding procedure Find (Object : in out Schema_Ref; Session : in out ADO.Sessions.Session'Class; Query : in ADO.SQL.Query'Class; Found : out Boolean); -- Save the entity. If the entity does not have an identifier, an identifier is allocated -- and it is inserted in the table. Otherwise, only data fields which have been changed -- are updated. overriding procedure Save (Object : in out Schema_Ref; Session : in out ADO.Sessions.Master_Session'Class); -- Delete the entity. overriding procedure Delete (Object : in out Schema_Ref; Session : in out ADO.Sessions.Master_Session'Class); overriding function Get_Value (Item : in Schema_Ref; Name : in String) return Util.Beans.Objects.Object; -- Table definition SCHEMA_TABLE : aliased constant ADO.Schemas.Class_Mapping; -- Internal method to allocate the Object_Record instance overriding procedure Allocate (Object : in out Schema_Ref); -- Copy of the object. procedure Copy (Object : in Schema_Ref; Into : in out Schema_Ref); package Schema_Vectors is new Ada.Containers.Vectors (Index_Type => Natural, Element_Type => Schema_Ref, "=" => "="); subtype Schema_Vector is Schema_Vectors.Vector; procedure List (Object : in out Schema_Vector; Session : in out ADO.Sessions.Session'Class; Query : in ADO.SQL.Query'Class); -- -------------------- -- information about the database -- -------------------- type Database_Info is tagged record -- the database name. Name : Ada.Strings.Unbounded.Unbounded_String; end record; package Database_Info_Vectors is new Ada.Containers.Vectors (Index_Type => Natural, Element_Type => Database_Info, "=" => "="); subtype Database_Info_Vector is Database_Info_Vectors.Vector; -- Run the query controlled by <b>Context</b> and append the list in <b>Object</b>. procedure List (Object : in out Database_Info_Vector; Session : in out ADO.Sessions.Session'Class; Context : in out ADO.Queries.Context'Class); Query_Database_List : constant ADO.Queries.Query_Definition_Access; Query_Table_List : constant ADO.Queries.Query_Definition_Access; Query_Create_Database : constant ADO.Queries.Query_Definition_Access; Query_Create_User_No_Password : constant ADO.Queries.Query_Definition_Access; Query_Create_User_With_Password : constant ADO.Queries.Query_Definition_Access; Query_Flush_Privileges : constant ADO.Queries.Query_Definition_Access; private SCHEMA_NAME : aliased constant String := "ADO_SCHEMA"; COL_0_1_NAME : aliased constant String := "NAME"; COL_1_1_NAME : aliased constant String := "VERSION"; COL_2_1_NAME : aliased constant String := "DATE"; SCHEMA_TABLE : aliased constant ADO.Schemas.Class_Mapping := (Count => 3, Table => SCHEMA_NAME'Access, Members => ( COL_0_1_NAME'Access, COL_1_1_NAME'Access, COL_2_1_NAME'Access ) ); Null_Schema : constant Schema_Ref := Schema_Ref'(ADO.Objects.Object_Ref with others => <>); type Schema_Impl is new ADO.Objects.Object_Record (Key_Type => ADO.Objects.KEY_STRING, Of_Class => SCHEMA_TABLE'Access) with record Version : Integer; Date : ADO.Nullable_Time; end record; type Schema_Access is access all Schema_Impl; overriding procedure Destroy (Object : access Schema_Impl); overriding procedure Find (Object : in out Schema_Impl; Session : in out ADO.Sessions.Session'Class; Query : in ADO.SQL.Query'Class; Found : out Boolean); overriding procedure Load (Object : in out Schema_Impl; Session : in out ADO.Sessions.Session'Class); procedure Load (Object : in out Schema_Impl; Stmt : in out ADO.Statements.Query_Statement'Class; Session : in out ADO.Sessions.Session'Class); overriding procedure Save (Object : in out Schema_Impl; Session : in out ADO.Sessions.Master_Session'Class); procedure Create (Object : in out Schema_Impl; Session : in out ADO.Sessions.Master_Session'Class); overriding procedure Delete (Object : in out Schema_Impl; Session : in out ADO.Sessions.Master_Session'Class); procedure Set_Field (Object : in out Schema_Ref'Class; Impl : out Schema_Access); package File_1 is new ADO.Queries.Loaders.File (Path => "create-database.xml", Sha1 => "5CCC0C05ECA7B8D6757ED08034015B1453C95014"); package Def_Databaseinfo_Database_List is new ADO.Queries.Loaders.Query (Name => "database-list", File => File_1.File'Access); Query_Database_List : constant ADO.Queries.Query_Definition_Access := Def_Databaseinfo_Database_List.Query'Access; package Def_Databaseinfo_Table_List is new ADO.Queries.Loaders.Query (Name => "table-list", File => File_1.File'Access); Query_Table_List : constant ADO.Queries.Query_Definition_Access := Def_Databaseinfo_Table_List.Query'Access; package Def_Databaseinfo_Create_Database is new ADO.Queries.Loaders.Query (Name => "create-database", File => File_1.File'Access); Query_Create_Database : constant ADO.Queries.Query_Definition_Access := Def_Databaseinfo_Create_Database.Query'Access; package Def_Databaseinfo_Create_User_No_Password is new ADO.Queries.Loaders.Query (Name => "create-user-no-password", File => File_1.File'Access); Query_Create_User_No_Password : constant ADO.Queries.Query_Definition_Access := Def_Databaseinfo_Create_User_No_Password.Query'Access; package Def_Databaseinfo_Create_User_With_Password is new ADO.Queries.Loaders.Query (Name => "create-user-with-password", File => File_1.File'Access); Query_Create_User_With_Password : constant ADO.Queries.Query_Definition_Access := Def_Databaseinfo_Create_User_With_Password.Query'Access; package Def_Databaseinfo_Flush_Privileges is new ADO.Queries.Loaders.Query (Name => "flush-privileges", File => File_1.File'Access); Query_Flush_Privileges : constant ADO.Queries.Query_Definition_Access := Def_Databaseinfo_Flush_Privileges.Query'Access; end Gen.Database.Model;
pro/pro5.2/kernel/kernel.asm
wangdehu/os
3
82127
SELECTOR_KERNEL_CS equ 8 ; 导入函数 extern cstart extern exception_handler extern spurious_irq ; 导入全局变量 extern gdt_ptr extern idt_ptr extern disp_pos [SECTION .bss] StackSpace resb 2 * 1024 StackTop: ; 栈顶 [section .text] ; 代码在此 global _start ; 导出 _start global divide_error global single_step_exception global nmi global breakpoint_exception global overflow global bounds_check global inval_opcode global copr_not_available global double_fault global copr_seg_overrun global inval_tss global segment_not_present global stack_exception global general_protection global page_fault global copr_error global hwint00 global hwint01 global hwint02 global hwint03 global hwint04 global hwint05 global hwint06 global hwint07 global hwint08 global hwint09 global hwint10 global hwint11 global hwint12 global hwint13 global hwint14 global hwint15 _start: ; 此时内存看上去是这样的(更详细的内存情况在 LOADER.ASM 中有说明): ; ; ... ; ━━━━━━━━━━━━━━━━━━┫ ; ■■■■■■Page Tables■■■■■■ ; ■■■■■(大小由LOADER决定)■■■■ PageTblBase ; 00101000h ━━━━━━━━━━━━━━━━━━┫ ; ■■■■Page Directory Table■■■■ PageDirBase = 1M ; 00100000h ━━━━━━━━━━━━━━━━━━┫ ; □□□□ Hardware Reserved □□□□ B8000h ← gs ; 9FC00h ━━━━━━━━━━━━━━━━━━┫ ; ■■■■■■■LOADER.BIN■■■■■■ somewhere in LOADER ← esp ; 90000h ━━━━━━━━━━━━━━━━━━┫ ; ■■■■■■■KERNEL.BIN■■■■■■ ; 80000h ━━━━━━━━━━━━━━━━━━┫ ; ■■■■■■■■KERNEL■■■■■■■ 30400h ← KERNEL 入口 (KernelEntryPointPhyAddr) ; 30000h ━━━━━━━━━━━━━━━━━━┫ ; ┋ ... ┋ ; ┋ ┋ ; 0h ┗━━━━━━━━━━━━━━━━━━ ← cs, ds, es, fs, ss ; ; ; GDT 以及相应的描述符是这样的: ; ; Descriptors Selectors ; ┏━━━━━━━━━━━━━━━━━━ ; Dummy Descriptor ; ━━━━━━━━━━━━━━━━━━┫ ; DESC_FLAT_C (0~4G) 8h = cs ; ━━━━━━━━━━━━━━━━━━┫ ; DESC_FLAT_RW (0~4G) 10h = ds, es, fs, ss ; ━━━━━━━━━━━━━━━━━━┫ ; DESC_VIDEO 1Bh = gs ; ┗━━━━━━━━━━━━━━━━━━ ; ; 注意! 在使用 C 代码的时候一定要保证 ds, es, ss 这几个段寄存器的值是一样的 ; 因为编译器有可能编译出使用它们的代码, 而编译器默认它们是一样的. 比如串拷贝操作会用到 ds 和 es. ; ; ; 把 esp 从 LOADER 挪到 KERNEL mov esp, StackTop ; 堆栈在 bss 段中 mov dword [disp_pos], 0 sgdt [gdt_ptr] ; cstart() 中将会用到 gdt_ptr call cstart ; 在此函数中改变了gdt_ptr,让它指向新的GDT lgdt [gdt_ptr] ; 使用新的GDT lidt [idt_ptr] jmp SELECTOR_KERNEL_CS:csinit csinit: sti hlt ; 中断和异常 -- 硬件中断 ; --------------------------------- %macro hwint_master 1 push %1 call spurious_irq add esp, 4 hlt %endmacro ; --------------------------------- ALIGN 16 hwint00: ; Interrupt routine for irq 0 (the clock). hwint_master 0 ALIGN 16 hwint01: ; Interrupt routine for irq 1 (keyboard) hwint_master 1 ALIGN 16 hwint02: ; Interrupt routine for irq 2 (cascade!) hwint_master 2 ALIGN 16 hwint03: ; Interrupt routine for irq 3 (second serial) hwint_master 3 ALIGN 16 hwint04: ; Interrupt routine for irq 4 (first serial) hwint_master 4 ALIGN 16 hwint05: ; Interrupt routine for irq 5 (XT winchester) hwint_master 5 ALIGN 16 hwint06: ; Interrupt routine for irq 6 (floppy) hwint_master 6 ALIGN 16 hwint07: ; Interrupt routine for irq 7 (printer) hwint_master 7 ; --------------------------------- %macro hwint_slave 1 push %1 call spurious_irq add esp, 4 hlt %endmacro ; --------------------------------- ALIGN 16 hwint08: ; Interrupt routine for irq 8 (realtime clock). hwint_slave 8 ALIGN 16 hwint09: ; Interrupt routine for irq 9 (irq 2 redirected) hwint_slave 9 ALIGN 16 hwint10: ; Interrupt routine for irq 10 hwint_slave 10 ALIGN 16 hwint11: ; Interrupt routine for irq 11 hwint_slave 11 ALIGN 16 hwint12: ; Interrupt routine for irq 12 hwint_slave 12 ALIGN 16 hwint13: ; Interrupt routine for irq 13 (FPU exception) hwint_slave 13 ALIGN 16 hwint14: ; Interrupt routine for irq 14 (AT winchester) hwint_slave 14 ALIGN 16 hwint15: ; Interrupt routine for irq 15 hwint_slave 15 ; 中断和异常 -- 异常 divide_error: push 0xFFFFFFFF ; no err code push 0 ; vector_no = 0 jmp exception single_step_exception: push 0xFFFFFFFF ; no err code push 1 ; vector_no = 1 jmp exception nmi: push 0xFFFFFFFF ; no err code push 2 ; vector_no = 2 jmp exception breakpoint_exception: push 0xFFFFFFFF ; no err code push 3 ; vector_no = 3 jmp exception overflow: push 0xFFFFFFFF ; no err code push 4 ; vector_no = 4 jmp exception bounds_check: push 0xFFFFFFFF ; no err code push 5 ; vector_no = 5 jmp exception inval_opcode: push 0xFFFFFFFF ; no err code push 6 ; vector_no = 6 jmp exception copr_not_available: push 0xFFFFFFFF ; no err code push 7 ; vector_no = 7 jmp exception double_fault: push 8 ; vector_no = 8 jmp exception copr_seg_overrun: push 0xFFFFFFFF ; no err code push 9 ; vector_no = 9 jmp exception inval_tss: push 10 ; vector_no = A jmp exception segment_not_present: push 11 ; vector_no = B jmp exception stack_exception: push 12 ; vector_no = C jmp exception general_protection: push 13 ; vector_no = D jmp exception page_fault: push 14 ; vector_no = E jmp exception copr_error: push 0xFFFFFFFF ; no err code push 16 ; vector_no = 10h jmp exception exception: call exception_handler add esp, 4*2 ; 让栈顶指向 EIP,堆栈中从顶向下依次是:EIP、CS、EFLAGS hlt
src/Subtyping.agda
boystrange/FairSubtypingAgda
4
11629
-- MIT License -- Copyright (c) 2021 <NAME> and <NAME> -- Permission is hereby granted, free of charge, to any person -- obtaining a copy of this software and associated documentation -- files (the "Software"), to deal in the Software without -- restriction, including without limitation the rights to use, -- copy, modify, merge, publish, distribute, sublicense, and/or sell -- copies of the Software, and to permit persons to whom the -- Software is furnished to do so, subject to the following -- conditions: -- The above copyright notice and this permission notice shall be -- included in all copies or substantial portions of the Software. -- THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, -- EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES -- OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND -- NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT -- HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, -- WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING -- FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR -- OTHER DEALINGS IN THE SOFTWARE. {-# OPTIONS --guardedness --sized-types #-} open import Size open import Data.Empty open import Data.Product open import Data.Sum open import Data.List using ([]; _∷_; _∷ʳ_; _++_) open import Codata.Thunk open import Relation.Nullary open import Relation.Nullary.Negation using (contraposition) open import Relation.Unary using (_∈_; _⊆_) open import Relation.Binary.PropositionalEquality using (_≡_; _≢_; refl) open import Function.Base using (case_of_) open import Common module Subtyping {ℙ : Set} (message : Message ℙ) where open Message message open import Trace message open import SessionType message open import Transitions message open import Session message open import Compliance message open import HasTrace message data Sub : SessionType -> SessionType -> Size -> Set where nil<:any : ∀{T i} -> Sub nil T i end<:def : ∀{T S i} (e : End T) (def : Defined S) -> Sub T S i inp<:inp : ∀{f g i} (inc : dom f ⊆ dom g) (F : (x : ℙ) -> Thunk (Sub (f x .force) (g x .force)) i) -> Sub (inp f) (inp g) i out<:out : ∀{f g i} (W : Witness g) (inc : dom g ⊆ dom f) (F : ∀{x} (!x : x ∈ dom g) -> Thunk (Sub (f x .force) (g x .force)) i) -> Sub (out f) (out g) i _<:_ : SessionType -> SessionType -> Set _<:_ T S = Sub T S ∞ sub-defined : ∀{T S} -> T <: S -> Defined T -> Defined S sub-defined (end<:def _ def) _ = def sub-defined (inp<:inp _ _) _ = inp sub-defined (out<:out _ _ _) _ = out sub-sound : ∀{T S R} -> Compliance (R # T) -> T <: S -> ∞Compliance (R # S) force (sub-sound (win#def w def) sub) = win#def w (sub-defined sub def) force (sub-sound (out#inp (_ , !x) F) (end<:def (inp U) def)) with U _ (proj₂ (compliance->defined (F !x .force))) ... | () force (sub-sound (out#inp (_ , !x) F) (inp<:inp _ G)) = out#inp (_ , !x) λ !x -> sub-sound (F !x .force) (G _ .force) force (sub-sound (inp#out (_ , !x) F) (end<:def (out U) def)) = ⊥-elim (U _ !x) force (sub-sound (inp#out (_ , !x) F) (out<:out {f} {g} (_ , !y) inc G)) = inp#out (_ , !y) λ !x -> sub-sound (F (inc !x) .force) (G !x .force) SubtypingQ : SessionType -> SessionType -> Set SubtypingQ T S = ∀{R} -> Compliance (R # T) -> Compliance (R # S) if-eq : ℙ -> SessionType -> SessionType -> Continuation force (if-eq x T S y) with x ?= y ... | yes _ = T ... | no _ = S input* : SessionType input* = inp λ _ -> λ where .force -> win input : ℙ -> SessionType -> SessionType -> SessionType input x T S = inp (if-eq x T S) input*-but : ℙ -> SessionType input*-but x = input x nil win output : ℙ -> SessionType -> SessionType -> SessionType output x T S = out (if-eq x T S) input-if-eq-comp : ∀{f x T} -> Compliance (T # f x .force) -> ∀{y} (!y : y ∈ dom f) -> ∞Compliance (if-eq x T win y .force # f y .force) force (input-if-eq-comp {_} {x} comp {y} !y) with x ?= y ... | yes refl = comp ... | no neq = win#def Win-win !y output-if-eq-comp : ∀{f : Continuation}{x}{T} -> Compliance (T # f x .force) -> ∀{y} (!y : y ∈ dom (if-eq x T nil)) -> ∞Compliance (if-eq x T nil y .force # f y .force) force (output-if-eq-comp {_} {x} comp {y} !y) with x ?= y ... | yes refl = comp force (output-if-eq-comp {_} {x} comp {y} ()) | no neq input*-comp : ∀{f} (W : Witness f) -> Compliance (input* # out f) input*-comp W = inp#out W λ !x -> λ where .force -> win#def Win-win !x input*-but-comp : ∀{f x} (W : Witness f) (N : ¬ x ∈ dom f) -> Compliance (input*-but x # out f) input*-but-comp {f} {x} W N = inp#out W aux where aux : ∀{y : ℙ} -> (fy : y ∈ dom f) -> ∞Compliance (if-eq x nil win y .force # f y .force) force (aux {y} fy) with x ?= y ... | yes refl = ⊥-elim (N fy) ... | no neq = win#def Win-win fy ∈-output-if-eq : ∀{R} (x : ℙ) -> Defined R -> x ∈ dom (if-eq x R nil) ∈-output-if-eq x def with x ?= x ... | yes refl = def ... | no neq = ⊥-elim (neq refl) input-comp : ∀{g x R} -> Compliance (R # g x .force) -> Compliance (input x R win # out g) input-comp {g} {x} comp = inp#out (x , proj₂ (compliance->defined comp)) (input-if-eq-comp {g} comp) output-comp : ∀{f x R} -> Compliance (R # f x .force) -> Compliance (output x R nil # inp f) output-comp {f} {x} comp = out#inp (_ , ∈-output-if-eq x (proj₁ (compliance->defined comp))) (output-if-eq-comp {f} comp) sub-inp-inp : ∀{f g} (spec : SubtypingQ (inp f) (inp g)) (x : ℙ) -> SubtypingQ (f x .force) (g x .force) sub-inp-inp spec x comp with spec (output-comp comp) ... | win#def (out U) def = ⊥-elim (U _ (∈-output-if-eq x (proj₁ (compliance->defined comp)))) ... | out#inp (y , fy) F with F fy .force ... | comp' with x ?= y ... | yes refl = comp' sub-inp-inp spec x comp | out#inp (y , fy) F | win#def () def | no neq sub-out-out : ∀{f g} (spec : SubtypingQ (out f) (out g)) -> ∀{x} -> x ∈ dom g -> SubtypingQ (f x .force) (g x .force) sub-out-out spec {x} gx comp with spec (input-comp comp) ... | inp#out W F with F gx .force ... | comp' with x ?= x ... | yes refl = comp' ... | no neq = ⊥-elim (neq refl) sub-out->def : ∀{f g} (spec : SubtypingQ (out f) (out g)) (Wf : Witness f) -> ∀{x} (gx : x ∈ dom g) -> x ∈ dom f sub-out->def {f} spec Wf {x} gx with x ∈? f ... | yes fx = fx ... | no nfx with spec (input*-but-comp Wf nfx) ... | inp#out W F with F gx .force ... | res with x ?= x sub-out->def {f} spec Wf {x} gx | no nfx | inp#out W F | win#def () def | yes refl ... | no neq = ⊥-elim (neq refl) sub-inp->def : ∀{f g} (spec : SubtypingQ (inp f) (inp g)) -> ∀{x} (fx : x ∈ dom f) -> x ∈ dom g sub-inp->def {f} spec {x} fx with spec {output x win nil} (output-comp (win#def Win-win fx)) ... | win#def (out U) def = ⊥-elim (U _ (∈-output-if-eq x out)) ... | out#inp W F with F (∈-output-if-eq x out) .force ... | comp = proj₂ (compliance->defined comp) sub-complete : ∀{T S i} -> SubtypingQ T S -> Thunk (Sub T S) i force (sub-complete {nil} {_} spec) = nil<:any force (sub-complete {inp f} {nil} spec) with spec {win} (win#def Win-win inp) ... | win#def _ () force (sub-complete {inp _} {inp _} spec) = inp<:inp (sub-inp->def spec) λ x -> sub-complete (sub-inp-inp spec x) force (sub-complete {inp f} {out _} spec) with Empty? f ... | inj₁ U = end<:def (inp U) out ... | inj₂ (x , ?x) with spec {output x win nil} (output-comp (win#def Win-win ?x)) ... | win#def (out U) def = ⊥-elim (U x (∈-output-if-eq x out)) force (sub-complete {out f} {nil} spec) with spec {win} (win#def Win-win out) ... | win#def _ () force (sub-complete {out f} {inp _} spec) with Empty? f ... | inj₁ U = end<:def (out U) inp ... | inj₂ W with spec {input*} (input*-comp W) ... | win#def () _ force (sub-complete {out f} {out g} spec) with Empty? f ... | inj₁ Uf = end<:def (out Uf) out ... | inj₂ Wf with Empty? g ... | inj₂ Wg = out<:out Wg (sub-out->def spec Wf) λ !x -> sub-complete (sub-out-out spec !x) ... | inj₁ Ug with spec {input*} (input*-comp Wf) ... | inp#out (_ , !x) F = ⊥-elim (Ug _ !x) SubtypingQ->SubtypingS : ∀{T S} -> SubtypingQ T S -> SubtypingS T S SubtypingQ->SubtypingS spec comp = compliance-sound (spec (compliance-complete comp .force)) SubtypingS->SubtypingQ : ∀{T S} -> SubtypingS T S -> SubtypingQ T S SubtypingS->SubtypingQ spec comp = compliance-complete (spec (compliance-sound comp)) .force sub-excluded : ∀{T S φ} (sub : T <: S) (tφ : T HasTrace φ) (nsφ : ¬ S HasTrace φ) -> ∃[ ψ ] ∃[ x ] (ψ ⊑ φ × T HasTrace ψ × S HasTrace ψ × T HasTrace (ψ ∷ʳ O x) × ¬ S HasTrace (ψ ∷ʳ O x)) sub-excluded nil<:any tφ nsφ = ⊥-elim (nil-has-no-trace tφ) sub-excluded (end<:def e def) tφ nsφ with end-has-empty-trace e tφ ... | eq rewrite eq = ⊥-elim (nsφ (_ , def , refl)) sub-excluded (inp<:inp inc F) (_ , tdef , refl) nsφ = ⊥-elim (nsφ (_ , inp , refl)) sub-excluded (inp<:inp {f} {g} inc F) (_ , tdef , step inp tr) nsφ = let ψ , x , pre , tψ , sψ , tψx , nψx = sub-excluded (F _ .force) (_ , tdef , tr) (contraposition inp-has-trace nsφ) in _ , _ , some pre , inp-has-trace tψ , inp-has-trace sψ , inp-has-trace tψx , inp-has-no-trace nψx sub-excluded (out<:out W inc F) (_ , tdef , refl) nsφ = ⊥-elim (nsφ (_ , out , refl)) sub-excluded (out<:out {f} {g} W inc F) (_ , tdef , step (out {_} {x} fx) tr) nsφ with x ∈? g ... | yes gx = let ψ , x , pre , tψ , sψ , tψx , nψx = sub-excluded (F gx .force) (_ , tdef , tr) (contraposition out-has-trace nsφ) in _ , _ , some pre , out-has-trace tψ , out-has-trace sψ , out-has-trace tψx , out-has-no-trace nψx ... | no ngx = [] , _ , none , (_ , out , refl) , (_ , out , refl) , (_ , fx , step (out fx) refl) , λ { (_ , _ , step (out gx) _) → ⊥-elim (ngx gx) } sub-after : ∀{T S φ} (tφ : T HasTrace φ) (sφ : S HasTrace φ) -> T <: S -> after tφ <: after sφ sub-after (_ , _ , refl) (_ , _ , refl) sub = sub sub-after tφ@(_ , _ , step inp _) (_ , _ , step inp _) (end<:def e _) with end-has-empty-trace e tφ ... | () sub-after (_ , tdef , step inp tr) (_ , sdef , step inp sr) (inp<:inp _ F) = sub-after (_ , tdef , tr) (_ , sdef , sr) (F _ .force) sub-after tφ@(_ , _ , step (out _) _) (_ , _ , step (out _) _) (end<:def e _) with end-has-empty-trace e tφ ... | () sub-after (_ , tdef , step (out _) tr) (_ , sdef , step (out gx) sr) (out<:out _ _ F) = sub-after (_ , tdef , tr) (_ , sdef , sr) (F gx .force) sub-simulation : ∀{R R' T S S' φ} (comp : Compliance (R # T)) (sub : T <: S) (rr : Transitions R (co-trace φ) R') (sr : Transitions S φ S') -> ∃[ T' ] (Transitions T φ T' × T' <: S') sub-simulation comp sub refl refl = _ , refl , sub sub-simulation (win#def (out U) def) sub (step (out hx) rr) (step inp sr) = ⊥-elim (U _ hx) sub-simulation (out#inp W F) (end<:def (inp U) def) (step (out hx) rr) (step inp sr) with F hx .force ... | comp = ⊥-elim (U _ (proj₂ (compliance->defined comp))) sub-simulation (out#inp W F) (inp<:inp inc G) (step (out hx) rr) (step inp sr) = let _ , tr , sub = sub-simulation (F hx .force) (G _ . force) rr sr in _ , step inp tr , sub sub-simulation (inp#out {h} {f} (_ , fx) F) (end<:def (out U) def) (step inp rr) (step (out gx) sr) with F fx .force ... | comp = ⊥-elim (U _ (proj₂ (compliance->defined comp))) sub-simulation (inp#out W F) (out<:out W₁ inc G) (step inp rr) (step (out fx) sr) = let _ , tr , sub = sub-simulation (F (inc fx) .force) (G fx .force) rr sr in _ , step (out (inc fx)) tr , sub
sharding-core/src/main/antlr4/imports/PostgreSQLAlterTable.g4
FloodDragon/sharding-sphere
0
361
grammar PostgreSQLAlterTable; import PostgreSQLKeyword, DataType, Keyword, PostgreSQLBase, BaseRule, Symbol; alterTable : alterTableNameWithAsterisk (alterTableActions | renameColumn | renameConstraint) | alterTableNameExists renameTable ; alterTableNameWithAsterisk : ALTER TABLE (IF EXISTS)? ONLY? tableName ASTERISK? ; alterTableOp : ALTER TABLE ; alterTableActions : alterTableAction (COMMA alterTableAction)* ; alterTableAction : addColumn | dropColumn | modifyColumn | addConstraint | ALTER CONSTRAINT constraintName constraintOptionalParam | VALIDATE CONSTRAINT constraintName | DROP CONSTRAINT (IF EXISTS)? constraintName (RESTRICT | CASCADE)? | (DISABLE |ENABLE) TRIGGER (triggerName | ALL | USER )? | ENABLE (REPLICA | ALWAYS) TRIGGER triggerName | (DISABLE | ENABLE) RULE rewriteRuleName | ENABLE (REPLICA | ALWAYS) RULE rewriteRuleName | (DISABLE | ENABLE | (NO? FORCE)) ROW LEVEL SECURITY | CLUSTER ON indexName | SET WITHOUT CLUSTER | SET (WITH | WITHOUT) OIDS | SET TABLESPACE tablespaceName | SET (LOGGED | UNLOGGED) | SET LP_ storageParameterWithValue (COMMA storageParameterWithValue)* RP_ | RESET LP_ storageParameter (COMMA storageParameter)* RP_ | INHERIT tableName | NO INHERIT tableName | OF typeName | NOT OF | OWNER TO (ownerName | CURRENT_USER | SESSION_USER) | REPLICA IDENTITY (DEFAULT | (USING INDEX indexName) | FULL | NOTHING) ; tableConstraintUsingIndex : (CONSTRAINT constraintName)? (UNIQUE | primaryKey) USING INDEX indexName constraintOptionalParam ; constraintOptionalParam : (NOT? DEFERRABLE)? (INITIALLY (DEFERRED |IMMEDIATE))? ; addColumn : ADD COLUMN? (IF NOT EXISTS )? columnDefinition ; dropColumn : DROP COLUMN? (IF EXISTS)? columnName (RESTRICT | CASCADE)? ; modifyColumn : alterColumn (SET DATA)? TYPE dataType collateClause? (USING simpleExpr)? | alterColumn SET DEFAULT expr | alterColumn DROP DEFAULT | alterColumn (SET | DROP) NOT NULL | alterColumn ADD GENERATED (ALWAYS | (BY DEFAULT)) AS IDENTITY (LP_ sequenceOptions RP_)? | alterColumn alterColumnSetOption alterColumnSetOption* | alterColumn DROP IDENTITY (IF EXISTS)? | alterColumn SET STATISTICS NUMBER | alterColumn SET LP_ attributeOptions RP_ | alterColumn RESET LP_ attributeOptions RP_ | alterColumn SET STORAGE (PLAIN | EXTERNAL | EXTENDED | MAIN) ; alterColumn : ALTER COLUMN? columnName ; alterColumnSetOption : SET (GENERATED (ALWAYS | BY DEFAULT) | sequenceOption) | RESTART (WITH? NUMBER)? ; attributeOptions : attributeOption (COMMA attributeOption)* ; attributeOption : ID EQ_ simpleExpr ; addConstraint : ADD (tableConstraint (NOT VALID)? | tableConstraintUsingIndex) ; renameColumn : RENAME COLUMN? columnName TO columnName ; renameConstraint : RENAME CONSTRAINT constraintName TO constraintName ; storageParameterWithValue : storageParameter EQ_ simpleExpr ; storageParameter : ID ; alterTableNameExists : alterTableOp (IF EXISTS)? tableName ; renameTable : RENAME TO tableName ;
mc-sema/validator/x86_64/tests/ADD_F64m.asm
randolphwong/mcsema
2
245107
BITS 64 ;TEST_FILE_META_BEGIN ;TEST_TYPE=TEST_F ;TEST_IGNOREFLAGS= ;TEST_FILE_META_END ; set up st0 to be 1.0 FLD1 ;TEST_BEGIN_RECORDING lea rdi, [rsp-08] ; 3.1415926 or there about mov dword [rdi+00], 0x54442d18 mov dword [rdi+04], 0x400921fb FADD qword [rdi] mov rdi, 0 ;TEST_END_RECORDING
oeis/052/A052735.asm
neoneye/loda-programs
11
22035
<reponame>neoneye/loda-programs ; A052735: E.g.f. (1-x -sqrt(1-2*x-3*x^2) )/2. ; Submitted by <NAME> ; 0,0,2,6,48,480,6480,105840,2056320,46085760,1172102400,33330528000,1048055500800,36104266598400,1352222474803200,54706557185280000,2377540306132992000,110466555918630912000,5464214679506558976000 mov $2,$0 seq $0,126068 ; Expansion of 1 - x - sqrt(1 - 2*x - 3*x^2) in powers of x. lpb $2 mul $0,$2 sub $2,1 lpe div $0,2
oeis/174/A174687.asm
neoneye/loda-programs
11
6173
; A174687: Central coefficients T(2n,n) of the Catalan triangle A033184. ; Submitted by <NAME>(s3) ; 1,2,9,48,275,1638,9996,62016,389367,2466750,15737865,100975680,650872404,4211628008,27341497800,177996090624,1161588834303,7596549816030,49772989810635,326658445806000,2147042307851595,14130873926790390,93115841412899760,614265689787160320,4056255950045422500,26809847562154337928,177349970171819554956,1174105900546396874112,7778530411333396100664,51567898966285508521200,342083970650885005051344,2270592737556481254478848,15079348869377692177337103,100195425187663904084619486 mov $2,$0 mul $0,2 add $2,1 sub $1,$2 bin $1,$0 mul $1,$2 mov $3,1 add $3,$0 div $1,$3 mov $0,$1
experiments/tests/remove.als
kaiyuanw/ASketch
1
3290
<filename>experiments/tests/remove.als pred Test0{ some disj List0 : List | some disj Node0, Node1, Node2 : Node | some disj Object0, Object1, Object2 : Object { List = List0 Node = Node0 + Node1 + Node2 Object = Object0 + Object1 + Object2 header = List0->Node0 header' = List0->Node0 elem = Node0->Object0 + Node1->Object1 + Node2->Object2 elem' = Node0->Object0 + Node1->Object1 + Node2->Object2 link = Node0->Node1 + Node1->Node2 link' = Node0->Node1 + Node1->Node2 !Remove[List0,Object2] } } pred Test1{ some disj List0 : List | some disj Node0, Node1, Node2 : Node | some disj Object0, Object1, Object2 : Object { List = List0 Node = Node0 + Node1 + Node2 Object = Object0 + Object1 + Object2 header = List0->Node0 header' = List0->Node0 elem = Node0->Object0 + Node1->Object1 + Node2->Object2 elem' = Node0->Object0 + Node1->Object1 + Node2->Object2 link = Node0->Node1 + Node1->Node2 link' = Node0->Node1 Remove[List0,Object2] } } pred Test2{ some disj List0 : List | some disj Node0, Node1 : Node | some disj Object0, Object1, Object2 : Object { List = List0 Node = Node0 + Node1 Object = Object0 + Object1 + Object2 header = List0->Node0 header' = List0->Node1 elem = Node0->Object0 + Node1->Object1 elem' = Node0->Object0 + Node1->Object1 link = Node0->Node1 no link' !Remove[List0,Object1] } } pred Test3{ some disj List0 : List | some disj Node0 : Node | some disj Object0 : Object { List = List0 Node = Node0 Object = Object0 no header no header' elem = Node0->Object0 elem' = Node0->Object0 link = Node0->Node0 link' = Node0->Node0 Remove[List0,Object0] } } pred Test4{ some disj List0 : List | some disj Node0 : Node | some disj Object0 : Object { List = List0 Node = Node0 Object = Object0 header=List0->Node0 header'= List0 -> Node0 elem = Node0->Object0 elem' = Node0->Object0 link = Node0->Node0 no link' !Remove[List0,Object0] } } pred Test5{ some disj List0 : List | some disj Node0, Node1 : Node | some disj Object0, Object1 : Object { List = List0 Node = Node0 + Node1 Object = Object0 + Object1 header=List0->Node0 header'= List0 -> Node0 elem = Node0->Object0 + Node1->Object1 elem' = Node0->Object0 + Node1 -> Object1 link = Node0->Node0 + Node1->Node0 link' = Node0 -> Node0 + Node1->Node0 Remove[List0,Object1] } } pred Test6{ some disj List0 : List | some disj Node0, Node1 : Node | some disj Object0, Object1 : Object { List = List0 Node = Node0 + Node1 Object = Object0 + Object1 header=List0->Node0 no header' elem = Node0->Object0 + Node1->Object1 elem' = Node0->Object0 + Node1->Object1 link = Node0->Node0 + Node1->Node0 link' = Node0 -> Node0 Remove[List0,Object0] } } pred Test7{ some disj List0 : List | some disj Object0 : Object { List = List0 no Node Object = Object0 no header no header' no elem no elem' no link no link' Remove[List0,Object0] } } pred Test8{ some disj List0 : List | some disj Node0, Node1 : Node | some disj Object0, Object1 : Object { List = List0 Node = Node0 + Node1 Object = Object0 + Object1 header = List0->Node1 header' = List0->Node0 elem = Node0->Object0 + Node1->Object1 elem' = Node0->Object0 + Node1->Object1 link = Node0->Node1 + Node1->Node1 link' = Node0->Node0 !Remove[List0,Object0] } } pred Test9{ some disj List0 : List | some disj Node0, Node1 : Node | some disj Object0, Object1 : Object { List = List0 Node = Node0 + Node1 Object = Object0 + Object1 header = List0->Node1 header' = List0->Node1 elem = Node0->Object0 + Node1->Object1 elem' = Node0->Object0 + Node1->Object1 link = Node1->Node0 + Node0->Node0 link' = Node0->Node1 + Node1->Node1 Remove[List0,Object0] } } pred Test10{ some disj List0 : List | some disj Node0, Node1 : Node | some disj Object0, Object1 : Object { List = List0 Node = Node0 + Node1 Object = Object0 + Object1 header = List0->Node0 header' = List0->Node0 elem = Node0->Object0 + Node1->Object1 elem' = Node0->Object0 + Node1->Object1 link = Node0->Node0 link' = Node0->Node1 !Remove[List0,Object0] } } pred Test11{ some disj List0 : List | some disj Node0, Node1 : Node | some disj Object0, Object1, Object2 : Object { List = List0 Node = Node0 + Node1 Object = Object0 + Object1 + Object2 header = List0->Node1 header' = List0->Node1 elem = Node0->Object1 + Node1->Object0 elem' = Node0->Object0 + Node1->Object1 link = Node0->Node0 no link' !Remove[List0,Object0] } } pred Test12{ some disj List0 : List | some disj Node0, Node1 : Node | some disj Object0, Object1, Object2 : Object { List = List0 Node = Node0 + Node1 Object = Object0 + Object1 + Object2 header = List0->Node1 header' = List0->Node1 elem = Node0->Object1 + Node1->Object0 elem' = Node0->Object0 + Node1->Object1 link = Node0->Node0 no link' !Remove[List0,Object1] } } pred Test13{ some disj List0 : List | some disj Node0 : Node | some disj Object0, Object1 : Object { List = List0 Node = Node0 Object = Object0 + Object1 no header no header' elem = Node0->Object0 elem' = Node0->Object1 link = Node0->Node0 no link' Remove[List0,Object0] } } pred Test14{ some disj List0 : List | some disj Node0, Node1 : Node | some disj Object0, Object1, Object2 : Object { List = List0 Node = Node0 + Node1 Object = Object0 + Object1 + Object2 header = List0->Node1 header' = List0->Node0 elem = Node1->Object0 + Node0->Object1 elem' = Node1->Object1 + Node0->Object1 link = Node1->Node0 no link' Remove[List0,Object0] } } pred Test15{ some disj List0 : List | some disj Node0, Node1 : Node | some disj Object0, Object1, Object2 : Object { List = List0 Node = Node0 + Node1 Object = Object0 + Object1 + Object2 header = List0->Node1 header' = List0->Node0 elem = Node1->Object0 + Node0->Object1 elem' = Node1->Object1 + Node0->Object1 link = Node1->Node0 no link' !Remove[List0,Object2] } } pred Test16{ some disj List0 : List | some disj Node0, Node1, Node2 : Node | some disj Object0, Object1, Object2 : Object { List = List0 Node = Node0 + Node1 + Node2 Object = Object0 + Object1 + Object2 header = List0->Node2 header' = List0->Node2 elem = Node0->Object1 + Node1->Object0 + Node2->Object1 elem' = Node0->Object1 + Node1->Object0 + Node2->Object1 link = Node2->Node1 link' = Node1->Node0 + Node2->Node1 Remove[List0,Object2] } } pred Test17{ some disj List0 : List | some disj Node0, Node1 : Node | some disj Object0 : Object { List = List0 Node = Node0 + Node1 Object = Object0 header = List0->Node1 no header' elem = Node1->Object0 elem' = Node0->Object0 link = Node1->Node0 link' = Node1->Node0 + Node0->Node0 Remove[List0,Object0] } } pred Test18{ some disj List0 : List | some disj Node0, Node1, Node2 : Node | some disj Object0, Object1 : Object { List = List0 Node = Node0 + Node1 + Node2 Object = Object0 + Object1 header = List0->Node2 header' = List0->Node1 elem = Node2->Object1 + Node0->Object0 elem' = Node1->Object0 link = Node2->Node1 + Node1->Node0 no link' Remove[List0,Object1] } } pred Test19{ some disj List0 : List | some disj Node0, Node1 : Node | some disj Object0, Object1 : Object { List = List0 Node = Node0 + Node1 Object = Object + Object1 no header no header' elem = Node1 ->Object1 + Node0->Object0 no elem' link = Node1->Node0 no link' Remove[List0,Object1] } }
source/league/matreshka-cldr-collation_data.adb
svn2github/matreshka
24
16551
<reponame>svn2github/matreshka ------------------------------------------------------------------------------ -- -- -- Matreshka Project -- -- -- -- Localization, Internationalization, Globalization for Ada -- -- -- -- Runtime Library Component -- -- -- ------------------------------------------------------------------------------ -- -- -- Copyright © 2014, <NAME> <<EMAIL>> -- -- All rights reserved. -- -- -- -- Redistribution and use in source and binary forms, with or without -- -- modification, are permitted provided that the following conditions -- -- are met: -- -- -- -- * Redistributions of source code must retain the above copyright -- -- notice, this list of conditions and the following disclaimer. -- -- -- -- * Redistributions in binary form must reproduce the above copyright -- -- notice, this list of conditions and the following disclaimer in the -- -- documentation and/or other materials provided with the distribution. -- -- -- -- * Neither the name of the Vadim Godunko, IE nor the names of its -- -- contributors may be used to endorse or promote products derived from -- -- this software without specific prior written permission. -- -- -- -- THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -- -- "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -- -- LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -- -- A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -- -- HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -- -- SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED -- -- TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR -- -- PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF -- -- LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING -- -- NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS -- -- SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -- -- -- ------------------------------------------------------------------------------ -- $Revision$ $Date$ ------------------------------------------------------------------------------ with Ada.Unchecked_Deallocation; package body Matreshka.CLDR.Collation_Data is use type Matreshka.Internals.Unicode.Ucd.Collation_Weight; procedure Free is new Ada.Unchecked_Deallocation (Collation_Record, Collation_Record_Access); procedure Free is new Ada.Unchecked_Deallocation (Collation_Element_Array, Collation_Element_Array_Access); function Lookup (Data : Collation_Information; Item : Code_Point_Array) return Collation_Record_Access; procedure Attach (Data : in out Collation_Information; After : Collation_Record_Access; Item : Collation_Record_Access); -- Attach given collation record into the list of relative position of -- collation records immidiately after specified collation record. procedure Detach (Data : in out Collation_Information; Item : Collation_Record_Access); -- Detach given collation record from the list of relative position of -- collation records. procedure Recompute_Trinary (Current_Record : Collation_Record_Access); -- Resolves conflict at trinary level. ------------ -- Attach -- ------------ procedure Attach (Data : in out Collation_Information; After : Collation_Record_Access; Item : Collation_Record_Access) is begin if Data.Greater_Record = After then Data.Greater_Record := Item; end if; Item.Greater_Or_Equal := After.Greater_Or_Equal; Item.Less_Or_Equal := After; if After.Greater_Or_Equal /= null then After.Greater_Or_Equal.Less_Or_Equal := Item; end if; After.Greater_Or_Equal := Item; end Attach; ------------ -- Detach -- ------------ procedure Detach (Data : in out Collation_Information; Item : Collation_Record_Access) is begin -- Remove all other collation records. if Data.Lower_Record = Item then Data.Lower_Record := Item.Greater_Or_Equal; end if; if Data.Greater_Record = Item then Data.Greater_Record := Item.Less_Or_Equal; end if; if Item.Less_Or_Equal /= null then Item.Less_Or_Equal.Greater_Or_Equal := Item.Greater_Or_Equal; end if; if Item.Greater_Or_Equal /= null then Item.Greater_Or_Equal.Less_Or_Equal := Item.Less_Or_Equal; end if; Item.Less_Or_Equal := null; Item.Greater_Or_Equal := null; end Detach; ------------ -- Lookup -- ------------ function Lookup (Data : Collation_Information; Item : Code_Point_Array) return Collation_Record_Access is Current : Collation_Record_Access := Data.Collations (Item (Item'First)); begin while Current /= null loop exit when Current.Contractors.all = Item; Current := Current.Next; end loop; return Current; end Lookup; ----------------------- -- Recompute_Trinary -- ----------------------- procedure Recompute_Trinary (Current_Record : Collation_Record_Access) is Next_Record : constant Collation_Record_Access := Current_Record.Greater_Or_Equal; begin Current_Record.Collations (1).Trinary := Current_Record.Collations (1).Trinary + 1; if Next_Record.Collations (1).Primary = Current_Record.Collations (1).Primary and Next_Record.Collations (1).Secondary = Current_Record.Collations (1).Secondary and Next_Record.Collations (1).Trinary <= Current_Record.Collations (1).Trinary then raise Program_Error; end if; end Recompute_Trinary; ------------- -- Reorder -- ------------- procedure Reorder (Data : in out Collation_Information; Reset_Code : Matreshka.Internals.Unicode.Code_Point; Operator : Collation_Operator; Relation_Code : Matreshka.Internals.Unicode.Code_Point) is Reset_Record : constant Collation_Record_Access := Lookup (Data, (1 => Reset_Code)); Relation_Record : constant Collation_Record_Access := Lookup (Data, (1 => Relation_Code)); Next_Record : Collation_Record_Access; begin -- Detach relation collation record. Detach (Data, Relation_Record); -- Constructs collation elements. Free (Relation_Record.Collations); Relation_Record.Collations := new Collation_Element_Array'(Reset_Record.Collations.all); if Relation_Record.Collations'Length /= 1 then raise Program_Error; end if; case Operator is when Identically => raise Program_Error; when Primary => Relation_Record.Collations (1).Primary := Relation_Record.Collations (1).Primary + 1; Relation_Record.Collations (1).Secondary := 16#0020#; Relation_Record.Collations (1).Trinary := 16#0002#; -- Skip all elements with primary weight equal to reset position. Next_Record := Reset_Record.Greater_Or_Equal; while Next_Record.Collations (1).Primary = Reset_Record.Collations (1).Primary loop Next_Record := Next_Record.Greater_Or_Equal; end loop; -- And insert new collation record before it. Attach (Data, Next_Record.Less_Or_Equal, Relation_Record); if Next_Record.Collations (1).Primary <= Relation_Record.Collations (1).Primary then -- Reordering of the following records are not supported (and -- generally not need to be supported due to construction of -- initial data). raise Program_Error; end if; when Secondary => Relation_Record.Collations (1).Secondary := Relation_Record.Collations (1).Secondary + 1; Next_Record := Reset_Record.Greater_Or_Equal; -- Skip all elements with primary and secondary weights equal to -- reset positon. while Next_Record.Collations (1).Primary = Reset_Record.Collations (1).Primary and Next_Record.Collations (1).Secondary = Reset_Record.Collations (1).Secondary loop Next_Record := Next_Record.Greater_Or_Equal; end loop; -- And insert new collation record before it. Attach (Data, Next_Record.Less_Or_Equal, Relation_Record); if Next_Record.Collations (1).Primary = Relation_Record.Collations (1).Primary and Next_Record.Collations (1).Secondary <= Relation_Record.Collations (1).Secondary then raise Program_Error; end if; when Trinary => Relation_Record.Collations (1).Trinary := Relation_Record.Collations (1).Trinary + 1; Next_Record := Reset_Record.Greater_Or_Equal; -- Skip all elements with primary, secondary and trinary weights -- equal to reset positon. while Next_Record.Collations (1).Primary = Reset_Record.Collations (1).Primary and Next_Record.Collations (1).Secondary = Reset_Record.Collations (1).Secondary and Next_Record.Collations (1).Trinary = Reset_Record.Collations (1).Trinary loop Next_Record := Next_Record.Greater_Or_Equal; end loop; -- And insert new collation record before it. Attach (Data, Next_Record.Less_Or_Equal, Relation_Record); if Next_Record.Collations (1).Primary = Relation_Record.Collations (1).Primary and Next_Record.Collations (1).Secondary = Relation_Record.Collations (1).Secondary and Next_Record.Collations (1).Trinary <= Relation_Record.Collations (1).Trinary then Recompute_Trinary (Next_Record); end if; end case; end Reorder; --------------------------- -- Suppress_Contractions -- --------------------------- procedure Suppress_Contractions (Data : in out Collation_Information; Code : Matreshka.Internals.Unicode.Code_Point) is Current : Collation_Record_Access; Next : Collation_Record_Access; begin Current := Data.Collations (Code); while Current /= null loop Next := Current.Next; if Current.Contractors'Length = 1 then -- Only one collation record can be provides for single code -- point by construction. Left this collation record. Data.Collations (Code) := Current; Current.Next := null; else -- Remove all other collation records. if Data.Lower_Record = Current then Data.Lower_Record := Current.Greater_Or_Equal; end if; if Data.Greater_Record = Current then Data.Greater_Record := Current.Less_Or_Equal; end if; if Current.Less_Or_Equal /= null then Current.Less_Or_Equal.Greater_Or_Equal := Current.Greater_Or_Equal; end if; if Current.Greater_Or_Equal /= null then Current.Greater_Or_Equal.Less_Or_Equal := Current.Less_Or_Equal; end if; Free (Current); end if; Current := Next; end loop; end Suppress_Contractions; end Matreshka.CLDR.Collation_Data;
data/mapObjects/cinnabarisland.asm
etdv-thevoid/pokemon-rgb-enhanced
1
162269
CinnabarIslandObject: db $43 ; border block db $5 ; warps db $3, $6, $1, MANSION_1 db $3, $12, $0, CINNABAR_GYM db $9, $6, $0, CINNABAR_LAB_1 db $b, $b, $0, CINNABAR_POKECENTER db $b, $f, $0, CINNABAR_MART db $5 ; signs db $5, $9, $3 ; CinnabarIslandText3 db $b, $10, $4 ; MartSignText db $b, $c, $5 ; PokeCenterSignText db $b, $9, $6 ; CinnabarIslandText6 db $3, $d, $7 ; CinnabarIslandText7 db $2 ; objects object SPRITE_GIRL, $c, $7, WALK, $2, $1 ; person object SPRITE_GAMBLER, $7, $5, STAY, NONE, $2 ; person ; warp-to EVENT_DISP CINNABAR_ISLAND_WIDTH, $3, $6 ; MANSION_1 EVENT_DISP CINNABAR_ISLAND_WIDTH, $3, $12 ; CINNABAR_GYM EVENT_DISP CINNABAR_ISLAND_WIDTH, $9, $6 ; CINNABAR_LAB_1 EVENT_DISP CINNABAR_ISLAND_WIDTH, $b, $b ; CINNABAR_POKECENTER EVENT_DISP CINNABAR_ISLAND_WIDTH, $b, $f ; CINNABAR_MART
support/MinGW/lib/gcc/mingw32/9.2.0/adainclude/a-cbmutr.adb
orb-zhuchen/Orb
0
402
<reponame>orb-zhuchen/Orb ------------------------------------------------------------------------------ -- -- -- GNAT LIBRARY COMPONENTS -- -- -- -- ADA.CONTAINERS.BOUNDED_MULTIWAY_TREES -- -- -- -- B o d y -- -- -- -- Copyright (C) 2011-2019, Free Software Foundation, Inc. -- -- -- -- GNAT is free software; you can redistribute it and/or modify it under -- -- terms of the GNU General Public License as published by the Free Soft- -- -- ware Foundation; either version 3, or (at your option) any later ver- -- -- sion. GNAT is distributed in the hope that it will be useful, but WITH- -- -- OUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY -- -- or FITNESS FOR A PARTICULAR PURPOSE. -- -- -- -- As a special exception under Section 7 of GPL version 3, you are granted -- -- additional permissions described in the GCC Runtime Library Exception, -- -- version 3.1, as published by the Free Software Foundation. -- -- -- -- You should have received a copy of the GNU General Public License and -- -- a copy of the GCC Runtime Library Exception along with this program; -- -- see the files COPYING3 and COPYING.RUNTIME respectively. If not, see -- -- <http://www.gnu.org/licenses/>. -- -- -- -- This unit was originally developed by <NAME>. -- ------------------------------------------------------------------------------ with Ada.Finalization; with System; use type System.Address; package body Ada.Containers.Bounded_Multiway_Trees is pragma Warnings (Off, "variable ""Busy*"" is not referenced"); pragma Warnings (Off, "variable ""Lock*"" is not referenced"); -- See comment in Ada.Containers.Helpers use Finalization; -------------------- -- Root_Iterator -- -------------------- type Root_Iterator is abstract new Limited_Controlled and Tree_Iterator_Interfaces.Forward_Iterator with record Container : Tree_Access; Subtree : Count_Type; end record; overriding procedure Finalize (Object : in out Root_Iterator); ----------------------- -- Subtree_Iterator -- ----------------------- type Subtree_Iterator is new Root_Iterator with null record; overriding function First (Object : Subtree_Iterator) return Cursor; overriding function Next (Object : Subtree_Iterator; Position : Cursor) return Cursor; --------------------- -- Child_Iterator -- --------------------- type Child_Iterator is new Root_Iterator and Tree_Iterator_Interfaces.Reversible_Iterator with null record; overriding function First (Object : Child_Iterator) return Cursor; overriding function Next (Object : Child_Iterator; Position : Cursor) return Cursor; overriding function Last (Object : Child_Iterator) return Cursor; overriding function Previous (Object : Child_Iterator; Position : Cursor) return Cursor; ----------------------- -- Local Subprograms -- ----------------------- procedure Initialize_Node (Container : in out Tree; Index : Count_Type); procedure Initialize_Root (Container : in out Tree); procedure Allocate_Node (Container : in out Tree; Initialize_Element : not null access procedure (Index : Count_Type); New_Node : out Count_Type); procedure Allocate_Node (Container : in out Tree; New_Item : Element_Type; New_Node : out Count_Type); procedure Allocate_Node (Container : in out Tree; Stream : not null access Root_Stream_Type'Class; New_Node : out Count_Type); procedure Deallocate_Node (Container : in out Tree; X : Count_Type); procedure Deallocate_Children (Container : in out Tree; Subtree : Count_Type; Count : in out Count_Type); procedure Deallocate_Subtree (Container : in out Tree; Subtree : Count_Type; Count : in out Count_Type); function Equal_Children (Left_Tree : Tree; Left_Subtree : Count_Type; Right_Tree : Tree; Right_Subtree : Count_Type) return Boolean; function Equal_Subtree (Left_Tree : Tree; Left_Subtree : Count_Type; Right_Tree : Tree; Right_Subtree : Count_Type) return Boolean; procedure Iterate_Children (Container : Tree; Subtree : Count_Type; Process : not null access procedure (Position : Cursor)); procedure Iterate_Subtree (Container : Tree; Subtree : Count_Type; Process : not null access procedure (Position : Cursor)); procedure Copy_Children (Source : Tree; Source_Parent : Count_Type; Target : in out Tree; Target_Parent : Count_Type; Count : in out Count_Type); procedure Copy_Subtree (Source : Tree; Source_Subtree : Count_Type; Target : in out Tree; Target_Parent : Count_Type; Target_Subtree : out Count_Type; Count : in out Count_Type); function Find_In_Children (Container : Tree; Subtree : Count_Type; Item : Element_Type) return Count_Type; function Find_In_Subtree (Container : Tree; Subtree : Count_Type; Item : Element_Type) return Count_Type; function Child_Count (Container : Tree; Parent : Count_Type) return Count_Type; function Subtree_Node_Count (Container : Tree; Subtree : Count_Type) return Count_Type; function Is_Reachable (Container : Tree; From, To : Count_Type) return Boolean; function Root_Node (Container : Tree) return Count_Type; procedure Remove_Subtree (Container : in out Tree; Subtree : Count_Type); procedure Insert_Subtree_Node (Container : in out Tree; Subtree : Count_Type'Base; Parent : Count_Type; Before : Count_Type'Base); procedure Insert_Subtree_List (Container : in out Tree; First : Count_Type'Base; Last : Count_Type'Base; Parent : Count_Type; Before : Count_Type'Base); procedure Splice_Children (Container : in out Tree; Target_Parent : Count_Type; Before : Count_Type'Base; Source_Parent : Count_Type); procedure Splice_Children (Target : in out Tree; Target_Parent : Count_Type; Before : Count_Type'Base; Source : in out Tree; Source_Parent : Count_Type); procedure Splice_Subtree (Target : in out Tree; Parent : Count_Type; Before : Count_Type'Base; Source : in out Tree; Position : in out Count_Type); -- source on input, target on output --------- -- "=" -- --------- function "=" (Left, Right : Tree) return Boolean is begin if Left.Count /= Right.Count then return False; end if; if Left.Count = 0 then return True; end if; return Equal_Children (Left_Tree => Left, Left_Subtree => Root_Node (Left), Right_Tree => Right, Right_Subtree => Root_Node (Right)); end "="; ------------------- -- Allocate_Node -- ------------------- procedure Allocate_Node (Container : in out Tree; Initialize_Element : not null access procedure (Index : Count_Type); New_Node : out Count_Type) is begin if Container.Free >= 0 then New_Node := Container.Free; pragma Assert (New_Node in Container.Elements'Range); -- We always perform the assignment first, before we change container -- state, in order to defend against exceptions duration assignment. Initialize_Element (New_Node); Container.Free := Container.Nodes (New_Node).Next; else -- A negative free store value means that the links of the nodes in -- the free store have not been initialized. In this case, the nodes -- are physically contiguous in the array, starting at the index that -- is the absolute value of the Container.Free, and continuing until -- the end of the array (Nodes'Last). New_Node := abs Container.Free; pragma Assert (New_Node in Container.Elements'Range); -- As above, we perform this assignment first, before modifying any -- container state. Initialize_Element (New_Node); Container.Free := Container.Free - 1; if abs Container.Free > Container.Capacity then Container.Free := 0; end if; end if; Initialize_Node (Container, New_Node); end Allocate_Node; procedure Allocate_Node (Container : in out Tree; New_Item : Element_Type; New_Node : out Count_Type) is procedure Initialize_Element (Index : Count_Type); procedure Initialize_Element (Index : Count_Type) is begin Container.Elements (Index) := New_Item; end Initialize_Element; begin Allocate_Node (Container, Initialize_Element'Access, New_Node); end Allocate_Node; procedure Allocate_Node (Container : in out Tree; Stream : not null access Root_Stream_Type'Class; New_Node : out Count_Type) is procedure Initialize_Element (Index : Count_Type); procedure Initialize_Element (Index : Count_Type) is begin Element_Type'Read (Stream, Container.Elements (Index)); end Initialize_Element; begin Allocate_Node (Container, Initialize_Element'Access, New_Node); end Allocate_Node; ------------------- -- Ancestor_Find -- ------------------- function Ancestor_Find (Position : Cursor; Item : Element_Type) return Cursor is R, N : Count_Type; begin if Checks and then Position = No_Element then raise Constraint_Error with "Position cursor has no element"; end if; -- AI-0136 says to raise PE if Position equals the root node. This does -- not seem correct, as this value is just the limiting condition of the -- search. For now we omit this check, pending a ruling from the ARG. -- ??? -- -- if Checks and then Is_Root (Position) then -- raise Program_Error with "Position cursor designates root"; -- end if; R := Root_Node (Position.Container.all); N := Position.Node; while N /= R loop if Position.Container.Elements (N) = Item then return Cursor'(Position.Container, N); end if; N := Position.Container.Nodes (N).Parent; end loop; return No_Element; end Ancestor_Find; ------------------ -- Append_Child -- ------------------ procedure Append_Child (Container : in out Tree; Parent : Cursor; New_Item : Element_Type; Count : Count_Type := 1) is Nodes : Tree_Node_Array renames Container.Nodes; First, Last : Count_Type; begin if Checks and then Parent = No_Element then raise Constraint_Error with "Parent cursor has no element"; end if; if Checks and then Parent.Container /= Container'Unrestricted_Access then raise Program_Error with "Parent cursor not in container"; end if; if Count = 0 then return; end if; if Checks and then Container.Count > Container.Capacity - Count then raise Capacity_Error with "requested count exceeds available storage"; end if; TC_Check (Container.TC); if Container.Count = 0 then Initialize_Root (Container); end if; Allocate_Node (Container, New_Item, First); Nodes (First).Parent := Parent.Node; Last := First; for J in Count_Type'(2) .. Count loop Allocate_Node (Container, New_Item, Nodes (Last).Next); Nodes (Nodes (Last).Next).Parent := Parent.Node; Nodes (Nodes (Last).Next).Prev := Last; Last := Nodes (Last).Next; end loop; Insert_Subtree_List (Container => Container, First => First, Last => Last, Parent => Parent.Node, Before => No_Node); -- means "insert at end of list" Container.Count := Container.Count + Count; end Append_Child; ------------ -- Assign -- ------------ procedure Assign (Target : in out Tree; Source : Tree) is Target_Count : Count_Type; begin if Target'Address = Source'Address then return; end if; if Checks and then Target.Capacity < Source.Count then raise Capacity_Error -- ??? with "Target capacity is less than Source count"; end if; Target.Clear; -- Checks busy bit if Source.Count = 0 then return; end if; Initialize_Root (Target); -- Copy_Children returns the number of nodes that it allocates, but it -- does this by incrementing the count value passed in, so we must -- initialize the count before calling Copy_Children. Target_Count := 0; Copy_Children (Source => Source, Source_Parent => Root_Node (Source), Target => Target, Target_Parent => Root_Node (Target), Count => Target_Count); pragma Assert (Target_Count = Source.Count); Target.Count := Source.Count; end Assign; ----------------- -- Child_Count -- ----------------- function Child_Count (Parent : Cursor) return Count_Type is begin if Parent = No_Element then return 0; elsif Parent.Container.Count = 0 then pragma Assert (Is_Root (Parent)); return 0; else return Child_Count (Parent.Container.all, Parent.Node); end if; end Child_Count; function Child_Count (Container : Tree; Parent : Count_Type) return Count_Type is NN : Tree_Node_Array renames Container.Nodes; CC : Children_Type renames NN (Parent).Children; Result : Count_Type; Node : Count_Type'Base; begin Result := 0; Node := CC.First; while Node > 0 loop Result := Result + 1; Node := NN (Node).Next; end loop; return Result; end Child_Count; ----------------- -- Child_Depth -- ----------------- function Child_Depth (Parent, Child : Cursor) return Count_Type is Result : Count_Type; N : Count_Type'Base; begin if Checks and then Parent = No_Element then raise Constraint_Error with "Parent cursor has no element"; end if; if Checks and then Child = No_Element then raise Constraint_Error with "Child cursor has no element"; end if; if Checks and then Parent.Container /= Child.Container then raise Program_Error with "Parent and Child in different containers"; end if; if Parent.Container.Count = 0 then pragma Assert (Is_Root (Parent)); pragma Assert (Child = Parent); return 0; end if; Result := 0; N := Child.Node; while N /= Parent.Node loop Result := Result + 1; N := Parent.Container.Nodes (N).Parent; if Checks and then N < 0 then raise Program_Error with "Parent is not ancestor of Child"; end if; end loop; return Result; end Child_Depth; ----------- -- Clear -- ----------- procedure Clear (Container : in out Tree) is Container_Count : constant Count_Type := Container.Count; Count : Count_Type; begin TC_Check (Container.TC); if Container_Count = 0 then return; end if; Container.Count := 0; -- Deallocate_Children returns the number of nodes that it deallocates, -- but it does this by incrementing the count value that is passed in, -- so we must first initialize the count return value before calling it. Count := 0; Deallocate_Children (Container => Container, Subtree => Root_Node (Container), Count => Count); pragma Assert (Count = Container_Count); end Clear; ------------------------ -- Constant_Reference -- ------------------------ function Constant_Reference (Container : aliased Tree; Position : Cursor) return Constant_Reference_Type is begin if Checks and then Position.Container = null then raise Constraint_Error with "Position cursor has no element"; end if; if Checks and then Position.Container /= Container'Unrestricted_Access then raise Program_Error with "Position cursor designates wrong container"; end if; if Checks and then Position.Node = Root_Node (Container) then raise Program_Error with "Position cursor designates root"; end if; -- Implement Vet for multiway tree??? -- pragma Assert (Vet (Position), -- "Position cursor in Constant_Reference is bad"); declare TC : constant Tamper_Counts_Access := Container.TC'Unrestricted_Access; begin return R : constant Constant_Reference_Type := (Element => Container.Elements (Position.Node)'Access, Control => (Controlled with TC)) do Lock (TC.all); end return; end; end Constant_Reference; -------------- -- Contains -- -------------- function Contains (Container : Tree; Item : Element_Type) return Boolean is begin return Find (Container, Item) /= No_Element; end Contains; ---------- -- Copy -- ---------- function Copy (Source : Tree; Capacity : Count_Type := 0) return Tree is C : Count_Type; begin if Capacity = 0 then C := Source.Count; elsif Capacity >= Source.Count then C := Capacity; elsif Checks then raise Capacity_Error with "Capacity value too small"; end if; return Target : Tree (Capacity => C) do Initialize_Root (Target); if Source.Count = 0 then return; end if; Copy_Children (Source => Source, Source_Parent => Root_Node (Source), Target => Target, Target_Parent => Root_Node (Target), Count => Target.Count); pragma Assert (Target.Count = Source.Count); end return; end Copy; ------------------- -- Copy_Children -- ------------------- procedure Copy_Children (Source : Tree; Source_Parent : Count_Type; Target : in out Tree; Target_Parent : Count_Type; Count : in out Count_Type) is S_Nodes : Tree_Node_Array renames Source.Nodes; S_Node : Tree_Node_Type renames S_Nodes (Source_Parent); T_Nodes : Tree_Node_Array renames Target.Nodes; T_Node : Tree_Node_Type renames T_Nodes (Target_Parent); pragma Assert (T_Node.Children.First <= 0); pragma Assert (T_Node.Children.Last <= 0); T_CC : Children_Type; C : Count_Type'Base; begin -- We special-case the first allocation, in order to establish the -- representation invariants for type Children_Type. C := S_Node.Children.First; if C <= 0 then -- source parent has no children return; end if; Copy_Subtree (Source => Source, Source_Subtree => C, Target => Target, Target_Parent => Target_Parent, Target_Subtree => T_CC.First, Count => Count); T_CC.Last := T_CC.First; -- The representation invariants for the Children_Type list have been -- established, so we can now copy the remaining children of Source. C := S_Nodes (C).Next; while C > 0 loop Copy_Subtree (Source => Source, Source_Subtree => C, Target => Target, Target_Parent => Target_Parent, Target_Subtree => T_Nodes (T_CC.Last).Next, Count => Count); T_Nodes (T_Nodes (T_CC.Last).Next).Prev := T_CC.Last; T_CC.Last := T_Nodes (T_CC.Last).Next; C := S_Nodes (C).Next; end loop; -- We add the newly-allocated children to their parent list only after -- the allocation has succeeded, in order to preserve invariants of the -- parent. T_Node.Children := T_CC; end Copy_Children; ------------------ -- Copy_Subtree -- ------------------ procedure Copy_Subtree (Target : in out Tree; Parent : Cursor; Before : Cursor; Source : Cursor) is Target_Subtree : Count_Type; Target_Count : Count_Type; begin if Checks and then Parent = No_Element then raise Constraint_Error with "Parent cursor has no element"; end if; if Checks and then Parent.Container /= Target'Unrestricted_Access then raise Program_Error with "Parent cursor not in container"; end if; if Before /= No_Element then if Checks and then Before.Container /= Target'Unrestricted_Access then raise Program_Error with "Before cursor not in container"; end if; if Checks and then Before.Container.Nodes (Before.Node).Parent /= Parent.Node then raise Constraint_Error with "Before cursor not child of Parent"; end if; end if; if Source = No_Element then return; end if; if Checks and then Is_Root (Source) then raise Constraint_Error with "Source cursor designates root"; end if; if Target.Count = 0 then Initialize_Root (Target); end if; -- Copy_Subtree returns a count of the number of nodes that it -- allocates, but it works by incrementing the value that is passed -- in. We must therefore initialize the count value before calling -- Copy_Subtree. Target_Count := 0; Copy_Subtree (Source => Source.Container.all, Source_Subtree => Source.Node, Target => Target, Target_Parent => Parent.Node, Target_Subtree => Target_Subtree, Count => Target_Count); Insert_Subtree_Node (Container => Target, Subtree => Target_Subtree, Parent => Parent.Node, Before => Before.Node); Target.Count := Target.Count + Target_Count; end Copy_Subtree; procedure Copy_Subtree (Source : Tree; Source_Subtree : Count_Type; Target : in out Tree; Target_Parent : Count_Type; Target_Subtree : out Count_Type; Count : in out Count_Type) is T_Nodes : Tree_Node_Array renames Target.Nodes; begin -- First we allocate the root of the target subtree. Allocate_Node (Container => Target, New_Item => Source.Elements (Source_Subtree), New_Node => Target_Subtree); T_Nodes (Target_Subtree).Parent := Target_Parent; Count := Count + 1; -- We now have a new subtree (for the Target tree), containing only a -- copy of the corresponding element in the Source subtree. Next we copy -- the children of the Source subtree as children of the new Target -- subtree. Copy_Children (Source => Source, Source_Parent => Source_Subtree, Target => Target, Target_Parent => Target_Subtree, Count => Count); end Copy_Subtree; ------------------------- -- Deallocate_Children -- ------------------------- procedure Deallocate_Children (Container : in out Tree; Subtree : Count_Type; Count : in out Count_Type) is Nodes : Tree_Node_Array renames Container.Nodes; Node : Tree_Node_Type renames Nodes (Subtree); -- parent CC : Children_Type renames Node.Children; C : Count_Type'Base; begin while CC.First > 0 loop C := CC.First; CC.First := Nodes (C).Next; Deallocate_Subtree (Container, C, Count); end loop; CC.Last := 0; end Deallocate_Children; --------------------- -- Deallocate_Node -- --------------------- procedure Deallocate_Node (Container : in out Tree; X : Count_Type) is NN : Tree_Node_Array renames Container.Nodes; pragma Assert (X > 0); pragma Assert (X <= NN'Last); N : Tree_Node_Type renames NN (X); pragma Assert (N.Parent /= X); -- node is active begin -- The tree container actually contains two lists: one for the "active" -- nodes that contain elements that have been inserted onto the tree, -- and another for the "inactive" nodes of the free store, from which -- nodes are allocated when a new child is inserted in the tree. -- We desire that merely declaring a tree object should have only -- minimal cost; specially, we want to avoid having to initialize the -- free store (to fill in the links), especially if the capacity of the -- tree object is large. -- The head of the free list is indicated by Container.Free. If its -- value is non-negative, then the free store has been initialized in -- the "normal" way: Container.Free points to the head of the list of -- free (inactive) nodes, and the value 0 means the free list is -- empty. Each node on the free list has been initialized to point to -- the next free node (via its Next component), and the value 0 means -- that this is the last node of the free list. -- If Container.Free is negative, then the links on the free store have -- not been initialized. In this case the link values are implied: the -- free store comprises the components of the node array started with -- the absolute value of Container.Free, and continuing until the end of -- the array (Nodes'Last). -- We prefer to lazy-init the free store (in fact, we would prefer to -- not initialize it at all, because such initialization is an O(n) -- operation). The time when we need to actually initialize the nodes in -- the free store is when the node that becomes inactive is not at the -- end of the active list. The free store would then be discontigous and -- so its nodes would need to be linked in the traditional way. -- It might be possible to perform an optimization here. Suppose that -- the free store can be represented as having two parts: one comprising -- the non-contiguous inactive nodes linked together in the normal way, -- and the other comprising the contiguous inactive nodes (that are not -- linked together, at the end of the nodes array). This would allow us -- to never have to initialize the free store, except in a lazy way as -- nodes become inactive. ??? -- When an element is deleted from the list container, its node becomes -- inactive, and so we set its Parent and Prev components to an -- impossible value (the index of the node itself), to indicate that it -- is now inactive. This provides a useful way to detect a dangling -- cursor reference. N.Parent := X; -- Node is deallocated (not on active list) N.Prev := X; if Container.Free >= 0 then -- The free store has previously been initialized. All we need to do -- here is link the newly-free'd node onto the free list. N.Next := Container.Free; Container.Free := X; elsif X + 1 = abs Container.Free then -- The free store has not been initialized, and the node becoming -- inactive immediately precedes the start of the free store. All -- we need to do is move the start of the free store back by one. N.Next := X; -- Not strictly necessary, but marginally safer Container.Free := Container.Free + 1; else -- The free store has not been initialized, and the node becoming -- inactive does not immediately precede the free store. Here we -- first initialize the free store (meaning the links are given -- values in the traditional way), and then link the newly-free'd -- node onto the head of the free store. -- See the comments above for an optimization opportunity. If the -- next link for a node on the free store is negative, then this -- means the remaining nodes on the free store are physically -- contiguous, starting at the absolute value of that index value. -- ??? Container.Free := abs Container.Free; if Container.Free > Container.Capacity then Container.Free := 0; else for J in Container.Free .. Container.Capacity - 1 loop NN (J).Next := J + 1; end loop; NN (Container.Capacity).Next := 0; end if; NN (X).Next := Container.Free; Container.Free := X; end if; end Deallocate_Node; ------------------------ -- Deallocate_Subtree -- ------------------------ procedure Deallocate_Subtree (Container : in out Tree; Subtree : Count_Type; Count : in out Count_Type) is begin Deallocate_Children (Container, Subtree, Count); Deallocate_Node (Container, Subtree); Count := Count + 1; end Deallocate_Subtree; --------------------- -- Delete_Children -- --------------------- procedure Delete_Children (Container : in out Tree; Parent : Cursor) is Count : Count_Type; begin if Checks and then Parent = No_Element then raise Constraint_Error with "Parent cursor has no element"; end if; if Checks and then Parent.Container /= Container'Unrestricted_Access then raise Program_Error with "Parent cursor not in container"; end if; TC_Check (Container.TC); if Container.Count = 0 then pragma Assert (Is_Root (Parent)); return; end if; -- Deallocate_Children returns a count of the number of nodes that it -- deallocates, but it works by incrementing the value that is passed -- in. We must therefore initialize the count value before calling -- Deallocate_Children. Count := 0; Deallocate_Children (Container, Parent.Node, Count); pragma Assert (Count <= Container.Count); Container.Count := Container.Count - Count; end Delete_Children; ----------------- -- Delete_Leaf -- ----------------- procedure Delete_Leaf (Container : in out Tree; Position : in out Cursor) is X : Count_Type; begin if Checks and then Position = No_Element then raise Constraint_Error with "Position cursor has no element"; end if; if Checks and then Position.Container /= Container'Unrestricted_Access then raise Program_Error with "Position cursor not in container"; end if; if Checks and then Is_Root (Position) then raise Program_Error with "Position cursor designates root"; end if; if Checks and then not Is_Leaf (Position) then raise Constraint_Error with "Position cursor does not designate leaf"; end if; TC_Check (Container.TC); X := Position.Node; Position := No_Element; Remove_Subtree (Container, X); Container.Count := Container.Count - 1; Deallocate_Node (Container, X); end Delete_Leaf; -------------------- -- Delete_Subtree -- -------------------- procedure Delete_Subtree (Container : in out Tree; Position : in out Cursor) is X : Count_Type; Count : Count_Type; begin if Checks and then Position = No_Element then raise Constraint_Error with "Position cursor has no element"; end if; if Checks and then Position.Container /= Container'Unrestricted_Access then raise Program_Error with "Position cursor not in container"; end if; if Checks and then Is_Root (Position) then raise Program_Error with "Position cursor designates root"; end if; TC_Check (Container.TC); X := Position.Node; Position := No_Element; Remove_Subtree (Container, X); -- Deallocate_Subtree returns a count of the number of nodes that it -- deallocates, but it works by incrementing the value that is passed -- in. We must therefore initialize the count value before calling -- Deallocate_Subtree. Count := 0; Deallocate_Subtree (Container, X, Count); pragma Assert (Count <= Container.Count); Container.Count := Container.Count - Count; end Delete_Subtree; ----------- -- Depth -- ----------- function Depth (Position : Cursor) return Count_Type is Result : Count_Type; N : Count_Type'Base; begin if Position = No_Element then return 0; end if; if Is_Root (Position) then return 1; end if; Result := 0; N := Position.Node; while N >= 0 loop N := Position.Container.Nodes (N).Parent; Result := Result + 1; end loop; return Result; end Depth; ------------- -- Element -- ------------- function Element (Position : Cursor) return Element_Type is begin if Checks and then Position.Container = null then raise Constraint_Error with "Position cursor has no element"; end if; if Checks and then Position.Node = Root_Node (Position.Container.all) then raise Program_Error with "Position cursor designates root"; end if; return Position.Container.Elements (Position.Node); end Element; -------------------- -- Equal_Children -- -------------------- function Equal_Children (Left_Tree : Tree; Left_Subtree : Count_Type; Right_Tree : Tree; Right_Subtree : Count_Type) return Boolean is L_NN : Tree_Node_Array renames Left_Tree.Nodes; R_NN : Tree_Node_Array renames Right_Tree.Nodes; Left_Children : Children_Type renames L_NN (Left_Subtree).Children; Right_Children : Children_Type renames R_NN (Right_Subtree).Children; L, R : Count_Type'Base; begin if Child_Count (Left_Tree, Left_Subtree) /= Child_Count (Right_Tree, Right_Subtree) then return False; end if; L := Left_Children.First; R := Right_Children.First; while L > 0 loop if not Equal_Subtree (Left_Tree, L, Right_Tree, R) then return False; end if; L := L_NN (L).Next; R := R_NN (R).Next; end loop; return True; end Equal_Children; ------------------- -- Equal_Subtree -- ------------------- function Equal_Subtree (Left_Position : Cursor; Right_Position : Cursor) return Boolean is begin if Checks and then Left_Position = No_Element then raise Constraint_Error with "Left cursor has no element"; end if; if Checks and then Right_Position = No_Element then raise Constraint_Error with "Right cursor has no element"; end if; if Left_Position = Right_Position then return True; end if; if Is_Root (Left_Position) then if not Is_Root (Right_Position) then return False; end if; if Left_Position.Container.Count = 0 then return Right_Position.Container.Count = 0; end if; if Right_Position.Container.Count = 0 then return False; end if; return Equal_Children (Left_Tree => Left_Position.Container.all, Left_Subtree => Left_Position.Node, Right_Tree => Right_Position.Container.all, Right_Subtree => Right_Position.Node); end if; if Is_Root (Right_Position) then return False; end if; return Equal_Subtree (Left_Tree => Left_Position.Container.all, Left_Subtree => Left_Position.Node, Right_Tree => Right_Position.Container.all, Right_Subtree => Right_Position.Node); end Equal_Subtree; function Equal_Subtree (Left_Tree : Tree; Left_Subtree : Count_Type; Right_Tree : Tree; Right_Subtree : Count_Type) return Boolean is begin if Left_Tree.Elements (Left_Subtree) /= Right_Tree.Elements (Right_Subtree) then return False; end if; return Equal_Children (Left_Tree => Left_Tree, Left_Subtree => Left_Subtree, Right_Tree => Right_Tree, Right_Subtree => Right_Subtree); end Equal_Subtree; -------------- -- Finalize -- -------------- procedure Finalize (Object : in out Root_Iterator) is begin Unbusy (Object.Container.TC); end Finalize; ---------- -- Find -- ---------- function Find (Container : Tree; Item : Element_Type) return Cursor is Node : Count_Type; begin if Container.Count = 0 then return No_Element; end if; Node := Find_In_Children (Container, Root_Node (Container), Item); if Node = 0 then return No_Element; end if; return Cursor'(Container'Unrestricted_Access, Node); end Find; ----------- -- First -- ----------- overriding function First (Object : Subtree_Iterator) return Cursor is begin if Object.Subtree = Root_Node (Object.Container.all) then return First_Child (Root (Object.Container.all)); else return Cursor'(Object.Container, Object.Subtree); end if; end First; overriding function First (Object : Child_Iterator) return Cursor is begin return First_Child (Cursor'(Object.Container, Object.Subtree)); end First; ----------------- -- First_Child -- ----------------- function First_Child (Parent : Cursor) return Cursor is Node : Count_Type'Base; begin if Checks and then Parent = No_Element then raise Constraint_Error with "Parent cursor has no element"; end if; if Parent.Container.Count = 0 then pragma Assert (Is_Root (Parent)); return No_Element; end if; Node := Parent.Container.Nodes (Parent.Node).Children.First; if Node <= 0 then return No_Element; end if; return Cursor'(Parent.Container, Node); end First_Child; ------------------------- -- First_Child_Element -- ------------------------- function First_Child_Element (Parent : Cursor) return Element_Type is begin return Element (First_Child (Parent)); end First_Child_Element; ---------------------- -- Find_In_Children -- ---------------------- function Find_In_Children (Container : Tree; Subtree : Count_Type; Item : Element_Type) return Count_Type is N : Count_Type'Base; Result : Count_Type; begin N := Container.Nodes (Subtree).Children.First; while N > 0 loop Result := Find_In_Subtree (Container, N, Item); if Result > 0 then return Result; end if; N := Container.Nodes (N).Next; end loop; return 0; end Find_In_Children; --------------------- -- Find_In_Subtree -- --------------------- function Find_In_Subtree (Position : Cursor; Item : Element_Type) return Cursor is Result : Count_Type; begin if Checks and then Position = No_Element then raise Constraint_Error with "Position cursor has no element"; end if; -- Commented-out pending ruling by ARG. ??? -- if Checks and then -- Position.Container /= Container'Unrestricted_Access -- then -- raise Program_Error with "Position cursor not in container"; -- end if; if Position.Container.Count = 0 then pragma Assert (Is_Root (Position)); return No_Element; end if; if Is_Root (Position) then Result := Find_In_Children (Container => Position.Container.all, Subtree => Position.Node, Item => Item); else Result := Find_In_Subtree (Container => Position.Container.all, Subtree => Position.Node, Item => Item); end if; if Result = 0 then return No_Element; end if; return Cursor'(Position.Container, Result); end Find_In_Subtree; function Find_In_Subtree (Container : Tree; Subtree : Count_Type; Item : Element_Type) return Count_Type is begin if Container.Elements (Subtree) = Item then return Subtree; end if; return Find_In_Children (Container, Subtree, Item); end Find_In_Subtree; ------------------------ -- Get_Element_Access -- ------------------------ function Get_Element_Access (Position : Cursor) return not null Element_Access is begin return Position.Container.Elements (Position.Node)'Access; end Get_Element_Access; ----------------- -- Has_Element -- ----------------- function Has_Element (Position : Cursor) return Boolean is begin if Position = No_Element then return False; end if; return Position.Node /= Root_Node (Position.Container.all); end Has_Element; --------------------- -- Initialize_Node -- --------------------- procedure Initialize_Node (Container : in out Tree; Index : Count_Type) is begin Container.Nodes (Index) := (Parent => No_Node, Prev => 0, Next => 0, Children => (others => 0)); end Initialize_Node; --------------------- -- Initialize_Root -- --------------------- procedure Initialize_Root (Container : in out Tree) is begin Initialize_Node (Container, Root_Node (Container)); end Initialize_Root; ------------------ -- Insert_Child -- ------------------ procedure Insert_Child (Container : in out Tree; Parent : Cursor; Before : Cursor; New_Item : Element_Type; Count : Count_Type := 1) is Position : Cursor; pragma Unreferenced (Position); begin Insert_Child (Container, Parent, Before, New_Item, Position, Count); end Insert_Child; procedure Insert_Child (Container : in out Tree; Parent : Cursor; Before : Cursor; New_Item : Element_Type; Position : out Cursor; Count : Count_Type := 1) is Nodes : Tree_Node_Array renames Container.Nodes; First : Count_Type; Last : Count_Type; begin if Checks and then Parent = No_Element then raise Constraint_Error with "Parent cursor has no element"; end if; if Checks and then Parent.Container /= Container'Unrestricted_Access then raise Program_Error with "Parent cursor not in container"; end if; if Before /= No_Element then if Checks and then Before.Container /= Container'Unrestricted_Access then raise Program_Error with "Before cursor not in container"; end if; if Checks and then Before.Container.Nodes (Before.Node).Parent /= Parent.Node then raise Constraint_Error with "Parent cursor not parent of Before"; end if; end if; if Count = 0 then Position := No_Element; -- Need ruling from ARG ??? return; end if; if Checks and then Container.Count > Container.Capacity - Count then raise Capacity_Error with "requested count exceeds available storage"; end if; TC_Check (Container.TC); if Container.Count = 0 then Initialize_Root (Container); end if; Allocate_Node (Container, New_Item, First); Nodes (First).Parent := Parent.Node; Last := First; for J in Count_Type'(2) .. Count loop Allocate_Node (Container, New_Item, Nodes (Last).Next); Nodes (Nodes (Last).Next).Parent := Parent.Node; Nodes (Nodes (Last).Next).Prev := Last; Last := Nodes (Last).Next; end loop; Insert_Subtree_List (Container => Container, First => First, Last => Last, Parent => Parent.Node, Before => Before.Node); Container.Count := Container.Count + Count; Position := Cursor'(Parent.Container, First); end Insert_Child; procedure Insert_Child (Container : in out Tree; Parent : Cursor; Before : Cursor; Position : out Cursor; Count : Count_Type := 1) is Nodes : Tree_Node_Array renames Container.Nodes; First : Count_Type; Last : Count_Type; pragma Warnings (Off); Default_Initialized_Item : Element_Type; pragma Unmodified (Default_Initialized_Item); -- OK to reference, see below begin if Checks and then Parent = No_Element then raise Constraint_Error with "Parent cursor has no element"; end if; if Checks and then Parent.Container /= Container'Unrestricted_Access then raise Program_Error with "Parent cursor not in container"; end if; if Before /= No_Element then if Checks and then Before.Container /= Container'Unrestricted_Access then raise Program_Error with "Before cursor not in container"; end if; if Checks and then Before.Container.Nodes (Before.Node).Parent /= Parent.Node then raise Constraint_Error with "Parent cursor not parent of Before"; end if; end if; if Count = 0 then Position := No_Element; -- Need ruling from ARG ??? return; end if; if Checks and then Container.Count > Container.Capacity - Count then raise Capacity_Error with "requested count exceeds available storage"; end if; TC_Check (Container.TC); if Container.Count = 0 then Initialize_Root (Container); end if; -- There is no explicit element provided, but in an instance the element -- type may be a scalar with a Default_Value aspect, or a composite -- type with such a scalar component, or components with default -- initialization, so insert the specified number of possibly -- initialized elements at the given position. Allocate_Node (Container, Default_Initialized_Item, First); Nodes (First).Parent := Parent.Node; Last := First; for J in Count_Type'(2) .. Count loop Allocate_Node (Container, Default_Initialized_Item, Nodes (Last).Next); Nodes (Nodes (Last).Next).Parent := Parent.Node; Nodes (Nodes (Last).Next).Prev := Last; Last := Nodes (Last).Next; end loop; Insert_Subtree_List (Container => Container, First => First, Last => Last, Parent => Parent.Node, Before => Before.Node); Container.Count := Container.Count + Count; Position := Cursor'(Parent.Container, First); pragma Warnings (On); end Insert_Child; ------------------------- -- Insert_Subtree_List -- ------------------------- procedure Insert_Subtree_List (Container : in out Tree; First : Count_Type'Base; Last : Count_Type'Base; Parent : Count_Type; Before : Count_Type'Base) is NN : Tree_Node_Array renames Container.Nodes; N : Tree_Node_Type renames NN (Parent); CC : Children_Type renames N.Children; begin -- This is a simple utility operation to insert a list of nodes -- (First..Last) as children of Parent. The Before node specifies where -- the new children should be inserted relative to existing children. if First <= 0 then pragma Assert (Last <= 0); return; end if; pragma Assert (Last > 0); pragma Assert (Before <= 0 or else NN (Before).Parent = Parent); if CC.First <= 0 then -- no existing children CC.First := First; NN (CC.First).Prev := 0; CC.Last := Last; NN (CC.Last).Next := 0; elsif Before <= 0 then -- means "insert after existing nodes" NN (CC.Last).Next := First; NN (First).Prev := CC.Last; CC.Last := Last; NN (CC.Last).Next := 0; elsif Before = CC.First then NN (Last).Next := CC.First; NN (CC.First).Prev := Last; CC.First := First; NN (CC.First).Prev := 0; else NN (NN (Before).Prev).Next := First; NN (First).Prev := NN (Before).Prev; NN (Last).Next := Before; NN (Before).Prev := Last; end if; end Insert_Subtree_List; ------------------------- -- Insert_Subtree_Node -- ------------------------- procedure Insert_Subtree_Node (Container : in out Tree; Subtree : Count_Type'Base; Parent : Count_Type; Before : Count_Type'Base) is begin -- This is a simple wrapper operation to insert a single child into the -- Parent's children list. Insert_Subtree_List (Container => Container, First => Subtree, Last => Subtree, Parent => Parent, Before => Before); end Insert_Subtree_Node; -------------- -- Is_Empty -- -------------- function Is_Empty (Container : Tree) return Boolean is begin return Container.Count = 0; end Is_Empty; ------------- -- Is_Leaf -- ------------- function Is_Leaf (Position : Cursor) return Boolean is begin if Position = No_Element then return False; end if; if Position.Container.Count = 0 then pragma Assert (Is_Root (Position)); return True; end if; return Position.Container.Nodes (Position.Node).Children.First <= 0; end Is_Leaf; ------------------ -- Is_Reachable -- ------------------ function Is_Reachable (Container : Tree; From, To : Count_Type) return Boolean is Idx : Count_Type; begin Idx := From; while Idx >= 0 loop if Idx = To then return True; end if; Idx := Container.Nodes (Idx).Parent; end loop; return False; end Is_Reachable; ------------- -- Is_Root -- ------------- function Is_Root (Position : Cursor) return Boolean is begin return (if Position.Container = null then False else Position.Node = Root_Node (Position.Container.all)); end Is_Root; ------------- -- Iterate -- ------------- procedure Iterate (Container : Tree; Process : not null access procedure (Position : Cursor)) is Busy : With_Busy (Container.TC'Unrestricted_Access); begin if Container.Count = 0 then return; end if; Iterate_Children (Container => Container, Subtree => Root_Node (Container), Process => Process); end Iterate; function Iterate (Container : Tree) return Tree_Iterator_Interfaces.Forward_Iterator'Class is begin return Iterate_Subtree (Root (Container)); end Iterate; ---------------------- -- Iterate_Children -- ---------------------- procedure Iterate_Children (Parent : Cursor; Process : not null access procedure (Position : Cursor)) is begin if Checks and then Parent = No_Element then raise Constraint_Error with "Parent cursor has no element"; end if; if Parent.Container.Count = 0 then pragma Assert (Is_Root (Parent)); return; end if; declare C : Count_Type; NN : Tree_Node_Array renames Parent.Container.Nodes; Busy : With_Busy (Parent.Container.TC'Unrestricted_Access); begin C := NN (Parent.Node).Children.First; while C > 0 loop Process (Cursor'(Parent.Container, Node => C)); C := NN (C).Next; end loop; end; end Iterate_Children; procedure Iterate_Children (Container : Tree; Subtree : Count_Type; Process : not null access procedure (Position : Cursor)) is NN : Tree_Node_Array renames Container.Nodes; N : Tree_Node_Type renames NN (Subtree); C : Count_Type; begin -- This is a helper function to recursively iterate over all the nodes -- in a subtree, in depth-first fashion. This particular helper just -- visits the children of this subtree, not the root of the subtree -- itself. This is useful when starting from the ultimate root of the -- entire tree (see Iterate), as that root does not have an element. C := N.Children.First; while C > 0 loop Iterate_Subtree (Container, C, Process); C := NN (C).Next; end loop; end Iterate_Children; function Iterate_Children (Container : Tree; Parent : Cursor) return Tree_Iterator_Interfaces.Reversible_Iterator'Class is C : constant Tree_Access := Container'Unrestricted_Access; begin if Checks and then Parent = No_Element then raise Constraint_Error with "Parent cursor has no element"; end if; if Checks and then Parent.Container /= C then raise Program_Error with "Parent cursor not in container"; end if; return It : constant Child_Iterator := Child_Iterator'(Limited_Controlled with Container => C, Subtree => Parent.Node) do Busy (C.TC); end return; end Iterate_Children; --------------------- -- Iterate_Subtree -- --------------------- function Iterate_Subtree (Position : Cursor) return Tree_Iterator_Interfaces.Forward_Iterator'Class is C : constant Tree_Access := Position.Container; begin if Checks and then Position = No_Element then raise Constraint_Error with "Position cursor has no element"; end if; -- Implement Vet for multiway trees??? -- pragma Assert (Vet (Position), "bad subtree cursor"); return It : constant Subtree_Iterator := (Limited_Controlled with Container => C, Subtree => Position.Node) do Busy (C.TC); end return; end Iterate_Subtree; procedure Iterate_Subtree (Position : Cursor; Process : not null access procedure (Position : Cursor)) is begin if Checks and then Position = No_Element then raise Constraint_Error with "Position cursor has no element"; end if; if Position.Container.Count = 0 then pragma Assert (Is_Root (Position)); return; end if; declare T : Tree renames Position.Container.all; Busy : With_Busy (T.TC'Unrestricted_Access); begin if Is_Root (Position) then Iterate_Children (T, Position.Node, Process); else Iterate_Subtree (T, Position.Node, Process); end if; end; end Iterate_Subtree; procedure Iterate_Subtree (Container : Tree; Subtree : Count_Type; Process : not null access procedure (Position : Cursor)) is begin -- This is a helper function to recursively iterate over all the nodes -- in a subtree, in depth-first fashion. It first visits the root of the -- subtree, then visits its children. Process (Cursor'(Container'Unrestricted_Access, Subtree)); Iterate_Children (Container, Subtree, Process); end Iterate_Subtree; ---------- -- Last -- ---------- overriding function Last (Object : Child_Iterator) return Cursor is begin return Last_Child (Cursor'(Object.Container, Object.Subtree)); end Last; ---------------- -- Last_Child -- ---------------- function Last_Child (Parent : Cursor) return Cursor is Node : Count_Type'Base; begin if Checks and then Parent = No_Element then raise Constraint_Error with "Parent cursor has no element"; end if; if Parent.Container.Count = 0 then pragma Assert (Is_Root (Parent)); return No_Element; end if; Node := Parent.Container.Nodes (Parent.Node).Children.Last; if Node <= 0 then return No_Element; end if; return Cursor'(Parent.Container, Node); end Last_Child; ------------------------ -- Last_Child_Element -- ------------------------ function Last_Child_Element (Parent : Cursor) return Element_Type is begin return Element (Last_Child (Parent)); end Last_Child_Element; ---------- -- Move -- ---------- procedure Move (Target : in out Tree; Source : in out Tree) is begin if Target'Address = Source'Address then return; end if; TC_Check (Source.TC); Target.Assign (Source); Source.Clear; end Move; ---------- -- Next -- ---------- overriding function Next (Object : Subtree_Iterator; Position : Cursor) return Cursor is begin if Position.Container = null then return No_Element; end if; if Checks and then Position.Container /= Object.Container then raise Program_Error with "Position cursor of Next designates wrong tree"; end if; pragma Assert (Object.Container.Count > 0); pragma Assert (Position.Node /= Root_Node (Object.Container.all)); declare Nodes : Tree_Node_Array renames Object.Container.Nodes; Node : Count_Type; begin Node := Position.Node; if Nodes (Node).Children.First > 0 then return Cursor'(Object.Container, Nodes (Node).Children.First); end if; while Node /= Object.Subtree loop if Nodes (Node).Next > 0 then return Cursor'(Object.Container, Nodes (Node).Next); end if; Node := Nodes (Node).Parent; end loop; return No_Element; end; end Next; overriding function Next (Object : Child_Iterator; Position : Cursor) return Cursor is begin if Position.Container = null then return No_Element; end if; if Checks and then Position.Container /= Object.Container then raise Program_Error with "Position cursor of Next designates wrong tree"; end if; pragma Assert (Object.Container.Count > 0); pragma Assert (Position.Node /= Root_Node (Object.Container.all)); return Next_Sibling (Position); end Next; ------------------ -- Next_Sibling -- ------------------ function Next_Sibling (Position : Cursor) return Cursor is begin if Position = No_Element then return No_Element; end if; if Position.Container.Count = 0 then pragma Assert (Is_Root (Position)); return No_Element; end if; declare T : Tree renames Position.Container.all; NN : Tree_Node_Array renames T.Nodes; N : Tree_Node_Type renames NN (Position.Node); begin if N.Next <= 0 then return No_Element; end if; return Cursor'(Position.Container, N.Next); end; end Next_Sibling; procedure Next_Sibling (Position : in out Cursor) is begin Position := Next_Sibling (Position); end Next_Sibling; ---------------- -- Node_Count -- ---------------- function Node_Count (Container : Tree) return Count_Type is begin -- Container.Count is the number of nodes we have actually allocated. We -- cache the value specifically so this Node_Count operation can execute -- in O(1) time, which makes it behave similarly to how the Length -- selector function behaves for other containers. -- -- The cached node count value only describes the nodes we have -- allocated; the root node itself is not included in that count. The -- Node_Count operation returns a value that includes the root node -- (because the RM says so), so we must add 1 to our cached value. return 1 + Container.Count; end Node_Count; ------------ -- Parent -- ------------ function Parent (Position : Cursor) return Cursor is begin if Position = No_Element then return No_Element; end if; if Position.Container.Count = 0 then pragma Assert (Is_Root (Position)); return No_Element; end if; declare T : Tree renames Position.Container.all; NN : Tree_Node_Array renames T.Nodes; N : Tree_Node_Type renames NN (Position.Node); begin if N.Parent < 0 then pragma Assert (Position.Node = Root_Node (T)); return No_Element; end if; return Cursor'(Position.Container, N.Parent); end; end Parent; ------------------- -- Prepend_Child -- ------------------- procedure Prepend_Child (Container : in out Tree; Parent : Cursor; New_Item : Element_Type; Count : Count_Type := 1) is Nodes : Tree_Node_Array renames Container.Nodes; First, Last : Count_Type; begin if Checks and then Parent = No_Element then raise Constraint_Error with "Parent cursor has no element"; end if; if Checks and then Parent.Container /= Container'Unrestricted_Access then raise Program_Error with "Parent cursor not in container"; end if; if Count = 0 then return; end if; if Checks and then Container.Count > Container.Capacity - Count then raise Capacity_Error with "requested count exceeds available storage"; end if; TC_Check (Container.TC); if Container.Count = 0 then Initialize_Root (Container); end if; Allocate_Node (Container, New_Item, First); Nodes (First).Parent := Parent.Node; Last := First; for J in Count_Type'(2) .. Count loop Allocate_Node (Container, New_Item, Nodes (Last).Next); Nodes (Nodes (Last).Next).Parent := Parent.Node; Nodes (Nodes (Last).Next).Prev := Last; Last := Nodes (Last).Next; end loop; Insert_Subtree_List (Container => Container, First => First, Last => Last, Parent => Parent.Node, Before => Nodes (Parent.Node).Children.First); Container.Count := Container.Count + Count; end Prepend_Child; -------------- -- Previous -- -------------- overriding function Previous (Object : Child_Iterator; Position : Cursor) return Cursor is begin if Position.Container = null then return No_Element; end if; if Checks and then Position.Container /= Object.Container then raise Program_Error with "Position cursor of Previous designates wrong tree"; end if; return Previous_Sibling (Position); end Previous; ---------------------- -- Previous_Sibling -- ---------------------- function Previous_Sibling (Position : Cursor) return Cursor is begin if Position = No_Element then return No_Element; end if; if Position.Container.Count = 0 then pragma Assert (Is_Root (Position)); return No_Element; end if; declare T : Tree renames Position.Container.all; NN : Tree_Node_Array renames T.Nodes; N : Tree_Node_Type renames NN (Position.Node); begin if N.Prev <= 0 then return No_Element; end if; return Cursor'(Position.Container, N.Prev); end; end Previous_Sibling; procedure Previous_Sibling (Position : in out Cursor) is begin Position := Previous_Sibling (Position); end Previous_Sibling; ---------------------- -- Pseudo_Reference -- ---------------------- function Pseudo_Reference (Container : aliased Tree'Class) return Reference_Control_Type is TC : constant Tamper_Counts_Access := Container.TC'Unrestricted_Access; begin return R : constant Reference_Control_Type := (Controlled with TC) do Lock (TC.all); end return; end Pseudo_Reference; ------------------- -- Query_Element -- ------------------- procedure Query_Element (Position : Cursor; Process : not null access procedure (Element : Element_Type)) is begin if Checks and then Position = No_Element then raise Constraint_Error with "Position cursor has no element"; end if; if Checks and then Is_Root (Position) then raise Program_Error with "Position cursor designates root"; end if; declare T : Tree renames Position.Container.all'Unrestricted_Access.all; Lock : With_Lock (T.TC'Unrestricted_Access); begin Process (Element => T.Elements (Position.Node)); end; end Query_Element; ---------- -- Read -- ---------- procedure Read (Stream : not null access Root_Stream_Type'Class; Container : out Tree) is procedure Read_Children (Subtree : Count_Type); function Read_Subtree (Parent : Count_Type) return Count_Type; NN : Tree_Node_Array renames Container.Nodes; Total_Count : Count_Type'Base; -- Value read from the stream that says how many elements follow Read_Count : Count_Type'Base; -- Actual number of elements read from the stream ------------------- -- Read_Children -- ------------------- procedure Read_Children (Subtree : Count_Type) is Count : Count_Type'Base; -- number of child subtrees CC : Children_Type; begin Count_Type'Read (Stream, Count); if Checks and then Count < 0 then raise Program_Error with "attempt to read from corrupt stream"; end if; if Count = 0 then return; end if; CC.First := Read_Subtree (Parent => Subtree); CC.Last := CC.First; for J in Count_Type'(2) .. Count loop NN (CC.Last).Next := Read_Subtree (Parent => Subtree); NN (NN (CC.Last).Next).Prev := CC.Last; CC.Last := NN (CC.Last).Next; end loop; -- Now that the allocation and reads have completed successfully, it -- is safe to link the children to their parent. NN (Subtree).Children := CC; end Read_Children; ------------------ -- Read_Subtree -- ------------------ function Read_Subtree (Parent : Count_Type) return Count_Type is Subtree : Count_Type; begin Allocate_Node (Container, Stream, Subtree); Container.Nodes (Subtree).Parent := Parent; Read_Count := Read_Count + 1; Read_Children (Subtree); return Subtree; end Read_Subtree; -- Start of processing for Read begin Container.Clear; -- checks busy bit Count_Type'Read (Stream, Total_Count); if Checks and then Total_Count < 0 then raise Program_Error with "attempt to read from corrupt stream"; end if; if Total_Count = 0 then return; end if; if Checks and then Total_Count > Container.Capacity then raise Capacity_Error -- ??? with "node count in stream exceeds container capacity"; end if; Initialize_Root (Container); Read_Count := 0; Read_Children (Root_Node (Container)); if Checks and then Read_Count /= Total_Count then raise Program_Error with "attempt to read from corrupt stream"; end if; Container.Count := Total_Count; end Read; procedure Read (Stream : not null access Root_Stream_Type'Class; Position : out Cursor) is begin raise Program_Error with "attempt to read tree cursor from stream"; end Read; procedure Read (Stream : not null access Root_Stream_Type'Class; Item : out Reference_Type) is begin raise Program_Error with "attempt to stream reference"; end Read; procedure Read (Stream : not null access Root_Stream_Type'Class; Item : out Constant_Reference_Type) is begin raise Program_Error with "attempt to stream reference"; end Read; --------------- -- Reference -- --------------- function Reference (Container : aliased in out Tree; Position : Cursor) return Reference_Type is begin if Checks and then Position.Container = null then raise Constraint_Error with "Position cursor has no element"; end if; if Checks and then Position.Container /= Container'Unrestricted_Access then raise Program_Error with "Position cursor designates wrong container"; end if; if Checks and then Position.Node = Root_Node (Container) then raise Program_Error with "Position cursor designates root"; end if; -- Implement Vet for multiway tree??? -- pragma Assert (Vet (Position), -- "Position cursor in Constant_Reference is bad"); declare TC : constant Tamper_Counts_Access := Container.TC'Unrestricted_Access; begin return R : constant Reference_Type := (Element => Container.Elements (Position.Node)'Access, Control => (Controlled with TC)) do Lock (TC.all); end return; end; end Reference; -------------------- -- Remove_Subtree -- -------------------- procedure Remove_Subtree (Container : in out Tree; Subtree : Count_Type) is NN : Tree_Node_Array renames Container.Nodes; N : Tree_Node_Type renames NN (Subtree); CC : Children_Type renames NN (N.Parent).Children; begin -- This is a utility operation to remove a subtree node from its -- parent's list of children. if CC.First = Subtree then pragma Assert (N.Prev <= 0); if CC.Last = Subtree then pragma Assert (N.Next <= 0); CC.First := 0; CC.Last := 0; else CC.First := N.Next; NN (CC.First).Prev := 0; end if; elsif CC.Last = Subtree then pragma Assert (N.Next <= 0); CC.Last := N.Prev; NN (CC.Last).Next := 0; else NN (N.Prev).Next := N.Next; NN (N.Next).Prev := N.Prev; end if; end Remove_Subtree; ---------------------- -- Replace_Element -- ---------------------- procedure Replace_Element (Container : in out Tree; Position : Cursor; New_Item : Element_Type) is begin if Checks and then Position = No_Element then raise Constraint_Error with "Position cursor has no element"; end if; if Checks and then Position.Container /= Container'Unrestricted_Access then raise Program_Error with "Position cursor not in container"; end if; if Checks and then Is_Root (Position) then raise Program_Error with "Position cursor designates root"; end if; TE_Check (Container.TC); Container.Elements (Position.Node) := New_Item; end Replace_Element; ------------------------------ -- Reverse_Iterate_Children -- ------------------------------ procedure Reverse_Iterate_Children (Parent : Cursor; Process : not null access procedure (Position : Cursor)) is begin if Checks and then Parent = No_Element then raise Constraint_Error with "Parent cursor has no element"; end if; if Parent.Container.Count = 0 then pragma Assert (Is_Root (Parent)); return; end if; declare NN : Tree_Node_Array renames Parent.Container.Nodes; Busy : With_Busy (Parent.Container.TC'Unrestricted_Access); C : Count_Type; begin C := NN (Parent.Node).Children.Last; while C > 0 loop Process (Cursor'(Parent.Container, Node => C)); C := NN (C).Prev; end loop; end; end Reverse_Iterate_Children; ---------- -- Root -- ---------- function Root (Container : Tree) return Cursor is begin return (Container'Unrestricted_Access, Root_Node (Container)); end Root; --------------- -- Root_Node -- --------------- function Root_Node (Container : Tree) return Count_Type is pragma Unreferenced (Container); begin return 0; end Root_Node; --------------------- -- Splice_Children -- --------------------- procedure Splice_Children (Target : in out Tree; Target_Parent : Cursor; Before : Cursor; Source : in out Tree; Source_Parent : Cursor) is begin if Checks and then Target_Parent = No_Element then raise Constraint_Error with "Target_Parent cursor has no element"; end if; if Checks and then Target_Parent.Container /= Target'Unrestricted_Access then raise Program_Error with "Target_Parent cursor not in Target container"; end if; if Before /= No_Element then if Checks and then Before.Container /= Target'Unrestricted_Access then raise Program_Error with "Before cursor not in Target container"; end if; if Checks and then Target.Nodes (Before.Node).Parent /= Target_Parent.Node then raise Constraint_Error with "Before cursor not child of Target_Parent"; end if; end if; if Checks and then Source_Parent = No_Element then raise Constraint_Error with "Source_Parent cursor has no element"; end if; if Checks and then Source_Parent.Container /= Source'Unrestricted_Access then raise Program_Error with "Source_Parent cursor not in Source container"; end if; if Source.Count = 0 then pragma Assert (Is_Root (Source_Parent)); return; end if; if Target'Address = Source'Address then if Target_Parent = Source_Parent then return; end if; TC_Check (Target.TC); if Checks and then Is_Reachable (Container => Target, From => Target_Parent.Node, To => Source_Parent.Node) then raise Constraint_Error with "Source_Parent is ancestor of Target_Parent"; end if; Splice_Children (Container => Target, Target_Parent => Target_Parent.Node, Before => Before.Node, Source_Parent => Source_Parent.Node); return; end if; TC_Check (Target.TC); TC_Check (Source.TC); if Target.Count = 0 then Initialize_Root (Target); end if; Splice_Children (Target => Target, Target_Parent => Target_Parent.Node, Before => Before.Node, Source => Source, Source_Parent => Source_Parent.Node); end Splice_Children; procedure Splice_Children (Container : in out Tree; Target_Parent : Cursor; Before : Cursor; Source_Parent : Cursor) is begin if Checks and then Target_Parent = No_Element then raise Constraint_Error with "Target_Parent cursor has no element"; end if; if Checks and then Target_Parent.Container /= Container'Unrestricted_Access then raise Program_Error with "Target_Parent cursor not in container"; end if; if Before /= No_Element then if Checks and then Before.Container /= Container'Unrestricted_Access then raise Program_Error with "Before cursor not in container"; end if; if Checks and then Container.Nodes (Before.Node).Parent /= Target_Parent.Node then raise Constraint_Error with "Before cursor not child of Target_Parent"; end if; end if; if Checks and then Source_Parent = No_Element then raise Constraint_Error with "Source_Parent cursor has no element"; end if; if Checks and then Source_Parent.Container /= Container'Unrestricted_Access then raise Program_Error with "Source_Parent cursor not in container"; end if; if Target_Parent = Source_Parent then return; end if; pragma Assert (Container.Count > 0); TC_Check (Container.TC); if Checks and then Is_Reachable (Container => Container, From => Target_Parent.Node, To => Source_Parent.Node) then raise Constraint_Error with "Source_Parent is ancestor of Target_Parent"; end if; Splice_Children (Container => Container, Target_Parent => Target_Parent.Node, Before => Before.Node, Source_Parent => Source_Parent.Node); end Splice_Children; procedure Splice_Children (Container : in out Tree; Target_Parent : Count_Type; Before : Count_Type'Base; Source_Parent : Count_Type) is NN : Tree_Node_Array renames Container.Nodes; CC : constant Children_Type := NN (Source_Parent).Children; C : Count_Type'Base; begin -- This is a utility operation to remove the children from Source parent -- and insert them into Target parent. NN (Source_Parent).Children := Children_Type'(others => 0); -- Fix up the Parent pointers of each child to designate its new Target -- parent. C := CC.First; while C > 0 loop NN (C).Parent := Target_Parent; C := NN (C).Next; end loop; Insert_Subtree_List (Container => Container, First => CC.First, Last => CC.Last, Parent => Target_Parent, Before => Before); end Splice_Children; procedure Splice_Children (Target : in out Tree; Target_Parent : Count_Type; Before : Count_Type'Base; Source : in out Tree; Source_Parent : Count_Type) is S_NN : Tree_Node_Array renames Source.Nodes; S_CC : Children_Type renames S_NN (Source_Parent).Children; Target_Count, Source_Count : Count_Type; T, S : Count_Type'Base; begin -- This is a utility operation to copy the children from the Source -- parent and insert them as children of the Target parent, and then -- delete them from the Source. (This is not a true splice operation, -- but it is the best we can do in a bounded form.) The Before position -- specifies where among the Target parent's exising children the new -- children are inserted. -- Before we attempt the insertion, we must count the sources nodes in -- order to determine whether the target have enough storage -- available. Note that calculating this value is an O(n) operation. -- Here is an optimization opportunity: iterate of each children the -- source explicitly, and keep a running count of the total number of -- nodes. Compare the running total to the capacity of the target each -- pass through the loop. This is more efficient than summing the counts -- of child subtree (which is what Subtree_Node_Count does) and then -- comparing that total sum to the target's capacity. ??? -- Here is another possibility. We currently treat the splice as an -- all-or-nothing proposition: either we can insert all of children of -- the source, or we raise exception with modifying the target. The -- price for not causing side-effect is an O(n) determination of the -- source count. If we are willing to tolerate side-effect, then we -- could loop over the children of the source, counting that subtree and -- then immediately inserting it in the target. The issue here is that -- the test for available storage could fail during some later pass, -- after children have already been inserted into target. ??? Source_Count := Subtree_Node_Count (Source, Source_Parent) - 1; if Source_Count = 0 then return; end if; if Checks and then Target.Count > Target.Capacity - Source_Count then raise Capacity_Error -- ??? with "Source count exceeds available storage on Target"; end if; -- Copy_Subtree returns a count of the number of nodes it inserts, but -- it does this by incrementing the value passed in. Therefore we must -- initialize the count before calling Copy_Subtree. Target_Count := 0; S := S_CC.First; while S > 0 loop Copy_Subtree (Source => Source, Source_Subtree => S, Target => Target, Target_Parent => Target_Parent, Target_Subtree => T, Count => Target_Count); Insert_Subtree_Node (Container => Target, Subtree => T, Parent => Target_Parent, Before => Before); S := S_NN (S).Next; end loop; pragma Assert (Target_Count = Source_Count); Target.Count := Target.Count + Target_Count; -- As with Copy_Subtree, operation Deallocate_Children returns a count -- of the number of nodes it deallocates, but it works by incrementing -- the value passed in. We must therefore initialize the count before -- calling it. Source_Count := 0; Deallocate_Children (Source, Source_Parent, Source_Count); pragma Assert (Source_Count = Target_Count); Source.Count := Source.Count - Source_Count; end Splice_Children; -------------------- -- Splice_Subtree -- -------------------- procedure Splice_Subtree (Target : in out Tree; Parent : Cursor; Before : Cursor; Source : in out Tree; Position : in out Cursor) is begin if Checks and then Parent = No_Element then raise Constraint_Error with "Parent cursor has no element"; end if; if Checks and then Parent.Container /= Target'Unrestricted_Access then raise Program_Error with "Parent cursor not in Target container"; end if; if Before /= No_Element then if Checks and then Before.Container /= Target'Unrestricted_Access then raise Program_Error with "Before cursor not in Target container"; end if; if Checks and then Target.Nodes (Before.Node).Parent /= Parent.Node then raise Constraint_Error with "Before cursor not child of Parent"; end if; end if; if Checks and then Position = No_Element then raise Constraint_Error with "Position cursor has no element"; end if; if Checks and then Position.Container /= Source'Unrestricted_Access then raise Program_Error with "Position cursor not in Source container"; end if; if Checks and then Is_Root (Position) then raise Program_Error with "Position cursor designates root"; end if; if Target'Address = Source'Address then if Target.Nodes (Position.Node).Parent = Parent.Node then if Before = No_Element then if Target.Nodes (Position.Node).Next <= 0 then -- last child return; end if; elsif Position.Node = Before.Node then return; elsif Target.Nodes (Position.Node).Next = Before.Node then return; end if; end if; TC_Check (Target.TC); if Checks and then Is_Reachable (Container => Target, From => Parent.Node, To => Position.Node) then raise Constraint_Error with "Position is ancestor of Parent"; end if; Remove_Subtree (Target, Position.Node); Target.Nodes (Position.Node).Parent := Parent.Node; Insert_Subtree_Node (Target, Position.Node, Parent.Node, Before.Node); return; end if; TC_Check (Target.TC); TC_Check (Source.TC); if Target.Count = 0 then Initialize_Root (Target); end if; Splice_Subtree (Target => Target, Parent => Parent.Node, Before => Before.Node, Source => Source, Position => Position.Node); -- modified during call Position.Container := Target'Unrestricted_Access; end Splice_Subtree; procedure Splice_Subtree (Container : in out Tree; Parent : Cursor; Before : Cursor; Position : Cursor) is begin if Checks and then Parent = No_Element then raise Constraint_Error with "Parent cursor has no element"; end if; if Checks and then Parent.Container /= Container'Unrestricted_Access then raise Program_Error with "Parent cursor not in container"; end if; if Before /= No_Element then if Checks and then Before.Container /= Container'Unrestricted_Access then raise Program_Error with "Before cursor not in container"; end if; if Checks and then Container.Nodes (Before.Node).Parent /= Parent.Node then raise Constraint_Error with "Before cursor not child of Parent"; end if; end if; if Checks and then Position = No_Element then raise Constraint_Error with "Position cursor has no element"; end if; if Checks and then Position.Container /= Container'Unrestricted_Access then raise Program_Error with "Position cursor not in container"; end if; if Checks and then Is_Root (Position) then -- Should this be PE instead? Need ARG confirmation. ??? raise Constraint_Error with "Position cursor designates root"; end if; if Container.Nodes (Position.Node).Parent = Parent.Node then if Before = No_Element then if Container.Nodes (Position.Node).Next <= 0 then -- last child return; end if; elsif Position.Node = Before.Node then return; elsif Container.Nodes (Position.Node).Next = Before.Node then return; end if; end if; TC_Check (Container.TC); if Checks and then Is_Reachable (Container => Container, From => Parent.Node, To => Position.Node) then raise Constraint_Error with "Position is ancestor of Parent"; end if; Remove_Subtree (Container, Position.Node); Container.Nodes (Position.Node).Parent := Parent.Node; Insert_Subtree_Node (Container, Position.Node, Parent.Node, Before.Node); end Splice_Subtree; procedure Splice_Subtree (Target : in out Tree; Parent : Count_Type; Before : Count_Type'Base; Source : in out Tree; Position : in out Count_Type) -- Source on input, Target on output is Source_Count : Count_Type := Subtree_Node_Count (Source, Position); pragma Assert (Source_Count >= 1); Target_Subtree : Count_Type; Target_Count : Count_Type; begin -- This is a utility operation to do the heavy lifting associated with -- splicing a subtree from one tree to another. Note that "splicing" -- is a bit of a misnomer here in the case of a bounded tree, because -- the elements must be copied from the source to the target. if Checks and then Target.Count > Target.Capacity - Source_Count then raise Capacity_Error -- ??? with "Source count exceeds available storage on Target"; end if; -- Copy_Subtree returns a count of the number of nodes it inserts, but -- it does this by incrementing the value passed in. Therefore we must -- initialize the count before calling Copy_Subtree. Target_Count := 0; Copy_Subtree (Source => Source, Source_Subtree => Position, Target => Target, Target_Parent => Parent, Target_Subtree => Target_Subtree, Count => Target_Count); pragma Assert (Target_Count = Source_Count); -- Now link the newly-allocated subtree into the target. Insert_Subtree_Node (Container => Target, Subtree => Target_Subtree, Parent => Parent, Before => Before); Target.Count := Target.Count + Target_Count; -- The manipulation of the Target container is complete. Now we remove -- the subtree from the Source container. Remove_Subtree (Source, Position); -- unlink the subtree -- As with Copy_Subtree, operation Deallocate_Subtree returns a count of -- the number of nodes it deallocates, but it works by incrementing the -- value passed in. We must therefore initialize the count before -- calling it. Source_Count := 0; Deallocate_Subtree (Source, Position, Source_Count); pragma Assert (Source_Count = Target_Count); Source.Count := Source.Count - Source_Count; Position := Target_Subtree; end Splice_Subtree; ------------------------ -- Subtree_Node_Count -- ------------------------ function Subtree_Node_Count (Position : Cursor) return Count_Type is begin if Position = No_Element then return 0; end if; if Position.Container.Count = 0 then pragma Assert (Is_Root (Position)); return 1; end if; return Subtree_Node_Count (Position.Container.all, Position.Node); end Subtree_Node_Count; function Subtree_Node_Count (Container : Tree; Subtree : Count_Type) return Count_Type is Result : Count_Type; Node : Count_Type'Base; begin Result := 1; Node := Container.Nodes (Subtree).Children.First; while Node > 0 loop Result := Result + Subtree_Node_Count (Container, Node); Node := Container.Nodes (Node).Next; end loop; return Result; end Subtree_Node_Count; ---------- -- Swap -- ---------- procedure Swap (Container : in out Tree; I, J : Cursor) is begin if Checks and then I = No_Element then raise Constraint_Error with "I cursor has no element"; end if; if Checks and then I.Container /= Container'Unrestricted_Access then raise Program_Error with "I cursor not in container"; end if; if Checks and then Is_Root (I) then raise Program_Error with "I cursor designates root"; end if; if I = J then -- make this test sooner??? return; end if; if Checks and then J = No_Element then raise Constraint_Error with "J cursor has no element"; end if; if Checks and then J.Container /= Container'Unrestricted_Access then raise Program_Error with "J cursor not in container"; end if; if Checks and then Is_Root (J) then raise Program_Error with "J cursor designates root"; end if; TE_Check (Container.TC); declare EE : Element_Array renames Container.Elements; EI : constant Element_Type := EE (I.Node); begin EE (I.Node) := EE (J.Node); EE (J.Node) := EI; end; end Swap; -------------------- -- Update_Element -- -------------------- procedure Update_Element (Container : in out Tree; Position : Cursor; Process : not null access procedure (Element : in out Element_Type)) is begin if Checks and then Position = No_Element then raise Constraint_Error with "Position cursor has no element"; end if; if Checks and then Position.Container /= Container'Unrestricted_Access then raise Program_Error with "Position cursor not in container"; end if; if Checks and then Is_Root (Position) then raise Program_Error with "Position cursor designates root"; end if; declare T : Tree renames Position.Container.all'Unrestricted_Access.all; Lock : With_Lock (T.TC'Unrestricted_Access); begin Process (Element => T.Elements (Position.Node)); end; end Update_Element; ----------- -- Write -- ----------- procedure Write (Stream : not null access Root_Stream_Type'Class; Container : Tree) is procedure Write_Children (Subtree : Count_Type); procedure Write_Subtree (Subtree : Count_Type); -------------------- -- Write_Children -- -------------------- procedure Write_Children (Subtree : Count_Type) is CC : Children_Type renames Container.Nodes (Subtree).Children; C : Count_Type'Base; begin Count_Type'Write (Stream, Child_Count (Container, Subtree)); C := CC.First; while C > 0 loop Write_Subtree (C); C := Container.Nodes (C).Next; end loop; end Write_Children; ------------------- -- Write_Subtree -- ------------------- procedure Write_Subtree (Subtree : Count_Type) is begin Element_Type'Write (Stream, Container.Elements (Subtree)); Write_Children (Subtree); end Write_Subtree; -- Start of processing for Write begin Count_Type'Write (Stream, Container.Count); if Container.Count = 0 then return; end if; Write_Children (Root_Node (Container)); end Write; procedure Write (Stream : not null access Root_Stream_Type'Class; Position : Cursor) is begin raise Program_Error with "attempt to write tree cursor to stream"; end Write; procedure Write (Stream : not null access Root_Stream_Type'Class; Item : Reference_Type) is begin raise Program_Error with "attempt to stream reference"; end Write; procedure Write (Stream : not null access Root_Stream_Type'Class; Item : Constant_Reference_Type) is begin raise Program_Error with "attempt to stream reference"; end Write; end Ada.Containers.Bounded_Multiway_Trees;
source/amf/uml/amf-umldi-uml_diagrams-collections.ads
svn2github/matreshka
24
25622
<reponame>svn2github/matreshka ------------------------------------------------------------------------------ -- -- -- Matreshka Project -- -- -- -- Ada Modeling Framework -- -- -- -- Runtime Library Component -- -- -- ------------------------------------------------------------------------------ -- -- -- Copyright © 2011-2012, <NAME> <<EMAIL>> -- -- All rights reserved. -- -- -- -- Redistribution and use in source and binary forms, with or without -- -- modification, are permitted provided that the following conditions -- -- are met: -- -- -- -- * Redistributions of source code must retain the above copyright -- -- notice, this list of conditions and the following disclaimer. -- -- -- -- * Redistributions in binary form must reproduce the above copyright -- -- notice, this list of conditions and the following disclaimer in the -- -- documentation and/or other materials provided with the distribution. -- -- -- -- * Neither the name of the Vadim Godunko, IE nor the names of its -- -- contributors may be used to endorse or promote products derived from -- -- this software without specific prior written permission. -- -- -- -- THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -- -- "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -- -- LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -- -- A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -- -- HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -- -- SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED -- -- TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR -- -- PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF -- -- LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING -- -- NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS -- -- SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -- -- -- ------------------------------------------------------------------------------ -- $Revision$ $Date$ ------------------------------------------------------------------------------ -- This file is generated, don't edit it. ------------------------------------------------------------------------------ with AMF.Generic_Collections; package AMF.UMLDI.UML_Diagrams.Collections is pragma Preelaborate; package UMLDI_UML_Diagram_Collections is new AMF.Generic_Collections (UMLDI_UML_Diagram, UMLDI_UML_Diagram_Access); type Set_Of_UMLDI_UML_Diagram is new UMLDI_UML_Diagram_Collections.Set with null record; Empty_Set_Of_UMLDI_UML_Diagram : constant Set_Of_UMLDI_UML_Diagram; type Ordered_Set_Of_UMLDI_UML_Diagram is new UMLDI_UML_Diagram_Collections.Ordered_Set with null record; Empty_Ordered_Set_Of_UMLDI_UML_Diagram : constant Ordered_Set_Of_UMLDI_UML_Diagram; type Bag_Of_UMLDI_UML_Diagram is new UMLDI_UML_Diagram_Collections.Bag with null record; Empty_Bag_Of_UMLDI_UML_Diagram : constant Bag_Of_UMLDI_UML_Diagram; type Sequence_Of_UMLDI_UML_Diagram is new UMLDI_UML_Diagram_Collections.Sequence with null record; Empty_Sequence_Of_UMLDI_UML_Diagram : constant Sequence_Of_UMLDI_UML_Diagram; private Empty_Set_Of_UMLDI_UML_Diagram : constant Set_Of_UMLDI_UML_Diagram := (UMLDI_UML_Diagram_Collections.Set with null record); Empty_Ordered_Set_Of_UMLDI_UML_Diagram : constant Ordered_Set_Of_UMLDI_UML_Diagram := (UMLDI_UML_Diagram_Collections.Ordered_Set with null record); Empty_Bag_Of_UMLDI_UML_Diagram : constant Bag_Of_UMLDI_UML_Diagram := (UMLDI_UML_Diagram_Collections.Bag with null record); Empty_Sequence_Of_UMLDI_UML_Diagram : constant Sequence_Of_UMLDI_UML_Diagram := (UMLDI_UML_Diagram_Collections.Sequence with null record); end AMF.UMLDI.UML_Diagrams.Collections;
gcc-gcc-7_3_0-release/gcc/testsuite/ada/acats/tests/c4/c45201a.ada
best08618/asylo
7
27419
-- C45201A.ADA -- Grant of Unlimited Rights -- -- Under contracts F33600-87-D-0337, F33600-84-D-0280, MDA903-79-C-0687, -- F08630-91-C-0015, and DCA100-97-D-0025, the U.S. Government obtained -- unlimited rights in the software and documentation contained herein. -- Unlimited rights are defined in DFAR 252.227-7013(a)(19). By making -- this public release, the Government intends to confer upon all -- recipients unlimited rights equal to those held by the Government. -- These rights include rights to use, duplicate, release or disclose the -- released technical data and computer software in whole or in part, in -- any manner and for any purpose whatsoever, and to have or permit others -- to do so. -- -- DISCLAIMER -- -- ALL MATERIALS OR INFORMATION HEREIN RELEASED, MADE AVAILABLE OR -- DISCLOSED ARE AS IS. THE GOVERNMENT MAKES NO EXPRESS OR IMPLIED -- WARRANTY AS TO ANY MATTER WHATSOEVER, INCLUDING THE CONDITIONS OF THE -- SOFTWARE, DOCUMENTATION OR OTHER INFORMATION RELEASED, MADE AVAILABLE -- OR DISCLOSED, OR THE OWNERSHIP, MERCHANTABILITY, OR FITNESS FOR A -- PARTICULAR PURPOSE OF SAID MATERIAL. --* -- CHECK THAT '=' AND '/=' PRODUCE CORRECT RESULTS ON -- ENUMERATION-TYPE OPERANDS (IN PARTICULAR, FOR OPERANDS HAVING -- DIFFERENT SUBTYPES). -- THIS TEST'S FRAMEWORK IS FROM C45201B.ADA , C45210A.ADA . -- RM 20 OCTOBER 1980 -- JWC 7/8/85 RENAMED TO -AB WITH REPORT ; PROCEDURE C45201A IS USE REPORT; TYPE T IS ( A , SLIT , B , PLIT , C , NUL , D , 'R' , E ); -- S-LIT , P-LIT , NUL , 'R' CORRESPOND -- TO 'S' , 'P' , 'M' , 'R' IN C45210A. SUBTYPE T1 IS T RANGE A..B ; SUBTYPE T2 IS T RANGE A..C ; -- INCLUDES T1 SUBTYPE T3 IS T RANGE B..D ; -- INTERSECTS T2 , T4 SUBTYPE T4 IS T RANGE C..E ; -- DISJOINT FROM T1 , T2 MVAR : T3 := T'(NUL ) ; PVAR : T2 := T'(PLIT) ; RVAR : T4 := T'('R' ) ; SVAR : T1 := T'(SLIT) ; ERROR_COUNT : INTEGER := 0 ; -- INITIAL VALUE ESSENTIAL PROCEDURE BUMP IS BEGIN ERROR_COUNT := ERROR_COUNT + 1 ; END BUMP ; FUNCTION ITSELF( THE_ARGUMENT : T ) RETURN T IS BEGIN IF EQUAL(2,2) THEN RETURN THE_ARGUMENT; ELSE RETURN A ; END IF; END ; BEGIN TEST( "C45201A" , "CHECK THAT '=' AND '/=' PRODUCE CORRECT" & " RESULTS ON ENUMERATION-TYPE LITERALS" ) ; -- 128 CASES ( 4 * 4 ORDERED PAIRS OF OPERAND VALUES, -- 2 (4) OPERATORS (2, TWICE): '=' , '/=' , '=' , '/=' -- (IN THE TABLE: A , B , C , D ) -- (C45201B.ADA HAD < <= > >= ; REVERSED) -- 4 VARIABLE/LITERAL FOR LEFT OPERAND, -- VARIABLE/LITERAL FOR RIGHT OPERAND, -- (IN THE TABLE: VV = ALPHA , -- VL = BETA , -- LV = GAMMA , -- LL = DELTA ) RANDOMIZED -- INTO 16 (ONE FOR EACH PAIR OF VALUES) ACCORDING TO THE FOL- -- LOWING GRAECO-LATIN SQUARE (WITH ADDITIONAL PROPERTIES): -- RIGHT OPERAND: 'S' 'P' 'M' 'R' -- LEFT -- OPERAND: -- 'S' A-ALPHA B-BETA C-GAMMA D-DELTA -- 'P' C-DELTA D-GAMMA A-BETA B-ALPHA -- 'M' D-BETA C-ALPHA B-DELTA A-GAMMA -- 'R' B-GAMMA A-DELTA D-ALPHA C-BETA -- (BOTH THE LATIN DIAGONAL AND THE GREEK DIAGONAL CONTAIN 4 -- DISTINCT LETTERS, NON-TRIVIALLY PERMUTED.) -- THE ABOVE DESCRIBES PART 1 OF THE TEST. PART 2 PERFORMS AN -- EXHAUSTIVE VERIFICATION OF THE 'VARIABLE VS. VARIABLE' CASE -- ( VV , ALPHA ) FOR BOTH OPERATORS. ----------------------------------------------------------------- -- PART 1 -- 'BUMP' MEANS 'BUMP THE ERROR COUNT' IF T'(SVAR) = T'(SVAR) THEN NULL; ELSE BUMP ; END IF; IF T'(SVAR) /= T'(PLIT) THEN NULL; ELSE BUMP ; END IF; IF T'(SLIT) = T'(MVAR) THEN BUMP ; END IF; IF T'(SLIT) /= T'('R' ) THEN NULL; ELSE BUMP ; END IF; IF T'(PLIT) = T'(SLIT) THEN BUMP ; END IF; IF T'(PLIT) /= T'(PVAR) THEN BUMP ; END IF; IF T'(PVAR) = T'(NUL ) THEN BUMP ; END IF; IF T'(PVAR) /= T'(RVAR) THEN NULL; ELSE BUMP ; END IF; IF T'(MVAR) /= T'(SLIT) THEN NULL; ELSE BUMP ; END IF; IF T'(MVAR) = T'(PVAR) THEN BUMP ; END IF; IF T'(NUL ) /= T'(NUL ) THEN BUMP ; END IF; IF T'(NUL ) = T'(RVAR) THEN BUMP ; END IF; IF T'('R' ) /= T'(SVAR) THEN NULL; ELSE BUMP ; END IF; IF T'('R' ) = T'(PLIT) THEN BUMP ; END IF; IF T'(RVAR) /= T'(MVAR) THEN NULL; ELSE BUMP ; END IF; IF T'(RVAR) = T'('R' ) THEN NULL; ELSE BUMP ; END IF; IF ERROR_COUNT /= 0 THEN FAILED( "EQUALITY OF ENUMERATION VALUES - FAILURE1" ); END IF; ----------------------------------------------------------------- -- PART 2 -- 'BUMP' STILL MEANS 'BUMP THE ERROR COUNT' ERROR_COUNT := 0 ; FOR AVAR IN T'FIRST..T'LAST LOOP -- 9 VALUES FOR BVAR IN T'FIRST..T'LAST LOOP -- 9 VALUES IF AVAR = BVAR THEN IF AVAR /= BVAR THEN BUMP ; END IF; END IF; IF AVAR /= BVAR THEN IF AVAR = BVAR THEN BUMP ; END IF; END IF; END LOOP; END LOOP; IF ERROR_COUNT /= 0 THEN FAILED( "EQUALITY OF ENUMERATION VALUES - FAILURE2" ); END IF; ERROR_COUNT := 0 ; FOR AVAR IN T'FIRST..T'LAST LOOP -- 9 VALUES FOR BVAR IN T'FIRST..T'LAST LOOP -- 9 VALUES IF ( AVAR /= BVAR ) /= ( T'POS(AVAR) /= T'POS(BVAR) )THEN BUMP ; END IF; IF ( AVAR = BVAR ) /= ( T'POS(AVAR) = T'POS(BVAR) )THEN BUMP ; END IF; END LOOP; END LOOP; IF ERROR_COUNT /= 0 THEN FAILED( "EQUALITY OF ENUMERATION VALUES - FAILURE3" ); END IF; ERROR_COUNT := 0 ; FOR IVAR IN 0..8 LOOP -- 9 VALUES FOR JVAR IN 0..8 LOOP -- 9 VALUES IF ( IVAR /= JVAR ) /= ( T'VAL(IVAR) /= T'VAL(JVAR) )THEN BUMP ; END IF; IF ( IVAR = JVAR ) /= ( T'VAL(IVAR) = T'VAL(JVAR) )THEN BUMP ; END IF; END LOOP; END LOOP; IF ERROR_COUNT /= 0 THEN FAILED( "EQUALITY OF ENUMERATION VALUES - FAILURE4" ); END IF; ERROR_COUNT := 0 ; FOR AVAR IN T'FIRST..T'LAST LOOP -- 9 VALUES (THE DIAGONAL) IF AVAR = ITSELF(AVAR) THEN NULL; ELSE BUMP; END IF; IF AVAR /= ITSELF(AVAR) THEN BUMP; END IF; END LOOP; IF ERROR_COUNT /= 0 THEN FAILED( "EQUALITY OF ENUMERATION VALUES - FAILURE5" ); END IF; -- 'BUMP' MEANS 'INCREASE THE COUNT FOR THE NUMBER OF <TRUE>S' ERROR_COUNT := 0 ; FOR AVAR IN T'FIRST..T'LAST LOOP -- 9 VALUES FOR BVAR IN T'FIRST..T'LAST LOOP -- 9 VALUES IF AVAR /= BVAR THEN BUMP ; END IF; -- COUNT +:= 72 END LOOP; END LOOP; IF ERROR_COUNT /= 72 THEN -- THIS IS A PLAIN COUNT, NOT AN -- ERROR COUNT FAILED( "EQUALITY OF ENUMERATION VALUES - FAILURE6" ); END IF; RESULT; END C45201A;
programs/oeis/070/A070455.asm
karttu/loda
1
6751
<reponame>karttu/loda<gh_stars>1-10 ; A070455: a(n) = n^2 mod 33. ; 0,1,4,9,16,25,3,16,31,15,1,22,12,4,31,27,25,25,27,31,4,12,22,1,15,31,16,3,25,16,9,4,1,0,1,4,9,16,25,3,16,31,15,1,22,12,4,31,27,25,25,27,31,4,12,22,1,15,31,16,3,25,16,9,4,1,0,1,4,9,16,25,3,16,31,15,1,22,12,4,31,27,25,25,27,31,4,12,22,1,15,31,16,3,25,16,9,4,1,0,1,4,9,16,25,3,16,31,15,1,22,12,4,31,27,25,25,27,31,4,12,22,1,15,31,16,3,25,16,9,4,1,0,1,4,9,16,25,3,16,31,15,1,22,12,4,31,27,25,25,27,31,4,12,22,1,15,31,16,3,25,16,9,4,1,0,1,4,9,16,25,3,16,31,15,1,22,12,4,31,27,25,25,27,31,4,12,22,1,15,31,16,3,25,16,9,4,1,0,1,4,9,16,25,3,16,31,15,1,22,12,4,31,27,25,25,27,31,4,12,22,1,15,31,16,3,25,16,9,4,1,0,1,4,9,16,25,3,16,31,15,1,22,12,4,31,27,25,25,27 pow $0,2 mod $0,33 mov $1,$0
parser/src/main/antlr4/i4gl/parser/I4GLParser.g4
guillermomolina/graal-i4gl
0
3980
/* * Based on https://github.com/antlr/grammars-v4/blob/master/informix/informix.g4 */ parser grammar I4GLParser; options { tokenVocab = I4GLLexer; } module: databaseDeclaration? globalsDeclaration? typeDeclarations? mainFunctionDefinition? functionOrReportDefinitions? EOF; identifier: keywordAsIdentifier | IDENT; keywordAsIdentifier: LENGTH; mainFunctionDefinition: MAIN typeDeclarations? mainStatements? END MAIN; mainStatements: ( exitProgramStatement | databaseDeclaration | deferStatement | statement )+; deferStatement: DEFER (INTERRUPT | QUIT); exitProgramStatement: EXIT PROGRAM (LPAREN expression RPAREN | expression)?; functionOrReportDefinitions: ( reportDefinition | functionDefinition )+; functionDefinition: FUNCTION identifier parameterList? typeDeclarations? codeBlock? END FUNCTION; parameterList: LPAREN parameterGroup? RPAREN; parameterGroup: identifier (COMMA identifier)*; globalsDeclaration: GLOBALS (string | typeDeclarations END GLOBALS); typeDeclarations: typeDeclaration+; typeDeclaration: DEFINE variableDeclaration (COMMA variableDeclaration)*; variableDeclaration: identifier (COMMA identifier)* type; type: typeIdentifier | indirectType | largeType | structuredType; indirectType: LIKE tableIdentifier DOT identifier; typeIdentifier: charType | numberType | dateType; largeType: TEXT | BYTE; numberType: ( BIGINT | INTEGER | INT | INT8 | SMALLINT | LONG | REAL | SMALLFLOAT ) | moneyType | decimalType | floatType; charType: varchar LPAREN numericConstant (COMMA numericConstant)? RPAREN | character (LPAREN numericConstant RPAREN)?; decimalType: (DECIMAL | DEC | NUMERIC) ( LPAREN numericConstant (COMMA numericConstant)? RPAREN )?; moneyType: MONEY ( LPAREN numericConstant (COMMA numericConstant)? RPAREN )?; floatType: (FLOAT | DOUBLE PRECISION) ( LPAREN numericConstant RPAREN )?; character: CHAR | NCHAR | CHARACTER; varchar: VARCHAR | NVARCHAR; dateType: DATE | DATETIME datetimeQualifier | INTERVAL intervalQualifier; datetimeQualifier: YEAR TO yearQualifier | MONTH TO monthQualifier | DAY TO dayQualifier | HOUR TO hourQualifier | MINUTE TO minuteQualifier | SECOND TO secondQualifier | FRACTION TO fractionQualifier; intervalQualifier: YEAR (LPAREN numericConstant RPAREN)? TO yearQualifier | MONTH (LPAREN numericConstant RPAREN)? TO monthQualifier | DAY (LPAREN numericConstant RPAREN)? TO dayQualifier | HOUR (LPAREN numericConstant RPAREN)? TO hourQualifier | MINUTE (LPAREN numericConstant RPAREN)? TO minuteQualifier | SECOND (LPAREN numericConstant RPAREN)? TO secondQualifier | FRACTION TO fractionQualifier; unitType: yearQualifier; yearQualifier: YEAR | monthQualifier; monthQualifier: MONTH | dayQualifier; dayQualifier: DAY | hourQualifier; hourQualifier: HOUR | minuteQualifier; minuteQualifier: MINUTE | secondQualifier; secondQualifier: SECOND | fractionQualifier; fractionQualifier: FRACTION (LPAREN numericConstant RPAREN)?; structuredType: recordLikeType | recordType | arrayType | dynArrayType; recordLikeType: RECORD LIKE tableIdentifier DOT STAR; recordType: RECORD (variableDeclaration (COMMA variableDeclaration)*) END RECORD; arrayIndexer: LBRACK dimensionSize ( COMMA dimensionSize | COMMA dimensionSize COMMA dimensionSize )? RBRACK; dimensionSize: UNSIGNED_INTEGER; arrayType: ARRAY arrayIndexer OF arrayElementstype; arrayElementstype: recordType | typeIdentifier | largeType; dynArrayType: DYNAMIC ARRAY WITH numericConstant DIMENSIONS OF dynArrayElementstype; dynArrayElementstype: recordType | typeIdentifier; string: STRING_LITERAL; statement: (label COLON)? unlabelledStatement; codeBlock: (statement | databaseDeclaration | returnStatement)+; returnStatement: RETURN expressionOrComponentVariableList?; label: identifier; unlabelledStatement: simpleStatement | structuredStatement; simpleStatement: assignmentStatement | callStatement | sqlStatement410 | sqlStatement | otherI4GLStatement | menuInsideStatement | constructInsideStatement | displayInsideStatement | inputInsideStatement | breakpointStatement; breakpointStatement: BREAKPOINT; runStatement: RUN (variable | string) (IN FORM MODE | IN LINE MODE)? ( WITHOUT WAITING | RETURNING variable )?; //Exploded for an easier visitor variable: identifier (DOT identifier)* variableIndex?; variable: DOLLAR? (notIndexedVariable | indexedVariable); notIndexedVariable: simpleVariable | recordVariable; simpleVariable: identifier; recordVariable: simpleVariable (DOT identifier)+; indexedVariable: notIndexedVariable variableIndex (DOT identifier)*; variableIndex: LBRACK expressionList RBRACK; assignmentStatement: LET (simpleAssignmentStatement | multipleAssignmentStatement); simpleAssignmentStatement: variable EQUAL assignmentValue; assignmentValue: concatExpression | function SEMI | NULL; multipleAssignmentStatement: identifier DOT STAR EQUAL identifier DOT STAR; callStatement: CALL function (SEMI | RETURNING variableOrComponentList)?; gotoStatement: GOTO COLON? label; ifCondition: booleanConstant | ifLogicalTerm (OR ifLogicalTerm)*; ifLogicalTerm: ifLogicalFactor (AND ifLogicalFactor)*; ifLogicalFactor: // Added "prior" to a comparison expression to support use of a condition in a connect_clause. expression IS NOT? NULL | NOT ifCondition | LPAREN ifCondition RPAREN | ifLogicalRelation; ifLogicalRelation: expression (relationalOperator expression)?; relationalOperator: EQUAL | NOT_EQUAL | LE | LT | GE | GT | LIKE | NOT? MATCHES; expressionList: expression (COMMA expression)*; expression: /*sign?*/ term (addingOperator term)*; addingOperator: PLUS | MINUS; term: factor (multiplyingOperator factor)*; multiplyingOperator: STAR | SLASH | DIV | MOD; factor: factorTypes CLIPPED? (USING string)? (UNITS unitType)?; factorTypes: GROUP? function | constant | variable // or function without arguments | LPAREN expression RPAREN | NOT factor; function: identifier LPAREN expressionOrComponentVariableList? RPAREN; constant: asciiConstant | booleanConstant | dateConstant | numericConstant | string; asciiConstant: ASCII (UNSIGNED_INTEGER | expression); booleanConstant: TRUE | FALSE; dateConstant: MDY LPAREN expression COMMA expression COMMA expression RPAREN; numericConstant: integer | real; structuredStatement: conditionalStatement | repetetiveStatement; conditionalStatement: ifStatement | caseStatement; ifStatement: IF ifCondition THEN codeBlock? (ELSE codeBlock?)? END IF; caseStatement: caseStatement1 | caseStatement2; caseStatement1: CASE expression (WHEN expression codeBlock)+ ( OTHERWISE codeBlock )? END CASE; caseStatement2: CASE (WHEN ifCondition codeBlock)+ (OTHERWISE codeBlock)? END CASE; repetetiveStatement: whileStatement | forEachStatement | forStatement; whileStatement: WHILE ifCondition codeBlock? END WHILE; forEachStatement: FOREACH cursorName usingVariableList? intoVariableList? ( WITH REOPTIMIZATION )? codeBlock? END FOREACH; usingVariableList: USING variableList; intoVariableList: INTO variableOrComponentList; variableOrComponentList: variableOrComponent (COMMA variableOrComponent)*; variableOrComponent: variable | componentVariable; componentVariable: starComponentVariable | thruComponentVariable; starComponentVariable: simpleVariable (DOT identifier)* DOT STAR; thruComponentVariable: recordVariable (THROUGH | THRU) recordVariable; forStatement: FOR controlVariable EQUAL initialValue TO finalValue ( STEP numericConstant )? codeBlock? END FOR; controlVariable: identifier; initialValue: expression; finalValue: expression; variableList: variable (COMMA variable)*; variableOrConstantList: expression (COMMA expression)*; otherI4GLStatement: otherProgramFlowStatement | otherStorageStatement | reportStatement | screenStatement; otherProgramFlowStatement: runStatement | gotoStatement | SLEEP expression | exitStatements | continueStatements; exitTypes: FOREACH | FOR | CASE | CONSTRUCT | DISPLAY | INPUT | MENU | REPORT | WHILE; exitStatements: EXIT exitTypes; continueStatements: CONTINUE exitTypes; otherStorageStatement: ALLOCATE ARRAY identifier arrayIndexer | LOCATE variableOrComponentList IN ( MEMORY | FILE (variable | string)? ) | DEALLOCATE ARRAY identifier | RESIZE ARRAY identifier arrayIndexer | FREE variableOrComponentList // name clash, marked as SQL | initializeStatement | VALIDATE variableOrComponentList LIKE expression ( COMMA expression )*; initializeStatement: INITIALIZE variableOrComponentList ( TO NULL | LIKE columnsList ); printExpressionItem: COLUMN expression | (PAGENO | LINENO) | BYTE variable | TEXT variable | expression (SPACE | SPACES)? ( WORDWRAP (RIGHT MARGIN numericConstant)? )?; printExpressionList: printExpressionItem (COMMA printExpressionItem)*; reportStatement: START_REPORT identifier ( TO (expression | PIPE expression | PRINTER) )? ( WITH ( (LEFT MARGIN numericConstant) | (RIGHT MARGIN numericConstant) | (TOP MARGIN numericConstant) | (BOTTOM MARGIN numericConstant) | (PAGE LENGTH numericConstant) | (TOP OF PAGE string) )* )? | TERMINATE REPORT identifier | FINISH REPORT identifier | PAUSE string? | NEED expression LINES | PRINT (printExpressionList SEMI? | FILE string)? | SKIP2 (expression (LINE | LINES) | TO TOP OF PAGE) | OUTPUT TO REPORT identifier LPAREN expressionList? RPAREN; fieldName: ((identifier (LBRACK numericConstant RBRACK)?) DOT)? identifier | (identifier (LBRACK numericConstant RBRACK)?) DOT ( STAR | identifier thruNotation? ); thruNotation: (THROUGH | THRU) (SAME DOT)? identifier; fieldList: expression (COMMA expression)*; keyList: expression (COMMA expression)*; constructEvents: BEFORE CONSTRUCT | AFTER CONSTRUCT | BEFORE FIELD fieldList | AFTER FIELD fieldList | ON KEY LPAREN keyList RPAREN; constructInsideStatement: NEXT FIELD (fieldName | NEXT | PREVIOUS) | CONTINUE CONSTRUCT | EXIT CONSTRUCT; specialAttribute: REVERSE | BLINK | UNDERLINE; attribute: ( BLACK | BLUE | CYAN | GREEN | MAGENTA | RED | WHITE | YELLOW | BOLD | DIM | NORMAL | INVISIBLE )? specialAttribute (COMMA specialAttribute)*; attributeList: (ATTRIBUTE | ATTRIBUTES) LPAREN attribute RPAREN; constructGroupStatement: constructEvents codeBlock+; constructStatement: CONSTRUCT ( BY NAME variable ON columnsList | variable ON columnsList FROM fieldList ) attributeList? (HELP numericConstant)? ( constructGroupStatement+ END CONSTRUCT )?; columnsList: columnsTableId (COMMA columnsTableId)*; columnsTableId: tableIdentifier DOT (STAR | identifier); tableIdentifier: tableQualifier? identifier; tableQualifier: identifier COLON | identifier ATSYMBOL identifier COLON | string; displayArrayStatement: DISPLAY ARRAY expression TO expression attributeList? displayEvents* ( END DISPLAY )?; displayInsideStatement: CONTINUE DISPLAY | EXIT DISPLAY; displayEvents: ON KEY LPAREN keyList RPAREN codeBlock+; concatExpression: expressionOrComponentVariableList; expressionOrComponentVariableList: expressionOrComponentVariable ( COMMA expressionOrComponentVariable )*; expressionOrComponentVariable: expression | componentVariable; displayStatement: DISPLAY ( BY NAME variableList | concatExpression ( TO fieldList | AT expression COMMA expression )? ) attributeList?; errorStatement: ERROR concatExpression attributeList?; messageStatement: MESSAGE concatExpression attributeList?; promptStatement: PROMPT expressionList attributeList? FOR CHAR? variable ( HELP numericConstant )? attributeList? ( (ON KEY LPAREN keyList RPAREN codeBlock?)* END PROMPT )?; inputEvents: (BEFORE | AFTER) (INPUT | ROW | INSERT | DELETE) | BEFORE FIELD fieldList | AFTER FIELD fieldList | ON KEY LPAREN keyList RPAREN; inputInsideStatement: NEXT FIELD (fieldName | (NEXT | PREVIOUS)) | (CONTINUE INPUT | EXIT INPUT); inputGroupStatement: inputEvents codeBlock*; inputStatement: INPUT ( BY NAME expressionList (WITHOUT DEFAULTS)? | expressionList (WITHOUT DEFAULTS)? FROM fieldList ) attributeList? (HELP numericConstant)? ( inputGroupStatement+ END INPUT )?; inputArrayStatement: INPUT ARRAY expression (WITHOUT DEFAULTS)? FROM expression ( COMMA expression )* (HELP numericConstant)? attributeList? ( inputGroupStatement+ END INPUT )?; menuEvents: BEFORE MENU | COMMAND ( (KEY LPAREN keyList RPAREN)? expression expression? ( HELP numericConstant )? ); menuInsideStatement: NEXT OPTION (expression | ALL) (COMMA expression)* | SHOW OPTION (expression | ALL) (COMMA expression)* | HIDE OPTION (expression | ALL) (COMMA expression)* | CONTINUE MENU | EXIT MENU; menuGroupStatement: menuEvents codeBlock?; menuStatement: MENU expression menuGroupStatement* END MENU; reservedLinePosition: FIRST (PLUS numericConstant)? | numericConstant | LAST (MINUS numericConstant)?; specialWindowAttribute: ( BLACK | BLUE | CYAN | GREEN | MAGENTA | RED | WHITE | YELLOW | BOLD | DIM | NORMAL | INVISIBLE ) | REVERSE | BORDER | (PROMPT | FORM | MENU | MESSAGE) LINE reservedLinePosition | COMMENT LINE (reservedLinePosition | OFF); windowAttribute: specialWindowAttribute (COMMA specialWindowAttribute)*; windowAttributeList: (ATTRIBUTE | ATTRIBUTES) LPAREN windowAttribute RPAREN; optionStatement: ( MESSAGE LINE expression | PROMPT LINE expression | MENU LINE expression | COMMENT LINE expression | ERROR LINE expression | FORM LINE expression | INPUT (WRAP | NO WRAP) | INSERT KEY expression | DELETE KEY expression | NEXT KEY expression | PREVIOUS KEY expression | ACCEPT KEY expression | HELP FILE expression | HELP KEY expression | INPUT attributeList | DISPLAY attributeList | SQL INTERRUPT (ON | OFF) | FIELD ORDER (CONSTRAINED | UNCONSTRAINED) ); optionsStatement: OPTIONS optionStatement (COMMA optionStatement)*; screenStatement: CLEAR (FORM | WINDOW identifier | WINDOW? SCREEN | fieldList) | CLOSE_WINDOW identifier | CLOSE_FORM identifier | constructStatement | CURRENT WINDOW IS (SCREEN | identifier) | displayStatement | displayArrayStatement | DISPLAY FORM identifier attributeList? | errorStatement | messageStatement | promptStatement | inputStatement | inputArrayStatement | menuStatement | OPEN_FORM expression FROM expression | OPEN_WINDOW expression AT expression COMMA expression ( WITH FORM expression | WITH expression ROWS COMMA expression COLUMNS ) windowAttributeList? | optionsStatement | SCROLL fieldList (COMMA fieldList)* (UP | DOWN) ( BY numericConstant )?; sqlStatement410: SQL sqlStatement SEMI? END SQL; sqlStatement: cursorManipulationStatement | dataDefinitionStatement | dataManipulationStatement | dynamicManagementStatement | queryOptimizationStatement | dataIntegrityStatement | clientServerStatement; cursorManipulationStatement: closeCursorStatement | declareCursorStatement | fetchCursorStatement | flushCursorStatement | openCursorStatement | putCursorStatement; closeCursorStatement: CLOSE cursorName; declareCursorStatement: DECLARE cursorName ( CURSOR (WITH HOLD)? FOR ( sqlSelectStatement (FOR UPDATE (OF columnsList)?)? | sqlInsertStatement | statementId ) | SCROLL CURSOR (WITH HOLD)? FOR ( sqlSelectStatement | statementId ) ); fetchCursorStatement: FETCH ( NEXT | (PREVIOUS | PRIOR) | FIRST | LAST | CURRENT | RELATIVE expression | ABSOLUTE expression )? cursorName intoVariableList?; flushCursorStatement: FLUSH cursorName; openCursorStatement: OPEN cursorName usingVariableList?; putCursorStatement: PUT cursorName (FROM variableOrConstantList)?; statementId: identifier; cursorName: identifier; dataDefinitionStatement: DROP SQL_MODE_WORD+ | CREATE SQL_MODE_WORD+; dataManipulationStatement: sqlInsertStatement | sqlDeleteStatement | sqlSelectStatement | sqlUpdateStatement | sqlLoadStatement | sqlUnLoadStatement; sqlInsertStatement: INSERT_INTO SQL_MODE_WORD+; sqlDeleteStatement: DELETE_FROM SQL_MODE_WORD+; sqlSelectStatement: SELECT SQL_MODE_WORD+ intoVariableList? FROM SQL_MODE_WORD+; sqlUpdateStatement: UPDATE SQL_MODE_WORD+; sqlLoadStatement: LOAD_FROM (variable | SQL_MODE_WORD) ( DELIMITER (variable | SQL_MODE_WORD) )? SQL_MODE_WORD+; sqlUnLoadStatement: UNLOAD_TO (variable | SQL_MODE_WORD) ( DELIMITER (variable | SQL_MODE_WORD) )? SQL_MODE_WORD+; dynamicManagementStatement: PREPARE cursorName FROM expression | EXECUTE cursorName usingVariableList? | FREE (cursorName | statementId) | LOCK SQL_MODE_WORD+; queryOptimizationStatement: UPDATE_STATISTICS SQL_MODE_WORD* | SET SQL_MODE_WORD+; dataIntegrityStatement: wheneverStatement | START SQL_MODE_WORD* // mysql dialect | BEGIN SQL_MODE_WORD* | COMMIT SQL_MODE_WORD* | ROLLBACK SQL_MODE_WORD*; wheneverStatement: WHENEVER wheneverType wheneverFlow; wheneverType: NOT FOUND | ANY? (SQLERROR | ERROR) | (SQLWARNING | WARNING); wheneverFlow: (CONTINUE | STOP) | CALL identifier | (GO TO | GOTO) COLON? identifier; clientServerStatement: CLOSE_DATABASE; databaseDeclaration: DATABASE (identifier (ATSYMBOL identifier)?) EXCLUSIVE? SEMI?; reportDefinition: REPORT identifier parameterList? typeDeclarations? outputReport? ( ORDER EXTERNAL? BY variableList )? formatReport? END REPORT; outputReport: OUTPUT (REPORT TO (string | PIPE string | PRINTER))? ( (LEFT MARGIN numericConstant) | (RIGHT MARGIN numericConstant) | (TOP MARGIN numericConstant) | (BOTTOM MARGIN numericConstant) | (PAGE LENGTH numericConstant) | (TOP OF PAGE string) )*; formatReport: FORMAT ( EVERY ROW | ( ( FIRST? PAGE HEADER | PAGE TRAILER | ON (EVERY ROW | LAST ROW) | (BEFORE | AFTER) GROUP OF variable ) codeBlock )+ ); integer: sign? UNSIGNED_INTEGER; real: sign? UNSIGNED_REAL; sign: PLUS | MINUS;
src/bin/cpu-visualizer/asm/addressing-modes.asm
gregtatum/cpu-6502-rs
0
99119
; Immediate values use the values provided immediately ; after the instruction immediate: lda #$22 ; Load the value 0x22 into register a ; Implied values need no operands. implied: sec ; Set the clear bit. ; Relative addresses are only used for branching operations. ; They move the current pc 127 bytes forward, or 128 bytes ; based on the signed byte provided. relative: bcc relative
Transynther/x86/_processed/US/_st_sm_/i3-7100_9_0xca_notsx.log_21829_340.asm
ljhsiun2/medusa
9
20912
.global s_prepare_buffers s_prepare_buffers: push %r11 push %r8 push %r9 push %rdx lea addresses_UC_ht+0x1208d, %r9 nop nop nop nop nop sub $38605, %r8 mov $0x6162636465666768, %rdx movq %rdx, (%r9) add %r11, %r11 pop %rdx pop %r9 pop %r8 pop %r11 ret .global s_faulty_load s_faulty_load: push %r11 push %r13 push %r14 push %r9 push %rcx push %rdi push %rsi // Store lea addresses_WC+0x109fd, %r11 nop nop inc %rdi movl $0x51525354, (%r11) nop nop nop nop add %r13, %r13 // Store lea addresses_UC+0x17825, %rsi nop nop and %rcx, %rcx movb $0x51, (%rsi) nop nop nop nop nop inc %r13 // Store mov $0x7db, %r9 nop nop nop nop nop xor %r14, %r14 movb $0x51, (%r9) nop dec %r14 // Store lea addresses_WC+0x1428d, %r11 nop nop nop nop nop inc %rdi movb $0x51, (%r11) nop nop nop add %r14, %r14 // Store lea addresses_US+0x1588d, %r14 nop nop nop nop nop xor $24944, %rcx movw $0x5152, (%r14) nop nop nop nop nop dec %r9 // Faulty Load lea addresses_US+0x1588d, %r11 nop nop nop nop and %r14, %r14 mov (%r11), %rsi lea oracles, %r9 and $0xff, %rsi shlq $12, %rsi mov (%r9,%rsi,1), %rsi pop %rsi pop %rdi pop %rcx pop %r9 pop %r14 pop %r13 pop %r11 ret /* <gen_faulty_load> [REF] {'src': {'same': False, 'congruent': 0, 'NT': False, 'type': 'addresses_US', 'size': 8, 'AVXalign': False}, 'OP': 'LOAD'} {'OP': 'STOR', 'dst': {'same': False, 'congruent': 4, 'NT': False, 'type': 'addresses_WC', 'size': 4, 'AVXalign': False}} {'OP': 'STOR', 'dst': {'same': False, 'congruent': 3, 'NT': False, 'type': 'addresses_UC', 'size': 1, 'AVXalign': False}} {'OP': 'STOR', 'dst': {'same': False, 'congruent': 1, 'NT': False, 'type': 'addresses_P', 'size': 1, 'AVXalign': True}} {'OP': 'STOR', 'dst': {'same': False, 'congruent': 9, 'NT': True, 'type': 'addresses_WC', 'size': 1, 'AVXalign': False}} {'OP': 'STOR', 'dst': {'same': True, 'congruent': 0, 'NT': False, 'type': 'addresses_US', 'size': 2, 'AVXalign': False}} [Faulty Load] {'src': {'same': True, 'congruent': 0, 'NT': False, 'type': 'addresses_US', 'size': 8, 'AVXalign': False}, 'OP': 'LOAD'} <gen_prepare_buffer> {'OP': 'STOR', 'dst': {'same': False, 'congruent': 10, 'NT': False, 'type': 'addresses_UC_ht', 'size': 8, 'AVXalign': False}} {'52': 21829} 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 */
source/environment/machine-apple-darwin/s-progra.adb
ytomino/drake
33
10631
<gh_stars>10-100 with System.Zero_Terminated_Strings; with C.mach_o.dyld; with C.stdint; package body System.Program is use type C.signed_int; use type C.stdint.uint32_t; function Full_Name return String is -- use proc_pidpath instead of NSGetExecutablePath? Buffer_Length : aliased C.stdint.uint32_t := 0; Small_Buffer : aliased C.char_array (0 .. 0); R : C.signed_int; begin -- getting the length at first R := C.mach_o.dyld.NSGetExecutablePath ( Small_Buffer (0)'Access, Buffer_Length'Access); pragma Assert (R < 0 and then Buffer_Length > 0); -- Buffer_Length is updated declare Buffer : aliased C.char_array (0 .. C.size_t (Buffer_Length - 1)); begin R := C.mach_o.dyld.NSGetExecutablePath ( Buffer (0)'Access, Buffer_Length'Access); pragma Assert (not (R < 0)); return Zero_Terminated_Strings.Value ( Buffer (0)'Access, C.size_t (Buffer_Length - 1)); end; end Full_Name; end System.Program;
tools-src/gnu/gcc/gcc/ada/31soccon.ads
enfoTek/tomato.linksys.e2000.nvram-mod
80
30036
------------------------------------------------------------------------------ -- -- -- GNAT COMPILER COMPONENTS -- -- -- -- G N A T . S O C K E T S . C O N S T A N T S -- -- -- -- S p e c -- -- -- -- $Revision$ -- -- -- Copyright (C) 2001 Ada Core Technologies, Inc. -- -- -- -- GNAT is free software; you can redistribute it and/or modify it under -- -- terms of the GNU General Public License as published by the Free Soft- -- -- ware Foundation; either version 2, or (at your option) any later ver- -- -- sion. GNAT is distributed in the hope that it will be useful, but WITH- -- -- OUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY -- -- or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License -- -- for more details. You should have received a copy of the GNU General -- -- Public License distributed with GNAT; see file COPYING. If not, write -- -- to the Free Software Foundation, 59 Temple Place - Suite 330, Boston, -- -- MA 02111-1307, USA. -- -- -- -- As a special exception, if other files instantiate generics from this -- -- unit, or you link this unit with other files to produce an executable, -- -- this unit does not by itself cause the resulting executable to be -- -- covered by the GNU General Public License. This exception does not -- -- however invalidate any other reasons why the executable file might be -- -- covered by the GNU Public License. -- -- -- -- GNAT is maintained by Ada Core Technologies Inc (http://www.gnat.com). -- -- -- ------------------------------------------------------------------------------ -- This is the version for UnixWare package GNAT.Sockets.Constants is -- Families AF_INET : constant := 2; AF_INET6 : constant := 27; -- Modes SOCK_STREAM : constant := 2; SOCK_DGRAM : constant := 1; -- Socket Errors EBADF : constant := 9; ENOTSOCK : constant := 95; ENOTCONN : constant := 134; ENOBUFS : constant := 132; EOPNOTSUPP : constant := 122; EFAULT : constant := 14; EWOULDBLOCK : constant := 11; EADDRNOTAVAIL : constant := 126; EMSGSIZE : constant := 97; EADDRINUSE : constant := 125; EINVAL : constant := 22; EACCES : constant := 13; EAFNOSUPPORT : constant := 124; EISCONN : constant := 133; ETIMEDOUT : constant := 145; ECONNREFUSED : constant := 146; ENETUNREACH : constant := 128; EALREADY : constant := 149; EINPROGRESS : constant := 150; ENOPROTOOPT : constant := 99; EPROTONOSUPPORT : constant := 120; EINTR : constant := 4; EIO : constant := 5; ESOCKTNOSUPPORT : constant := 121; -- Host Errors HOST_NOT_FOUND : constant := 1; TRY_AGAIN : constant := 2; NO_ADDRESS : constant := 4; NO_RECOVERY : constant := 3; -- Control Flags FIONBIO : constant := -2147195266; FIONREAD : constant := 1074030207; -- Shutdown Modes SHUT_RD : constant := 0; SHUT_WR : constant := 1; SHUT_RDWR : constant := 2; -- Protocol Levels SOL_SOCKET : constant := 65535; IPPROTO_IP : constant := 0; IPPROTO_UDP : constant := 17; IPPROTO_TCP : constant := 6; -- Socket Options TCP_NODELAY : constant := 1; SO_SNDBUF : constant := 4097; SO_RCVBUF : constant := 4098; SO_REUSEADDR : constant := 4; SO_KEEPALIVE : constant := 8; SO_LINGER : constant := 128; SO_ERROR : constant := 4103; SO_BROADCAST : constant := 32; IP_ADD_MEMBERSHIP : constant := 11; IP_DROP_MEMBERSHIP : constant := 12; IP_MULTICAST_TTL : constant := 16; IP_MULTICAST_LOOP : constant := 10; end GNAT.Sockets.Constants;
experiments/models/grade.als
saiema/ARepair
5
4895
abstract sig Person {} sig Student extends Person {} sig Professor extends Person {} sig Class { assistant_for: set Student, instructor_of: one Professor } sig Assignment { associated_with: one Class, assigned_to: some Student } pred PolicyAllowsGrading(s: Person, a: Assignment) { s in a.associated_with.assistant_for || s in a.associated_with.instructor_of s !in a.assigned_to } // Should help create tests. assert NoOneCanGradeTheirOwnAssignment { all s : Person | all a: Assignment | PolicyAllowsGrading[s, a] implies not s in a.assigned_to } check NoOneCanGradeTheirOwnAssignment
Transynther/x86/_processed/NONE/_ht_st_zr_un_/i7-7700_9_0x48.log_21008_250.asm
ljhsiun2/medusa
9
29673
.global s_prepare_buffers s_prepare_buffers: push %r10 push %r11 push %r13 push %r9 push %rbp push %rcx push %rdi push %rsi lea addresses_WC_ht+0x19c89, %rsi lea addresses_A_ht+0x1c029, %rdi inc %r10 mov $18, %rcx rep movsb nop dec %r13 lea addresses_WC_ht+0x16bbd, %r9 nop xor %rdi, %rdi movb (%r9), %r13b nop nop nop nop inc %r13 lea addresses_WC_ht+0x9e29, %rsi lea addresses_A_ht+0x5e29, %rdi lfence mov $14, %rcx rep movsl inc %r13 lea addresses_WT_ht+0x1d0e9, %r10 nop nop inc %rsi movups (%r10), %xmm0 vpextrq $1, %xmm0, %r11 nop nop nop nop nop and %r13, %r13 lea addresses_normal_ht+0x1caa3, %rsi lea addresses_WT_ht+0x137c9, %rdi xor $19312, %r13 mov $104, %rcx rep movsw nop nop add %rcx, %rcx lea addresses_UC_ht+0x16749, %r10 clflush (%r10) cmp $51703, %r13 movb (%r10), %r9b nop nop nop nop and $37804, %r10 lea addresses_WT_ht+0x19e09, %r11 nop nop xor $13108, %rcx mov (%r11), %di nop nop nop nop and %rsi, %rsi lea addresses_UC_ht+0x12da9, %r11 clflush (%r11) nop cmp %r13, %r13 movups (%r11), %xmm2 vpextrq $1, %xmm2, %r9 nop nop nop dec %r9 lea addresses_WT_ht+0x6785, %rsi lea addresses_D_ht+0x16109, %rdi nop nop cmp %rbp, %rbp mov $106, %rcx rep movsq sub $38864, %rbp lea addresses_A_ht+0x4229, %rsi lea addresses_A_ht+0x27e7, %rdi nop nop cmp $22538, %rbp mov $105, %rcx rep movsw inc %rcx lea addresses_D_ht+0x4c29, %rsi lea addresses_UC_ht+0xf3d9, %rdi nop dec %r13 mov $58, %rcx rep movsb nop nop nop inc %rbp lea addresses_WT_ht+0x16389, %rsi lea addresses_WC_ht+0x9629, %rdi clflush (%rdi) nop sub $9808, %r13 mov $34, %rcx rep movsw nop nop nop nop nop xor $46311, %r10 lea addresses_WC_ht+0xea29, %rbp nop nop nop nop nop add $6283, %rdi movl $0x61626364, (%rbp) nop nop nop cmp %rsi, %rsi lea addresses_WT_ht+0x12815, %rcx nop nop nop nop xor %r9, %r9 mov $0x6162636465666768, %r13 movq %r13, %xmm3 movups %xmm3, (%rcx) nop nop nop nop nop cmp %rcx, %rcx lea addresses_UC_ht+0x309, %rsi lea addresses_UC_ht+0x71b9, %rdi nop nop nop nop add %r13, %r13 mov $112, %rcx rep movsq nop nop nop nop add %r11, %r11 pop %rsi pop %rdi pop %rcx pop %rbp pop %r9 pop %r13 pop %r11 pop %r10 ret .global s_faulty_load s_faulty_load: push %r11 push %r14 push %r15 push %rbp push %rdi push %rsi // Store lea addresses_D+0x1aa29, %r11 nop and %r14, %r14 movl $0x51525354, (%r11) xor $32168, %rbp // Faulty Load lea addresses_UC+0x1aa29, %r14 clflush (%r14) nop nop nop nop add %rbp, %rbp vmovups (%r14), %ymm5 vextracti128 $1, %ymm5, %xmm5 vpextrq $0, %xmm5, %rdi lea oracles, %r14 and $0xff, %rdi shlq $12, %rdi mov (%r14,%rdi,1), %rdi pop %rsi pop %rdi pop %rbp pop %r15 pop %r14 pop %r11 ret /* <gen_faulty_load> [REF] {'OP': 'LOAD', 'src': {'type': 'addresses_UC', 'AVXalign': False, 'congruent': 0, 'size': 32, 'same': False, 'NT': False}} {'OP': 'STOR', 'dst': {'type': 'addresses_D', 'AVXalign': False, 'congruent': 8, 'size': 4, 'same': False, 'NT': True}} [Faulty Load] {'OP': 'LOAD', 'src': {'type': 'addresses_UC', 'AVXalign': False, 'congruent': 0, 'size': 32, 'same': True, 'NT': False}} <gen_prepare_buffer> {'OP': 'REPM', 'src': {'type': 'addresses_WC_ht', 'congruent': 4, 'same': False}, 'dst': {'type': 'addresses_A_ht', 'congruent': 9, 'same': True}} {'OP': 'LOAD', 'src': {'type': 'addresses_WC_ht', 'AVXalign': False, 'congruent': 1, 'size': 1, 'same': False, 'NT': False}} {'OP': 'REPM', 'src': {'type': 'addresses_WC_ht', 'congruent': 9, 'same': False}, 'dst': {'type': 'addresses_A_ht', 'congruent': 9, 'same': False}} {'OP': 'LOAD', 'src': {'type': 'addresses_WT_ht', 'AVXalign': False, 'congruent': 4, 'size': 16, 'same': False, 'NT': False}} {'OP': 'REPM', 'src': {'type': 'addresses_normal_ht', 'congruent': 1, 'same': False}, 'dst': {'type': 'addresses_WT_ht', 'congruent': 5, 'same': False}} {'OP': 'LOAD', 'src': {'type': 'addresses_UC_ht', 'AVXalign': False, 'congruent': 5, 'size': 1, 'same': False, 'NT': False}} {'OP': 'LOAD', 'src': {'type': 'addresses_WT_ht', 'AVXalign': True, 'congruent': 4, 'size': 2, 'same': False, 'NT': False}} {'OP': 'LOAD', 'src': {'type': 'addresses_UC_ht', 'AVXalign': False, 'congruent': 6, 'size': 16, 'same': False, 'NT': False}} {'OP': 'REPM', 'src': {'type': 'addresses_WT_ht', 'congruent': 1, 'same': True}, 'dst': {'type': 'addresses_D_ht', 'congruent': 5, 'same': False}} {'OP': 'REPM', 'src': {'type': 'addresses_A_ht', 'congruent': 10, 'same': False}, 'dst': {'type': 'addresses_A_ht', 'congruent': 0, 'same': False}} {'OP': 'REPM', 'src': {'type': 'addresses_D_ht', 'congruent': 6, 'same': False}, 'dst': {'type': 'addresses_UC_ht', 'congruent': 2, 'same': False}} {'OP': 'REPM', 'src': {'type': 'addresses_WT_ht', 'congruent': 5, 'same': False}, 'dst': {'type': 'addresses_WC_ht', 'congruent': 10, 'same': False}} {'OP': 'STOR', 'dst': {'type': 'addresses_WC_ht', 'AVXalign': False, 'congruent': 10, 'size': 4, 'same': False, 'NT': False}} {'OP': 'STOR', 'dst': {'type': 'addresses_WT_ht', 'AVXalign': False, 'congruent': 2, 'size': 16, 'same': False, 'NT': False}} {'OP': 'REPM', 'src': {'type': 'addresses_UC_ht', 'congruent': 5, 'same': False}, 'dst': {'type': 'addresses_UC_ht', 'congruent': 3, 'same': False}} {'3b': 1, 'e2': 1, '45': 14417, '88': 1, '00': 6582, '7e': 1, '66': 1, '48': 1, 'a8': 1, '44': 2} 00 45 45 00 00 00 45 00 00 45 00 45 45 45 45 45 45 45 45 45 00 45 45 45 00 00 45 45 45 00 45 00 00 45 00 45 45 45 00 00 45 45 45 00 45 00 45 00 45 45 45 45 00 45 45 00 00 45 45 00 45 00 00 45 45 00 45 45 45 00 00 45 45 45 45 00 45 45 45 00 45 45 45 00 00 45 00 00 45 45 00 45 45 45 00 45 00 45 45 45 45 00 45 45 45 45 45 45 45 00 45 45 45 45 00 45 00 00 45 45 45 45 45 45 45 00 45 45 45 45 45 45 45 45 45 45 00 00 45 45 00 45 45 45 00 45 45 45 00 45 45 00 00 45 45 45 45 45 45 45 45 45 45 45 45 45 00 00 00 45 45 00 45 45 00 45 45 00 45 00 00 45 45 45 00 45 45 45 45 45 00 00 45 45 45 00 45 45 45 00 45 00 45 45 45 00 45 45 00 00 00 00 45 45 45 00 00 00 45 45 00 00 45 45 45 45 00 45 45 45 45 45 00 45 45 45 45 00 00 45 45 45 45 45 45 45 45 45 45 00 45 00 45 00 45 45 45 00 45 45 00 45 00 45 45 00 00 00 45 45 45 00 45 45 45 45 00 45 45 45 45 45 45 00 45 00 45 45 45 00 45 45 00 00 45 45 45 45 45 45 45 00 45 00 45 45 45 45 45 00 00 00 00 00 45 00 00 45 00 00 45 45 45 45 45 00 45 45 00 00 45 45 00 45 45 45 00 00 45 45 45 45 00 45 45 00 45 45 00 00 45 45 45 45 00 45 45 45 00 45 00 00 45 00 45 45 45 45 45 45 00 00 00 00 45 45 00 45 45 45 45 45 45 45 00 45 45 45 45 45 00 45 45 45 45 00 45 00 00 45 45 45 45 00 45 00 45 45 45 00 00 00 00 00 45 45 45 00 00 45 45 00 45 45 00 00 45 45 00 45 45 45 00 00 45 45 00 45 45 00 45 45 45 45 45 45 45 45 45 45 00 45 45 45 00 45 00 45 00 45 45 45 45 45 45 00 45 45 00 00 45 00 45 45 00 00 45 45 45 45 45 45 45 00 00 45 45 00 00 45 45 00 45 00 45 45 45 00 45 45 00 45 45 45 45 45 00 45 45 00 45 45 00 00 45 45 00 45 45 00 00 45 45 45 45 45 45 45 45 00 45 45 45 45 45 45 00 45 45 00 45 45 45 00 45 45 45 45 45 45 45 45 00 45 45 45 45 45 00 45 45 45 45 00 45 45 00 45 88 45 45 45 00 00 00 45 45 45 00 45 45 45 45 45 45 45 45 45 00 45 45 45 45 45 00 45 00 00 00 00 45 45 45 45 00 45 45 45 00 00 45 45 45 00 45 00 45 00 45 00 45 45 45 00 45 45 00 00 00 45 00 45 45 45 45 00 45 45 45 00 00 45 00 00 45 45 00 45 45 45 45 45 45 00 45 45 45 45 45 00 45 45 00 45 45 00 45 45 45 45 45 00 45 45 45 45 00 00 45 45 45 00 00 45 45 45 45 45 00 45 45 00 45 45 00 45 45 45 45 00 45 45 45 00 00 45 45 45 00 45 45 00 45 00 00 45 45 00 00 45 45 45 00 45 45 45 45 00 00 45 00 00 00 00 00 45 45 45 00 00 45 45 45 45 45 45 45 00 45 45 00 00 45 00 00 45 00 45 45 45 45 45 45 45 45 00 45 00 45 45 45 00 45 45 00 45 45 00 45 45 00 45 45 45 00 00 45 45 00 00 45 45 00 45 45 45 00 45 45 45 00 45 45 45 45 45 45 45 45 45 00 45 45 45 00 45 00 00 45 00 00 00 00 45 45 45 45 45 45 45 45 00 45 00 00 45 00 45 45 45 00 00 45 00 00 45 00 00 00 45 45 45 00 00 45 45 45 45 00 00 45 00 00 00 45 00 45 45 45 45 45 45 00 00 45 45 45 45 00 45 45 00 45 45 45 45 45 00 45 45 45 45 45 45 00 00 45 00 45 45 45 45 45 45 00 45 00 00 45 45 45 45 45 00 45 45 00 00 45 45 45 45 00 45 00 45 00 00 45 45 45 45 45 45 45 45 45 45 45 45 00 45 45 45 45 45 45 45 45 45 45 45 00 45 45 45 45 00 45 45 45 45 00 45 45 45 00 45 45 45 00 00 45 45 45 45 45 45 45 00 45 45 45 00 45 45 45 45 45 00 00 00 00 45 45 45 00 45 00 00 */
oeis/077/A077881.asm
neoneye/loda-programs
11
6082
<gh_stars>10-100 ; A077881: Expansion of (1-x)^(-1)/(1-2*x^2+2*x^3). ; Submitted by <NAME> ; 1,1,3,1,5,-3,9,-15,25,-47,81,-143,257,-447,801,-1407,2497,-4415,7809,-13823,24449,-43263,76545,-135423,239617,-423935,750081,-1327103,2348033,-4154367,7350273,-13004799,23009281,-40710143,72028161,-127438847,225476609,-398934015,705830913 mov $1,1 lpb $0 sub $0,1 mov $2,$3 add $4,$1 add $1,1 sub $1,$4 mov $3,$4 mov $4,$2 mul $4,2 lpe add $1,$4 mov $0,$1
src/Native/Runtime/amd64/CallingConventionConverterHelpers.asm
kouvel/corert
3,223
243533
;; Licensed to the .NET Foundation under one or more agreements. ;; The .NET Foundation licenses this file to you under the MIT license. ;; ----------------------------------------------------------------------------------------------------------- ;; #include "asmmacros.inc" ;; ----------------------------------------------------------------------------------------------------------- LEAF_ENTRY macro Name, Section Section segment para 'CODE' align 16 public Name Name proc endm LEAF_END macro Name, Section Name endp Section ends endm ; - TAILCALL_RAX: ("jmp rax") should be used for tailcalls, this emits an instruction ; sequence which is recognized by the unwinder as a valid epilogue terminator TAILJMP_RAX TEXTEQU <DB 048h, 0FFh, 0E0h> POINTER_SIZE equ 08h ;; ;; void CallingConventionConverter_ReturnVoidReturnThunk() ;; LEAF_ENTRY CallingConventionConverter_ReturnVoidReturnThunk, _TEXT ret LEAF_END CallingConventionConverter_ReturnVoidReturnThunk, _TEXT ;; ;; int CallingConventionConverter_ReturnIntegerReturnThunk(int) ;; LEAF_ENTRY CallingConventionConverter_ReturnIntegerReturnThunk, _TEXT mov rax, rcx ret LEAF_END CallingConventionConverter_ReturnIntegerReturnThunk, _TEXT ;; ;; Note: The "__jmpstub__" prefix is used to indicate to debugger ;; that it must step-through this stub when it encounters it while ;; stepping. ;; ;; __jmpstub__CallingConventionConverter_CommonCallingStub ;; ;; ;; struct CallingConventionConverter_CommonCallingStub_PointerData ;; { ;; void *ManagedCallConverterThunk; ;; void *UniversalThunk; ;; } ;; ;; struct CommonCallingStubInputData ;; { ;; ULONG_PTR CallingConventionId; ;; CallingConventionConverter_CommonCallingStub_PointerData *commonData; ;; } ;; ;; r10 - Points at CommonCallingStubInputData ;; ;; LEAF_ENTRY __jmpstub__CallingConventionConverter_CommonCallingStub, _TEXT mov r11, [r10] ; put CallingConventionId into r11 as "parameter" to universal transition thunk mov r10, [r10 + POINTER_SIZE] ; get pointer to CallingConventionConverter_CommonCallingStub_PointerData into r10 mov rax, [r10 + POINTER_SIZE] ; get address of UniversalTransitionThunk mov r10, [r10] ; get address of ManagedCallConverterThunk TAILJMP_RAX LEAF_END __jmpstub__CallingConventionConverter_CommonCallingStub, _TEXT ;; ;; void CallingConventionConverter_GetStubs(IntPtr *returnVoidStub, IntPtr *returnIntegerStub, IntPtr *commonStub) ;; LEAF_ENTRY CallingConventionConverter_GetStubs, _TEXT lea rax, [CallingConventionConverter_ReturnVoidReturnThunk] mov [rcx], rax lea rax, [CallingConventionConverter_ReturnIntegerReturnThunk] mov [rdx], rax lea rax, [__jmpstub__CallingConventionConverter_CommonCallingStub] mov [r8], rax ret LEAF_END CallingConventionConverter_GetStubs, _TEXT end
src/cutscenes.asm
cout/sm_practice_hack
0
247018
org $82EEE0 dw cutscenes_load_intro if !FEATURE_PAL org $8BB124 else org $8BB240 endif JSR cutscenes_load_ceres_arrival org $8BF800 print pc, " cutscenes start" cutscenes_load_intro: { LDA !sram_cutscenes : BIT !CUTSCENE_SKIP_INTRO : BEQ .keep_intro LDA !sram_cutscenes : BIT !CUTSCENE_SKIP_CERES_ARRIVAL : BEQ .keep_ceres_arrival ; Skip intro and ceres arrival if !FEATURE_PAL LDA #$C065 else LDA #$C100 endif STA $1F51 JMP ($1F51) .keep_intro if !FEATURE_PAL LDA #$A365 else LDA #$A395 endif STA $1F51 JMP ($1F51) .keep_ceres_arrival if !FEATURE_PAL JSR $B8C7 LDA #$B3EE else JSR $BC08 LDA #$B72F endif STA $1F51 JMP ($1F51) } cutscenes_load_ceres_arrival: { LDA !sram_cutscenes : BIT !CUTSCENE_SKIP_CERES_ARRIVAL : BEQ .keep_ceres_arrival ; Skip ceres arrival if !FEATURE_PAL JSR $B934 LDA #$C065 else JSR $BC75 LDA #$C100 endif RTS .keep_ceres_arrival if !FEATURE_PAL LDA #$B3EE else LDA #$B72F endif RTS } print pc, " cutscenes end" if !FEATURE_PAL org $A9880C else org $A987FC endif cutscenes_mb_fake_death_check: { BEQ .check_fast_mb CMP #$0001 : BNE $15 .fast_mb JMP cutscenes_mb_fake_death_fast_init .check_fast_mb LDA !sram_cutscenes : BIT !CUTSCENE_FAST_MB : BNE .fast_mb JMP cutscenes_mb_fake_death_normal_init } if !FEATURE_PAL warnpc $A98824 else warnpc $A98814 endif if !FEATURE_PAL org $A9882E else org $A9881E endif dw cutscenes_mb_fake_death_pause if !FEATURE_PAL org $A98852 else org $A98842 endif dw cutscenes_mb_fake_death_lock if !FEATURE_PAL org $A98889 else org $A98879 endif dw cutscenes_mb_fake_death_unlock if !FEATURE_PAL org $A98987 else org $A98977 endif dw cutscenes_mb_clear_bottom_left_tube if !FEATURE_PAL org $A989B9 else org $A989A9 endif dw cutscenes_mb_clear_ceiling_column_9 if !FEATURE_PAL org $A989EB else org $A989DB endif dw cutscenes_mb_clear_ceiling_column_6 if !FEATURE_PAL org $A98A13 else org $A98A03 endif dw cutscenes_mb_clear_bottom_right_tube if !FEATURE_PAL org $A98A3B else org $A98A2B endif dw cutscenes_mb_clear_bottom_middle_left_tube if !FEATURE_PAL org $A98A6D else org $A98A5D endif dw cutscenes_mb_clear_ceiling_column_7 if !FEATURE_PAL org $A98A9F else org $A98A8F endif dw cutscenes_mb_clear_ceiling_column_8 if !FEATURE_PAL org $A98D78 else org $A98D68 endif ; Do not initialize health here, wait until later dw cutscenes_mb_fake_death_setup_mb_fight_or_escape BRA $04 if !FEATURE_PAL org $A98D90 else org $A98D80 endif dw cutscenes_mb_fake_death_pause_phase_2 if !FEATURE_PAL org $A98DCE else org $A98DBE endif dw cutscenes_mb_fake_death_load_tiles_phase_2 if !FEATURE_PAL org $A98E57 else org $A98E47 endif dw cutscenes_mb_fake_death_raise_mb if !FEATURE_PAL org $A98EDC else org $A98ECC endif JMP cutscenes_mb_choose_phase_2_or_3 if !FEATURE_PAL org $A98EF9 else org $A98EE9 endif dw cutscenes_mb_shaking_head if !FEATURE_PAL org $A98F12 else org $A98F02 endif dw cutscenes_mb_bring_head_back_up if !FEATURE_PAL org $A9AF17 else org $A9AF07 endif dw cutscenes_mb_death_move_to_back_of_room if !FEATURE_PAL org $A9AF58 else org $A9AF48 endif dw cutscenes_mb_death_first_stumble if !FEATURE_PAL org $A9B017 else org $A9B007 endif dw cutscenes_mb_death_final_explosions if !FEATURE_PAL org $A9B137 else org $A9B127 endif JMP cutscenes_mb_death_brain_falling if !FEATURE_PAL org $A9B177 else org $A9B167 endif dw cutscenes_mb_death_load_corpse if !FEATURE_PAL org $A9B1BC else org $A9B1AC endif dw cutscenes_mb_death_corpse_tips_over if !FEATURE_PAL org $A9B1FB else org $A9B1EB endif ; Make dead MB invisible and intangible, in case we jump here from a preset ORA #$0500 org $A9FBC0 print pc, " cutscenes MB start" cutscenes_mb_fake_death_fast_init: { ; Set health to non-zero value indicating we want fast logic ; If loading a preset, certain flags may already be set ; which allow MB to take damage, so setting value high, ; but also set below 18000 to avoid confusion with vanilla logic LDA #$464F : STA $0FCC ; If MB already defeated, reset health to full to simulate baby metroid refill LDA $7ED82D : BIT #$0002 : BEQ .end_refill LDA $7E09C4 : STA $7E09C2 .end_refill ; Overwritten logic without the song STA $7E783A : STA $7E7800 JSL $90A7E2 if !FEATURE_PAL JMP $8824 else JMP $8814 endif } cutscenes_mb_fake_death_normal_init: { ; Overwritten logic with the song LDA #$0001 : STA $7E783A : STA $7E7800 JSL $90A7E2 LDA #$0006 JSL $808FC1 if !FEATURE_PAL JMP $8824 else JMP $8814 endif } cutscenes_mb_fake_death_pause: { LDA $0FCC : BEQ .continue LDA #$0001 : STA $0FB2 .continue if !FEATURE_PAL LDA #$8839 else LDA #$8829 endif STA $0FA8 JMP ($0FA8) } cutscenes_mb_fake_death_lock: { LDA $0FCC : BEQ .continue LDA #$0001 : STA $0FB2 .continue LDA #cutscenes_mb_fake_death_music STA $0FA8 ; Fall through to next method } cutscenes_mb_fake_death_music: { DEC $0FB2 : BPL .return LDA #$0000 : JSL !MUSIC_ROUTINE LDA $7ED82D : BIT #$0002 : BEQ .phase2 LDA $7ED821 : BIT #$0040 : BEQ .phase3 LDA #$FF24 BRA .load_music .phase2 LDA #$FF21 BRA .load_music .phase3 LDA #$FF48 .load_music JSL !MUSIC_ROUTINE if !FEATURE_PAL LDA #$887C else LDA #$886C endif STA $0FA8 LDA #$000C : STA $0FB2 LDA $0FCC : BEQ .continue LDA #$0002 : STA $0FB2 .continue JMP ($0FA8) .return RTS } cutscenes_mb_fake_death_unlock: { LDA $0FCC : BEQ .continue LDA #$0001 : STA $0FB2 .continue if !FEATURE_PAL LDA #$8894 else LDA #$8884 endif STA $0FA8 JMP ($0FA8) } cutscenes_mb_clear_bottom_left_tube: { LDA $0FCC : BEQ .continue LDA #$0010 : STA $0FF2 .continue if !FEATURE_PAL LDA #$8993 else LDA #$8983 endif STA $0FF0 JMP ($0FF0) } cutscenes_mb_clear_ceiling_column_9: { LDA $0FCC : BEQ .continue LDA #$0010 : STA $0FF2 .continue if !FEATURE_PAL LDA #$89C5 else LDA #$89B5 endif STA $0FF0 JMP ($0FF0) } cutscenes_mb_clear_ceiling_column_6: { LDA $0FCC : BEQ .continue LDA #$0010 : STA $0FF2 .continue if !FEATURE_PAL LDA #$89F7 else LDA #$89E7 endif STA $0FF0 JMP ($0FF0) } cutscenes_mb_clear_bottom_right_tube: { LDA $0FCC : BEQ .continue LDA #$0010 : STA $0FF2 .continue if !FEATURE_PAL LDA #$8A1F else LDA #$8A0F endif STA $0FF0 JMP ($0FF0) } cutscenes_mb_clear_bottom_middle_left_tube: { LDA $0FCC : BEQ .continue LDA #$0010 : STA $0FF2 .continue if !FEATURE_PAL LDA #$8A47 else LDA #$8A37 endif STA $0FF0 JMP ($0FF0) } cutscenes_mb_clear_ceiling_column_7: { LDA $0FCC : BEQ .continue LDA #$0010 : STA $0FF2 .continue if !FEATURE_PAL LDA #$8A79 else LDA #$8A69 endif STA $0FF0 JMP ($0FF0) } cutscenes_mb_clear_ceiling_column_8: { LDA $0FCC : BEQ .continue LDA #$0010 : STA $0FF2 .continue if !FEATURE_PAL LDA #$8AAB else LDA #$8A9B endif STA $0FF0 JMP ($0FF0) } cutscenes_mb_fake_death_setup_mb_fight_or_escape: { LDA $7ED821 : BIT #$0040 : BEQ .mb ; Disable MB hitboxes LDA #$0000 : STA $7E7808 ; Jump to escape sequence if !FEATURE_PAL JMP $B1F8 else JMP $B1E8 endif .mb LDA $0FCC : BEQ .init_health LDA #$0000 : STA $0FB2 : STA $0FCC BRA .continue .init_health LDA #$4650 : STA $0FCC .continue if !FEATURE_PAL LDA #$8D89 else LDA #$8D79 endif STA $0FA8 JMP ($0FA8) } cutscenes_mb_fake_death_pause_phase_2: { LDA $0FCC : BNE .continue LDA #$0000 : STA $0FB2 .continue if !FEATURE_PAL LDA #$8D9B else LDA #$8D8B endif STA $0FA8 JMP ($0FA8) } cutscenes_mb_fake_death_load_tiles_phase_2: { LDA $0FCC : BNE .continue LDA #$0000 : STA $0FB2 .continue if !FEATURE_PAL LDA #$8DD3 else LDA #$8DC3 endif STA $0FA8 JMP ($0FA8) } cutscenes_mb_fake_death_raise_mb: { LDA $0FCC : BNE .continue LDA !FRAME_COUNTER : AND #$0001 : BNE .done if !FEATURE_PAL JMP $8E65 else JMP $8E55 endif .continue if !FEATURE_PAL LDA #$8E5D else LDA #$8E4D endif STA $0FA8 JMP ($0FA8) .done RTS } cutscenes_mb_choose_phase_2_or_3: { LDA $7ED82D : BIT #$0002 : BEQ .phase2 ; Phase 3 LDA #$0004 : STA $7E7800 ; 36000 health LDA #$8CA0 : STA $0FCC ; Enable health-based palette TDC : STA $7E7860 : STA $7E7868 INC : STA $7E7862 INC : STA $7E783E ; Allow Samus to stand up and enable hyper beam if !FEATURE_PAL LDA #$0017 : JSL $90F081 LDA #$0003 : JSL $91E412 JMP $C242 else LDA #$0017 : JSL $90F084 LDA #$0003 : JSL $91E4AD JMP $C1F5 endif .phase2 LDA #$0002 : STA $7E7800 ; 18000 health LDA #$4650 : STA $0FCC if !FEATURE_PAL JMP $8EE1 else JMP $8ED1 endif } cutscenes_mb_shaking_head: { LDA !sram_cutscenes : BIT !CUTSCENE_FAST_MB : BEQ .continue LDA #$000A : STA $0FB2 .continue if !FEATURE_PAL LDA #$8F05 else LDA #$8EF5 endif STA $0FA8 JMP ($0FA8) } cutscenes_mb_bring_head_back_up: { LDA !sram_cutscenes : BIT !CUTSCENE_FAST_MB : BEQ .continue LDA #$0060 : STA $0FB2 .continue if !FEATURE_PAL LDA #$8F24 else LDA #$8F14 endif STA $0FA8 JMP ($0FA8) } cutscenes_mb_death_move_to_back_of_room: { LDA !sram_cutscenes : BIT !CUTSCENE_FAST_MB : BEQ .continue LDA #$000A : STA $0FB2 .continue if !FEATURE_PAL LDA #$AF22 else LDA #$AF12 endif STA $0FA8 JMP ($0FA8) } cutscenes_mb_death_first_stumble: { LDA !sram_cutscenes : BIT !CUTSCENE_FAST_MB : BEQ .continue LDA #$000A : STA $0FB2 .continue if !FEATURE_PAL LDA #$AF64 else LDA #$AF54 endif STA $0FA8 JMP ($0FA8) } cutscenes_mb_death_final_explosions: { LDA !sram_cutscenes : BIT !CUTSCENE_FAST_MB : BEQ .continue LDA #$0000 : STA $0FB2 .continue if !FEATURE_PAL LDA #$B023 else LDA #$B013 endif STA $0FA8 JMP ($0FA8) } cutscenes_mb_death_brain_falling: { LDA !sram_cutscenes : BIT !CUTSCENE_FAST_MB : BEQ .continue LDA #cutscenes_mb_death_brain_falling_fast STA $0FA8 JMP ($0FA8) .continue if !FEATURE_PAL LDA #$B13D else LDA #$B12D endif STA $0FA8 JMP ($0FA8) } cutscenes_mb_death_brain_falling_fast: { ; Vanilla logic except add $40 instead of $20 LDA $0FB2 : CLC : ADC #$0040 : STA $0FB2 XBA : AND #$00FF : CLC : ADC $0FBE CMP #$00C4 : BCC .still_falling if !FEATURE_PAL JMP $B154 else JMP $B144 endif .still_falling STA $0FBE RTS } cutscenes_mb_death_load_corpse: { LDA !sram_cutscenes : BIT !CUTSCENE_FAST_MB : BEQ .continue LDA #$0000 : STA $0FB2 .continue if !FEATURE_PAL LDA #$B183 else LDA #$B173 endif STA $0FA8 JMP ($0FA8) } cutscenes_mb_death_corpse_tips_over: { LDA !sram_cutscenes : BIT !CUTSCENE_FAST_MB : BEQ .continue LDA #$0030 : STA $0FB2 .continue if !FEATURE_PAL LDA #$B1C8 else LDA #$B1B8 endif STA $0FA8 JMP ($0FA8) } print pc, " cutscenes MB end"
programs/oeis/017/A017184.asm
neoneye/loda
22
92042
<reponame>neoneye/loda<filename>programs/oeis/017/A017184.asm ; A017184: (9n+1)^12. ; 1,1000000000000,2213314919066161,232218265089212416,6582952005840035281,89762301673555234816,766217865410400390625,4722366482869645213696,22902048046490258711521,92420056270299898187776,322475487413604782665681 mul $0,9 add $0,1 pow $0,12