--- /dev/null
+\r
+/*\r
+ * File: mcf5xxx.s\r
+ * Purpose: Lowest level routines for all ColdFire processors.\r
+ *\r
+ * Notes:\r
+ *\r
+ * Function copied from mcf5xxx.S provided by FreeScale.\r
+ */\r
+\r
+ .global french_cheese\r
+\r
+ .text\r
+\r
+/********************************************************************/\r
+/*\r
+ * This routines changes the IPL to the value passed into the routine.\r
+ * It also returns the old IPL value back.\r
+ * Calling convention from C:\r
+ * old_ipl = asm_set_ipl(new_ipl);\r
+ * For the Diab Data C compiler, it passes return value thru D0.\r
+ * Note that only the least significant three bits of the passed\r
+ * value are used.\r
+ */\r
+\r
+portSET_IPL:\r
+ link A6,#-8\r
+ movem.l D6-D7,(SP)\r
+\r
+ move.w SR,D7 /* current sr */\r
+\r
+ move.l D7,D0 /* prepare return value */\r
+ andi.l #0x0700,D0 /* mask out IPL */\r
+ lsr.l #8,D0 /* IPL */\r
+\r
+ move.l 8(A6),D6 /* get argument */\r
+ andi.l #0x07,D6 /* least significant three bits */\r
+ lsl.l #8,D6 /* move over to make mask */\r
+\r
+ andi.l #0x0000F8FF,D7 /* zero out current IPL */\r
+ or.l D6,D7 /* place new IPL in sr */\r
+ move.w D7,SR\r
+\r
+ movem.l (SP),D6-D7\r
+ lea 8(SP),SP\r
+ unlk A6\r
+ rts\r
+\r
+/********************************************************************/\r
+ .end\r
+\r
+\r