Talk About Network

Google


Register and Login
Nick
Password
Register create new account Sign up is FREE and you can post replies, new topics, bookmark posts and more!
Recover lost password


Programming > Ada > Re: Endian-prob...
Latest [ Topics | Posts ] Archive Post A New Topic Post a Reply
<< Topic < Post Post 4 of 5 Topic 5605 of 5828
Post > Topic >>

Re: Endian-problem/bug with system.bit_ops (gnat3.15)...

by Niklas Holsti <niklas.holsti@[EMAIL PROTECTED] > Mar 15, 2008 at 09:26 PM

Erik Baigar wrote:
> Niklas Holsti wrote:
> 
>>Did you have a question to ask, or did you just want to re****t 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 ****table 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 ****table 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
       .      @[EMAIL PROTECTED]
       .
 




 5 Posts in Topic:
Endian-problem/bug with system.bit_ops (gnat3.15)...
Erik Baigar <erik@[EMA  2008-03-15 08:58:12 
Re: Endian-problem/bug with system.bit_ops (gnat3.15)...
Niklas Holsti <niklas.  2008-03-15 14:22:36 
Re: Endian-problem/bug with system.bit_ops (gnat3.15)...
Erik Baigar <erik@[EMA  2008-03-15 19:53:00 
Re: Endian-problem/bug with system.bit_ops (gnat3.15)...
Niklas Holsti <niklas.  2008-03-15 21:26:22 
Re: Endian-problem/bug with system.bit_ops (gnat3.15)...
Erik Baigar <erik@[EMA  2008-03-15 20:45:16 

Post A Reply:
  Go here to Signup

AddThis Feed Button


About - Advertising - Contact - Frequently Asked Questions - Privacy Policy - Terms of Use - Signup

Contact
tan12V112 Thu Jul 24 14:45:14 CDT 2008.