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 > Assembly 370 > Re: Which is be...
Latest [ Topics | Posts ] Archive Post A New Topic Post a Reply
<< Topic < Post Post 3 of 3 Topic 289 of 333
Post > Topic >>

Re: Which is better?

by Steve Myers <noone@[EMAIL PROTECTED] > Jan 15, 2007 at 04:20 PM

John W. Kennedy wrote:
[snip]
> 
> But unless you're writing a critical piece of kernel code, it's not 
> likely to matter.
> 
Oh, I agree.  This is actually an algorithm that I first wrote 20 years 
ago, or more, and which I decided to work on mainly for practice to use 
some of the newer instructions.  It may not ever be used in a production 
program, though some ideas may well wind up in production, or I may 
alter the two major production usages of the algorithm, though in one of 
them register usage is so tight the LM idea probably will not work.  In 
the sample program, the literals are actually about 512 bytes from the 
LM, and could easily be moved to less than 256 bytes, so they will 
almost certainly be paged in.

There is actually a fifth option.  Reg 2 is the base reg.  By using the 
LHI instructions, coupled with using the relative branch instructions 
that are already there, I do not have to set reg 2, and by changing the 
regs from 3 to 5 to 2 to 4, I do not have to save and restore a reg. 
This probably won't save anything, though, since if the save area is 
double word aligned, which is usually the case in my code, reg 4 is the 
first 4 bytes of a double word.
 




 3 Posts in Topic:
Which is better?
Steve Myers <noone@[EM  2007-01-14 22:04:03 
Re: Which is better?
"John W. Kennedy&quo  2007-01-15 15:43:02 
Re: Which is better?
Steve Myers <noone@[EM  2007-01-15 16:20:34 

Post A Reply:
  Go here to Signup

AddThis Feed Button


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

Contact
tan12V112 Sat Oct 11 18:22:34 CDT 2008.