]>
Commit | Line | Data |
---|---|---|
289c5f86 JP |
1 | reverted: |
2 | --- include/iprt/cdefs.h (revision 57336) | |
3 | +++ include/iprt/cdefs.h (revision 57335) | |
4 | @@ -949,16 +949,13 @@ | |
5 | ||
6 | /** @def RTCALL | |
7 | * The standard calling convention for the Runtime interfaces. | |
8 | - * | |
9 | - * @remarks The regparm(0) in the X86/GNUC variant deals with -mregparm=x use in | |
10 | - * the linux kernel and potentially elsewhere (3rd party). | |
11 | */ | |
12 | #ifdef _MSC_VER | |
13 | +# define RTCALL __cdecl | |
14 | -# define RTCALL __cdecl | |
d2baf7d5 | 15 | #elif defined(RT_OS_OS2) |
289c5f86 JP |
16 | +# define RTCALL __cdecl |
17 | +#elif defined(__GNUC__) && defined(IN_RING0) && defined(RT_ARCH_X86) /** @todo consider dropping IN_RING0 here. */ | |
18 | +# define RTCALL __attribute__((cdecl,regparm(0))) /* regparm(0) deals with -mregparm=x use in the linux kernel. */ | |
19 | -# define RTCALL __cdecl | |
d2baf7d5 JP |
20 | -#elif defined(__GNUC__) && defined(RT_ARCH_X86) |
21 | -# define RTCALL __attribute__((cdecl,regparm(0))) | |
22 | #else | |
23 | # define RTCALL | |
24 | #endif | |
289c5f86 JP |
25 | @@ -1026,9 +1023,21 @@ |
26 | * @param type The return type of the function declaration. | |
27 | */ | |
28 | #ifdef __cplusplus | |
29 | +# if defined(_MSC_VER) || defined(RT_OS_OS2) | |
30 | +# define DECLASM(type) extern "C" type __cdecl | |
31 | +# elif defined(__GNUC__) && defined(RT_ARCH_X86) | |
32 | +# define DECLASM(type) extern "C" type __attribute__((cdecl,regparm(0))) | |
33 | +# else | |
34 | +# define DECLASM(type) extern "C" type | |
35 | +# endif | |
36 | -# define DECLASM(type) extern "C" type RTCALL | |
37 | #else | |
38 | +# if defined(_MSC_VER) || defined(RT_OS_OS2) | |
39 | +# define DECLASM(type) type __cdecl | |
40 | +# elif defined(__GNUC__) && defined(RT_ARCH_X86) | |
41 | +# define DECLASM(type) type __attribute__((cdecl,regparm(0))) | |
42 | +# else | |
43 | +# define DECLASM(type) type | |
44 | +# endif | |
45 | -# define DECLASM(type) type RTCALL | |
46 | #endif | |
47 | ||
48 | /** @def DECLASMTYPE | |
49 | @@ -1035,7 +1044,11 @@ | |
50 | * How to declare an internal assembly function type. | |
51 | * @param type The return type of the function. | |
52 | */ | |
53 | +# if defined(_MSC_VER) || defined(RT_OS_OS2) | |
54 | +# define DECLASMTYPE(type) type __cdecl | |
55 | +#else | |
56 | +# define DECLASMTYPE(type) type | |
57 | +#endif | |
58 | -#define DECLASMTYPE(type) type RTCALL | |
59 | ||
60 | /** @def DECLNORETURN | |
61 | * How to declare a function which does not return. | |
62 | reverted: | |
63 | --- src/VBox/VMM/VMMR3/PGMDbg.cpp (revision 57336) | |
64 | +++ src/VBox/VMM/VMMR3/PGMDbg.cpp (revision 57335) | |
65 | @@ -103,8 +103,15 @@ | |
66 | * @param cbNeedle Size of what we're searching for. | |
67 | */ | |
68 | ||
69 | +#if defined(_MSC_VER) || defined(RT_OS_OS2) | |
70 | +# define DECLASMCALLBACK(type) type __cdecl | |
71 | +#elif defined(__GNUC__) && defined(RT_ARCH_X86) | |
72 | +# define DECLASMCALLBACK(type) type __attribute__((cdecl,regparm(0))) | |
73 | +#else | |
74 | +# define DECLASMCALLBACK(type) type | |
75 | +#endif | |
76 | +typedef DECLASMCALLBACK(uint8_t const *) FNPGMR3DBGFIXEDMEMSCAN(void const *pvHaystack, uint32_t cbHaystack, | |
77 | + void const *pvNeedle, size_t cbNeedle); | |
78 | -typedef DECLCALLBACK(uint8_t const *) FNPGMR3DBGFIXEDMEMSCAN(void const *pvHaystack, uint32_t cbHaystack, | |
79 | - void const *pvNeedle, size_t cbNeedle); | |
80 | /** Pointer to an fixed size and step assembly scanner function. */ | |
81 | typedef FNPGMR3DBGFIXEDMEMSCAN *PFNPGMR3DBGFIXEDMEMSCAN; | |
82 |