From: Niklas Holsti <niklas.holsti@tidorum.invalid>
Subject: Re: Endian-problem/bug with system.bit_ops (gnat3.15)...
Date: Sat, 15 Mar 2008 21:26:22 +0200
Date: 2008-03-15T21:26:22+02:00 [thread overview]
Message-ID: <47dc22a4$0$8166$4f793bc4@news.tdc.fi> (raw)
In-Reply-To: <47DC1B0B.A4976DBB@baigar.de>
Erik Baigar wrote:
> Niklas Holsti wrote:
>
>>Did you have a question to ask, or did you just want to report this
>>problem and your solution?
>
> Since the problem is solved by including all 32bits the posting is
> not really a question - maybe the posting will give someone else,
> encountering the same problem, a hint what to look out for...
Ok, good. (I meant no criticism, I just wondered if, or how, I
could help.)
>>I think that your program could be made more portable by avoiding
>>'Address (and, of course, System.Bit_Ops) and using instead modular
>>types (not available in Ada83) and their predefined bitwise "and"
>>and "or" operations.
>
> Do you have an estimation on performance? The current code
> is quite fast in emulating the vintage processor (more than
> 3.5MIPS in the simulation) using the non portable System.Bit_Ops...
As I understand it, and have observed in some programs and some
targets, a bitwise operation (and, or, xor, not) on modular types
with a power-of-two modulus translates directly into the
corresponding machine instruction. I expect such modular types to
be as fast as System.Bit_Ops, even if the operations in
System.Bit_Ops are intrinsic or inlined.
--
Niklas Holsti
Tidorum Ltd
niklas holsti tidorum fi
. @ .
next prev parent reply other threads:[~2008-03-15 19:26 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-03-15 7:58 Endian-problem/bug with system.bit_ops (gnat3.15) Erik Baigar
2008-03-15 12:22 ` Niklas Holsti
2008-03-15 18:53 ` Erik Baigar
2008-03-15 19:26 ` Niklas Holsti [this message]
2008-03-15 19:45 ` Erik Baigar
replies disabled
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox