4 * Purpose: Lowest level routines for all ColdFire processors.
\r
8 * Function copied from mcf5xxx.S provided by FreeScale.
\r
11 .global ulPortSetIPL
\r
15 /********************************************************************/
\r
17 * This routines changes the IPL to the value passed into the routine.
\r
18 * It also returns the old IPL value back.
\r
19 * Calling convention from C:
\r
20 * old_ipl = asm_set_ipl(new_ipl);
\r
21 * For the Diab Data C compiler, it passes return value thru D0.
\r
22 * Note that only the least significant three bits of the passed
\r
30 move.w SR,D7 /* current sr */
\r
32 move.l D7,D0 /* prepare return value */
\r
33 andi.l #0x0700,D0 /* mask out IPL */
\r
34 lsr.l #8,D0 /* IPL */
\r
36 move.l 8(A6),D6 /* get argument */
\r
37 andi.l #0x07,D6 /* least significant three bits */
\r
38 lsl.l #8,D6 /* move over to make mask */
\r
40 andi.l #0x0000F8FF,D7 /* zero out current IPL */
\r
41 or.l D6,D7 /* place new IPL in sr */
\r
49 /********************************************************************/
\r