BB2 C port
API reference: Blitz libraries in C and the shared code
Loading...
Searching...
No Matches
intuition.h
Go to the documentation of this file.
1
/* The safe forms of <inline/intuition.h> for the libraries
2
(cmake/ndk-calls.cmake, libs/include/ndk/functions.list): the NDK's
3
macro, the register variable on a3 replaced by an operand in a register
4
gcc chooses, which "exg" swaps with a3 around the jsr. a3 is back
5
afterwards (the OS keeps d2-d7/a2-a6); 4 bytes per call, no stack, the
6
condition codes untouched (the NDK's own technique for a5). */
7
8
#define __AutoRequest_base(__in_base, ___window, ___body, ___posText, ___negText, ___pFlag, ___nFlag, ___width, ___height) ({\
9
struct Window * __p____window = (struct Window *)(___window);\
10
struct IntuiText * __p____body = (struct IntuiText *)(___body);\
11
struct IntuiText * __p____posText = (struct IntuiText *)(___posText);\
12
struct IntuiText * __p____negText = (struct IntuiText *)(___negText);\
13
ULONG __p____pFlag = (ULONG)(___pFlag);\
14
ULONG __p____nFlag = (ULONG)(___nFlag);\
15
UWORD __p____width = (UWORD)(___width);\
16
UWORD __p____height = (UWORD)(___height);\
17
register void * __p__in_base __asm("a6") = (void *)(__in_base);\
18
register BOOL __v_ret __asm("d0");\
19
register struct Window * __v0 __asm("a0") = __p____window;\
20
register struct IntuiText * __v1 __asm("a1") = __p____body;\
21
register struct IntuiText * __v2 __asm("a2") = __p____posText;\
22
register ULONG __v4 __asm("d0") = __p____pFlag;\
23
register ULONG __v5 __asm("d1") = __p____nFlag;\
24
register ULONG __v6 __asm("d2") = __p____width;\
25
register ULONG __v7 __asm("d3") = __p____height;\
26
__asm volatile (\
27
"exg %4,%/a3\n\tjsr %/a6@(-348:W)\n\texg %4,%/a3\n"\
28
: "=d"(__v_ret), "+a"(__v0), "+a"(__v1), "+d"(__v5), "+r"(__p____negText)\
29
: "a"(__p__in_base), "a"(__v2), "d"(__v4), "d"(__v6), "d"(__v7)\
30
: "fp0", "fp1", "cc", "memory" );\
31
__v_ret;})
32
33
#define __EasyRequestArgs_base(__in_base, ___window, ___easyStruct, ___idcmpPtr, ___args) ({\
34
struct Window * __p____window = (struct Window *)(___window);\
35
struct EasyStruct * __p____easyStruct = (struct EasyStruct *)(___easyStruct);\
36
ULONG * __p____idcmpPtr = (ULONG *)(___idcmpPtr);\
37
APTR __p____args = (APTR)(___args);\
38
register void * __p__in_base __asm("a6") = (void *)(__in_base);\
39
register LONG __v_ret __asm("d0");\
40
register struct Window * __v0 __asm("a0") = __p____window;\
41
register struct EasyStruct * __v1 __asm("a1") = __p____easyStruct;\
42
register ULONG * __v2 __asm("a2") = __p____idcmpPtr;\
43
__asm volatile (\
44
"exg %3,%/a3\n\tjsr %/a6@(-588:W)\n\texg %3,%/a3\n"\
45
: "=d"(__v_ret), "+a"(__v0), "+a"(__v1), "+r"(__p____args)\
46
: "a"(__p__in_base), "a"(__v2)\
47
: "fp0", "fp1", "cc", "memory", "d1" );\
48
__v_ret;})
libs
include
ndk
safe
intuition.h
Generated by
1.16.1