Browse Subversion Repository
Contents of /branches/mty-makai/tr64.h
Parent Directory
| Revision Log
Revision 148 -
( show annotations)
( download)
( as text)
Mon Apr 23 14:02:47 2007 UTC
(16 years, 11 months ago)
by notanpe
File MIME type: text/x-chdr
File size: 759 byte(s)
マージとFreeBSD&Solaris対応。
| 1 |
#ifndef TR64_H__ |
| 2 |
#define TR64_H__ |
| 3 |
|
| 4 |
#include "mtytypes.h" |
| 5 |
|
| 6 |
/* いろいろめんどくさいのでキャストして使え */ |
| 7 |
extern char transpose64[]; |
| 8 |
|
| 9 |
#ifdef USE_REGPARM |
| 10 |
|
| 11 |
typedef void __attribute__((regparm(3))) |
| 12 |
(*TR64_PP_T)(void *a, uint64_t *d, uint64_t const *s); |
| 13 |
#define CALL_TR64(s,d) (*(TR64_PP_T)transpose64)(code,d,s) |
| 14 |
|
| 15 |
#elif defined(__GNUC__) |
| 16 |
|
| 17 |
#define CALL_TR64(s,d) \ |
| 18 |
{int d_c, d_d; \ |
| 19 |
asm volatile("call *%2" \ |
| 20 |
: "=c"(d_c), "=d"(d_d) \ |
| 21 |
: "r"(transpose64), "0"(s), "1"(d) \ |
| 22 |
: "memory"); \ |
| 23 |
} |
| 24 |
|
| 25 |
#else /* USE_REGPARM */ |
| 26 |
|
| 27 |
typedef void (__fastcall *TR64_PP_T)(uint64_t const *s, uint64_t *d); |
| 28 |
#define CALL_TR64(s,d) (*(TR64_PP_T)transpose64)(s,d) |
| 29 |
|
| 30 |
#endif |
| 31 |
|
| 32 |
#endif /* TR64_H__ */ |
| 33 |
|
| 34 |
/* |
| 35 |
* Local Variables: |
| 36 |
* tab-width: 4 |
| 37 |
* End: |
| 38 |
* |
| 39 |
* EOF */ |
Properties
| svn:eol-style |
native
|
| svn:keywords |
Author Date Id Rev URL
|
| |