comp.lang.ada
 help / color / mirror / Atom feed
From: "Martin Dowie" <martin.dowie@gecm.com>
Subject: Re: Green Hiils AdaMULTI 2000 -> Motorola Coldfire
Date: Thu, 11 Jan 2001 14:22:37 -0000
Date: 2001-01-11T14:22:37+00:00	[thread overview]
Message-ID: <3a5dc033$1@pull.gecm.com> (raw)
In-Reply-To: 3A5DBD1E.D4C4C5F7@averstar.com

I don't have access to the new code - but the same report then gives
an example of what they did do (at the time) to workaround this. They
may have changed this again since then of course...

Do you really want to see it?.. I've put it 'off screen' to protect young
children

If you're at all skeamish them turn away now!..

Tucker Taft <stt@averstar.com> wrote in message
news:3A5DBD1E.D4C4C5F7@averstar.com...
> pragma Atomic would presumably solve this problem in Ada 95.


|
|
v


|
|
v

with System.Storage_Elements;
with Unchecked_Conversion;

procedure test is

  type Rec_Type is
    record
      a : INTEGER range 0..255 := 0;
      b : BOOLEAN := FALSE ;
      c : BOOLEAN := FALSE ;
      d : BOOLEAN ;
      e : BOOLEAN ;
      f : BOOLEAN ;
      g : BOOLEAN ;
      h : BOOLEAN ;
      i : BOOLEAN ;
    end record;

  for Rec use record
      a at 0 range  0.. 7;
      b at 0 range  8.. 8;
      c at 0 range  9.. 9;
      d at 0 range 10..10;
      e at 0 range 11..11;
      f  at 0 range 12..12;
      g at 0 range 13..13;
      h at 0 range 14..14;
      i at 0 range 15..15;
    end record;

  pragma Volatile (Rec);

  Rec_Copy : array (0 .. 2) of Rec ;

  Rec_Copy_Int : array (0..2) of Short_Integer;
  for Rec_Copy_Int use at System.Storage_Elements.To_Address
(16#0009_FF3C#);

  function Rec_To_Short is new Unchecked_Conversion (Rec, Short_Integer);

begin
   Rec_Copy (1).e := FALSE;
   Rec_Copy_Int (1) := Rec_To_Short (Rec_Copy (1));
end;






  reply	other threads:[~2001-01-11 14:22 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2001-01-10 20:26 Green Hiils AdaMULTI 2000 -> Motorola Coldfire Mark Fisher
2001-01-11  8:56 ` Martin Dowie
2001-01-11 14:03   ` Tucker Taft
2001-01-11 14:22     ` Martin Dowie [this message]
2001-01-11 20:47       ` Larry Kilgallen
2001-01-11 14:44 ` Brian Courtney
2001-01-11 20:51   ` Robert Dewar
2001-01-12 13:18   ` Marc A. Criley
2001-01-12 17:44     ` Robert Dewar
replies disabled

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox