dont try to convert the pixfmt while calculating the "shade"
[AROS.git] / arch / m68k-all / kernel / issuper.S
blob2c09482aa04ea89f753b2956013ddad087d6d4ef
1 /*****************************************************************************
3     NAME
4 #include <proto/kernel.h>
6 AROS_LH0I(int, KrnIsSuper,
8     SYNOPSIS
10     LOCATION
11         struct KernelBase *, KernelBase, 13, Kernel)
13     FUNCTION
14         Determine if the caller is running in supervisor mode
16     INPUTS
17         None
19     RESULT
20         Nonzero for supervisor mode, zero for user mode
22     NOTES
23         Callers should only test the return value against zero.
24         Nonzero values may actually be different, since they
25         may carry some private implementation-dependent information
26         (like CPU privilege level, for example).
28     EXAMPLE
30     BUGS
32     SEE ALSO
34     INTERNALS
36 ******************************************************************************/
37         #include "aros/m68k/asm.h"
39         .text
40         .balign 4
41         .globl  AROS_SLIB_ENTRY(KrnIsSuper,Kernel,13)
43 AROS_SLIB_ENTRY(KrnIsSuper,Kernel,13):
44         movem.l %a5-%a6,%sp@-
45         move.l  SysBase,%a6
46         lea     1f,%a5
47         jsr     %a6@(Supervisor)
48         movem.l %sp@+,%a5-%a6
49         rts
51 1:      move.w  %sp@,%d0
52         and.l   #0x2000,%d0
53         rte