This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

Re: AM33: enable inc4 for data registers...



  In message <or66t95qu8.fsf@zecarneiro.lsd.ic.unicamp.br>you write:
  > --=-=-=
  > 
  > On Apr 23, 2000, Alexandre Oliva <aoliva@cygnus.com> wrote:
  > 
  > > On Apr 22, 2000, Jeffrey A Law <law@cygnus.com> wrote:
  > >> "inc4" on a data register is always 3 bytes long whereas using an "add"
  > >> instruction to perform the same operation is only 2 bytes long.
  > 
  > > Good point.  Nevertheless, it's still important to separate the case
  > > of `x' from the case of `a', because `inc4 a[0-3]' won't modify CC
  > > whereas `inc4 r[0-7]' will.  I'll post a patch to correct this later
  > > on.
  > 
  > Here's the patch.  Ok to install?'
Really?

According to my manual "inc4" never modifies the condition code, regardless
of what register is incremented.  Is it possible you're confusing "inc4" 
with "inc"?  "inc" will modify the condition codes in some cases.

My manual may be older than yours and thus may be incorrect.  I would
recommend you double check your manual and be 100% sure before making
this change.  If indeed your manual indicates that "inc4" can modify
the condition codes in some cases, then consider your patch approved.

Note the simulator's behavior probably matches my manual and would 
likely need updating too.

jeff


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]