home *** CD-ROM | disk | FTP | other *** search
/ Solo Programadores 22 / SOLO_22.iso / packages / win32ada / data.z / stdarg-machine.ads < prev    next >
Encoding:
Text File  |  1995-11-17  |  3.3 KB  |  89 lines

  1. -- $Source: /home/harp/1/proto/monoBANK/xbind/stdarg-machine.ads,v $ 
  2. -- $Revision: 1.5 $ $Date: 95/06/21 13:06:04 $ $Author: mg $ 
  3.  
  4. with Interfaces.C;
  5.  
  6. package Stdarg.Machine is
  7.     -- **********************************************************
  8.     -- This package describes the differences in machine 
  9.     -- architectures that need to be known by Stdarg.
  10.     --
  11.     -- I386 is Intel 386/486/Pentium PC's
  12.     -- Sparc is Sun-4 Sparcstation and Sparcserver 
  13.     -- HP is Hewlett-Packard HP-9000 series 700 and 800
  14.     -- Mips is machines based on the MIPS chip, such as SGI
  15.     -- PowerPC is Apple-IBM-Motorola Power PC, and IBM RS/6000
  16.     -- Alpha is the Digital Equipment Corporation chip.
  17.     -- 
  18.     -- To build these packages for a different architecture,
  19.     -- change the constant This_Arch to one of the allowed values
  20.     -- and recompile.
  21.     -- **********************************************************
  22.     type Arch is (I386, Sparc, HP, Mips, Alpha, PowerPC);
  23.  
  24.     This_Arch: constant Arch := I386;
  25.  
  26.     type Stack_Growth_Direction is (
  27.     Up,                          -- toward address 0
  28.     Down);                       -- toward high numbered addresses
  29.  
  30.     type Arch_Description_Rec is record
  31.     Int_Param_Alignment,
  32.     Float_Param_Alignment: Positive; 
  33.     Stack_Growth: Stack_Growth_Direction;
  34.     end record;
  35.  
  36.     SU: constant := System.Storage_Unit;
  37.  
  38.     Arch_Description: constant array (Arch) of Arch_Description_Rec := (
  39.     I386 => (
  40.         Int_Param_Alignment   => C_Param'Size/SU,
  41.         Float_Param_Alignment => C_Param'Size/SU,
  42.         Stack_Growth          => Up)
  43.     , Sparc => (
  44.         Int_Param_Alignment   => C_Param'Size/SU,
  45.         Float_Param_Alignment => C_Param'Size/SU,
  46.         Stack_Growth          => Up)
  47.     , HP => (
  48.         Int_Param_Alignment   => C_Param'Size/SU,
  49.         Float_Param_Alignment => Interfaces.C.Double'Size/SU,
  50.         Stack_Growth          => Down)
  51.     , Mips => (
  52.         Int_Param_Alignment   => C_Param'Size/SU,
  53.         Float_Param_Alignment => Interfaces.C.Double'Size/SU,
  54.         Stack_Growth          => Up)
  55.     , Alpha => (
  56.         Int_Param_Alignment   => C_Param'Size/SU,
  57.         Float_Param_Alignment => Interfaces.C.Double'Size/SU,
  58.         Stack_Growth          => Up)
  59.     , PowerPC => (
  60.         Int_Param_Alignment   => C_Param'Size/SU,
  61.         Float_Param_Alignment => C_Param'Size/SU,
  62.         Stack_Growth          => Up)
  63.     );
  64.  
  65.  
  66.     Desc                 : Arch_Description_Rec renames 
  67.                Arch_Description(This_Arch);
  68.     Int_Param_Alignment  : Positive renames Desc.Int_Param_Alignment;
  69.     Float_Param_Alignment: Positive renames Desc.Float_Param_Alignment;
  70.     Stack_Growth         : Stack_Growth_Direction renames Desc.Stack_Growth;
  71.     Param_Size           : constant Positive := C_Param'Size/SU;
  72.  
  73. -------------------------------------------------------------------------------
  74. --
  75. -- THIS FILE AND ANY ASSOCIATED DOCUMENTATION IS FURNISHED "AS IS" WITHOUT 
  76. -- WARRANTY OF ANY KIND, EITHER EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED 
  77. -- TO THE IMPLIED WARRANTIES OF MERCHANTABILITY AND/OR FITNESS FOR A PARTICULAR 
  78. -- PURPOSE.  The user assumes the entire risk as to the accuracy and the 
  79. -- use of this file.
  80. --
  81. -- Copyright (c) Intermetrics, Inc. 1995
  82. -- Royalty-free, unlimited, worldwide, non-exclusive use, modification, 
  83. -- reproduction and further distribution of this file is permitted.
  84. --
  85. -------------------------------------------------------------------------------
  86.  
  87.  
  88. end Stdarg.Machine;
  89.