1
0
Fork 0
mirror of https://github.com/ruby/ruby.git synced 2022-11-09 12:17:21 -05:00
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@915 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
eban 2000-08-30 08:16:36 +00:00
parent db3e830f84
commit 5b3ed19660
2 changed files with 35 additions and 0 deletions

View file

@ -1,3 +1,7 @@
Wed Aug 30 17:09:14 2000 WATANABE Hirofumi <eban@os.rim.or.jp>
* ext/Win32API/Win32API.c (Win32API_initialize): AlphaNT support.
Wed Aug 30 14:19:07 2000 Yukihiro Matsumoto <matz@ruby-lang.org> Wed Aug 30 14:19:07 2000 Yukihiro Matsumoto <matz@ruby-lang.org>
* parse.y (node_assign): should support NODE_CVASGN2 too. * parse.y (node_assign): should support NODE_CVASGN2 too.

View file

@ -8,6 +8,17 @@
#include <stdio.h> #include <stdio.h>
#endif #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_VOID 0
#define _T_NUMBER 1 #define _T_NUMBER 1
#define _T_POINTER 2 #define _T_POINTER 2
@ -190,10 +201,20 @@ Win32API_Call(argc, argv, obj)
case _T_INTEGER: case _T_INTEGER:
lParam = NUM2ULONG(rb_ary_entry(args, i)); lParam = NUM2ULONG(rb_ary_entry(args, i));
#if defined(_MSC_VER) || defined(__LCC__) #if defined(_MSC_VER) || defined(__LCC__)
#if defined(_M_IX86)
_asm { _asm {
mov eax, lParam mov eax, lParam
push eax push eax
} }
#elif defined(_M_ALPHA)
__asm(
"ldl r0, 0(%0);"
"stq r0, -(sp);"
, lParam
);
#else
#error
#endif
#elif defined __GNUC__ #elif defined __GNUC__
asm volatile ("pushl %0" :: "g" (lParam)); asm volatile ("pushl %0" :: "g" (lParam));
#else #else
@ -212,10 +233,20 @@ Win32API_Call(argc, argv, obj)
pParam = RSTRING(str)->ptr; pParam = RSTRING(str)->ptr;
} }
#if defined(_MSC_VER) || defined(__LCC__) #if defined(_MSC_VER) || defined(__LCC__)
#if defined(_M_IX86)
_asm { _asm {
mov eax, pParam mov eax, pParam
push eax push eax
} }
#elif defined(_M_ALPHA)
__asm(
"ldl r0, 0(%0);"
"stq r0, -(sp);"
, pParam
);
#else
#error
#endif
#elif defined __GNUC__ #elif defined __GNUC__
asm volatile ("pushl %0" :: "g" (pParam)); asm volatile ("pushl %0" :: "g" (pParam));
#else #else