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: Translating...
Latest [ Topics | Posts ] Archive Post A New Topic Post a Reply
<< Topic < Post Post 14 of 15 Topic 313 of 328
Post > Topic >>

Re: Translating Basic Assembler to C?

by Michel Hack <hack@[EMAIL PROTECTED] > Oct 1, 2007 at 11:24 AM

On Oct 1, 2:50 pm, glen herrmannsfeldt <g...@[EMAIL PROTECTED]
> wrote:

>    AR R1,R2
>
> to R1 += R2;

Don't forget the condition code -- or you'll have trouble translating
conditional
branches (and a few other things).  In fact, proper CC handling is a
major headache,
except for certain well-behaved programs with single-entry single-exit
blocks of
code and no CC dependencies between blocks.   Depending on how the CC
is handled
(conservatively or aggressively for performance), one also has to
worry about the
difference between logical and arithmetic instructions (ALR vs AR);
indeed, the
C-level CC should probably have more than two bits to deal with this
effectively.

The real problem is control flow dependency -- in general, you may not
be able to
analyze control flow completely, so you may have to handle the CC
conservatively
more often than you'd like.

Michel.
 




 15 Posts in Topic:
Translating Basic Assembler to C?
Howard S Shubs <howard  2007-09-30 22:09:13 
Re: Translating Basic Assembler to C?
Roger S. <rogers_lists  2007-10-01 18:35:21 
Re: Translating Basic Assembler to C?
Arthur T. <arthur@[EMA  2007-10-01 10:54:39 
Re: Translating Basic Assembler to C?
"John W. Kennedy&quo  2007-10-01 23:12:58 
Re: Translating Basic Assembler to C?
ArarghMail710NOSPAM@[EMAI  2007-10-02 01:51:03 
Re: Translating Basic Assembler to C?
richgr@[EMAIL PROTECTED]   2007-10-02 15:37:03 
Re: Translating Basic Assembler to C?
ArarghMail710NOSPAM@[EMAI  2007-10-02 18:29:46 
Re: Translating Basic Assembler to C?
richgr@[EMAIL PROTECTED]   2007-10-02 23:54:43 
Re: Translating Basic Assembler to C?
ArarghMail710NOSPAM@[EMAI  2007-10-02 20:19:22 
Re: Translating Basic Assembler to C?
glen herrmannsfeldt <g  2007-10-02 12:25:01 
Re: Translating Basic Assembler to C?
"John W. Kennedy&quo  2007-10-02 23:24:46 
Re: Translating Basic Assembler to C?
Roger S. <rogers_lists  2007-10-03 00:14:00 
Re: Translating Basic Assembler to C?
glen herrmannsfeldt <g  2007-10-01 10:50:11 
Re: Translating Basic Assembler to C?
Michel Hack <hack@[EMA  2007-10-01 11:24:14 
Re: Translating Basic Assembler to C?
glen herrmannsfeldt <g  2007-10-01 14:15:24 

Post A Reply:
  Go here to Signup

AddThis Feed Button


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

Contact
tan12V112 Fri Jul 25 15:00:55 CDT 2008.