This is the mail archive of the 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: Fix to mn10300 cmpsi pattern

On Mar 27, 2001, Matt Hiller <> wrote:

> On 27 Mar 2001, Alexandre Oliva wrote:
>> >> These are privileged instructions.  You can't use them in user mode.
>> >> How about `btst 0,%0'?
>> > 	Yes. That'd be better on the basis of number of instructions
>> > alone, even if ors and ands to the psw weren't privileged. Okay to commit?
>> Yep.  Thanks for taking care of this problem!

> The testsuite caught an error in doing things that way: btst only
> works with data registers

On AM30, yes, indeed.

> but %0 could be an address or extended register.  How about btst
> 0,d0 instead?

Should be fine, with some comments explaining why it sets the flags
correctly and why the actual register doesn't matter.  Using a data
register will in fact generate smaller code than using the
extended-register version of btst introduced in AM33.

Alexandre Oliva   Enjoy Guarana', see
Red Hat GCC Developer                  aoliva@{,}
CS PhD student at IC-Unicamp        oliva@{,}
Free Software Evangelist    *Please* write to mailing lists, not to me

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