This is the mail archive of the binutils@sources.redhat.com mailing list for the binutils project.


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

Re: binutils patches for Cirrus/arm9e/maverick support


+ static void
+ do_c_quad (str, flags, mode)
+      char * str;
+      unsigned long flags;
+      int mode;
+ {
+   int shift1, shift2, shift3, shift4;
+   enum cirrus_regtype rt;
+ 
+   rt = (inst.instruction << 4 == 0xe2006000
+ 	|| inst.instruction << 4 == 0xe3006000) ? CIRRUS_REGTYPE_MVAX
+     : CIRRUS_REGTYPE_MVFX;

This (assuming '<< 4' will shift bits out of the top and drop them) is 
non-portable.  Much better to use a mask and let the compiler pick the 
best way to optimize it.

Also, is there somewhere I can find the documentation for the new 
instructions?  I can't see anything obvious on the Cirrus web pages and 
I'm trying to integrate your changes into my new parsing code.

R.


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