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]
Other format: [Raw text]

Re: [patch] m68k: Use ASSEMBLER_DIALECT


Hi Roman,

I assigned option 0 to the Motorola syntax because the motorola syntax
adds characters to the MIT syntax.  This way, we can say

j{b}eq

Some time ago I posted a patch, which replaced all of these simply with jeq, but Jeff had some objections, which I still don't understand. The point here is that this has nothing to do with the official MOTOROLA syntax - both variants jeq and jbeq are assembler pseudo ops and the only supported assembler left is gas, so it would be far simpler and easier to support to clean this up properly and just use one of these pseudo ops.

OK. I'd like to take the path of least resistance. If Jeff objects to removing 'b' from "jbeq", I'd keep 'b', which my patch does.


   else
     {
       if (store_p)
-	return MOTOROLA ? "movm.l %1,%a0" : "moveml %1,%a0";
+	return "mov{m.|em}l %1,%a0";
       else
-	return MOTOROLA ? "movm.l %a0,%1" : "moveml %a0,%1";
+	return "mov{m.|em}l %a0,%1";
     }

Here I would suggest to just replace it with movem%.l, movm is not MOTOROLA syntax.

OK.


-	return MOTOROLA ? "lea (%1,%2.l),%0" : "lea %1@(0,%2:l),%0";
-      return MOTOROLA ? "lea (%c2,%1),%0" : "lea %1@(%c2),%0";
+	return "lea {(%1,%2.l)|%1@(0,%2:l)},%0";
+      return "lea {(%c2,%1)|%1@(%c2)},%0";
     }
   if (GET_CODE (operands[2]) == CONST_INT)
     {

These things should be cleaned up in the long term by splitting them and using a different pattern, so it's a simple "lea %1,%0" at some point.

Yeah, I'd like to see address expressions handled in a single place so that we don't have to bother syntax issues everywhere. Maybe I'll get to that after this patch.


Kazu Hirata


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