diff options
author | eban <eban@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2000-08-30 08:16:36 +0000 |
---|---|---|
committer | eban <eban@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2000-08-30 08:16:36 +0000 |
commit | 4e2edd1992f7dc775e430547cc4cec28f2bd1035 (patch) | |
tree | e65318b873fad386f44634cf154c4e680e61fe6f /ext | |
parent | 39bd792ab15fc0159ad9aa4e113f109609bf4bf2 (diff) | |
download | ruby-4e2edd1992f7dc775e430547cc4cec28f2bd1035.tar.gz ruby-4e2edd1992f7dc775e430547cc4cec28f2bd1035.tar.xz ruby-4e2edd1992f7dc775e430547cc4cec28f2bd1035.zip |
eban
git-svn-id: http://svn.ruby-lang.org/repos/ruby/trunk@915 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'ext')
-rw-r--r-- | ext/Win32API/Win32API.c | 31 |
1 files changed, 31 insertions, 0 deletions
diff --git a/ext/Win32API/Win32API.c b/ext/Win32API/Win32API.c index 6558e3827..dcfdd7caa 100644 --- a/ext/Win32API/Win32API.c +++ b/ext/Win32API/Win32API.c @@ -8,6 +8,17 @@ #include <stdio.h> #endif +#if defined(_MSC_VER) +#if defined(_M_ALPHA) +#ifdef __cplusplus +extern "C" { long __asm(char *,...); }; +#else +long __asm(char *,...); +#endif +#pragma intrinsic(__asm) +#endif +#endif + #define _T_VOID 0 #define _T_NUMBER 1 #define _T_POINTER 2 @@ -190,10 +201,20 @@ Win32API_Call(argc, argv, obj) case _T_INTEGER: lParam = NUM2ULONG(rb_ary_entry(args, i)); #if defined(_MSC_VER) || defined(__LCC__) +#if defined(_M_IX86) _asm { mov eax, lParam push eax } +#elif defined(_M_ALPHA) + __asm( + "ldl r0, 0(%0);" + "stq r0, -(sp);" + , lParam + ); +#else +#error +#endif #elif defined __GNUC__ asm volatile ("pushl %0" :: "g" (lParam)); #else @@ -212,10 +233,20 @@ Win32API_Call(argc, argv, obj) pParam = RSTRING(str)->ptr; } #if defined(_MSC_VER) || defined(__LCC__) +#if defined(_M_IX86) _asm { mov eax, pParam push eax } +#elif defined(_M_ALPHA) + __asm( + "ldl r0, 0(%0);" + "stq r0, -(sp);" + , pParam + ); +#else +#error +#endif #elif defined __GNUC__ asm volatile ("pushl %0" :: "g" (pParam)); #else |