diff options
author | David Schleef <ds@schleef.org> | 2005-07-20 18:20:35 +0000 |
---|---|---|
committer | David Schleef <ds@schleef.org> | 2005-07-20 18:20:35 +0000 |
commit | f3b6294743214374f0dd2b4be75deefb1369c351 (patch) | |
tree | b4a1e289aa93880798624aebf90b4950d4640f30 | |
parent | e8e98302bd96d3a6ff237433a239853446f170cd (diff) | |
download | liboil-f3b6294743214374f0dd2b4be75deefb1369c351.tar.gz |
* liboil/liboilprototype.c: (oil_arg_type_name): Implement.
* liboil/liboilfunction.c: (oil_class_optimize): Log what
implementation we chose.
* liboil/liboildebug.h: (OIL_FUNCTION): Make sure we get
PRETTY_FUNCTION with gcc.
-rw-r--r-- | ChangeLog | 10 | ||||
-rw-r--r-- | liboil/liboildebug.h | 2 | ||||
-rw-r--r-- | liboil/liboilfunction.c | 2 | ||||
-rw-r--r-- | liboil/liboilprototype.c | 45 |
4 files changed, 57 insertions, 2 deletions
@@ -1,3 +1,13 @@ +2005-07-20 Andy Wingo <wingo@pobox.com> + + * liboil/liboilprototype.c: (oil_arg_type_name): Implement. + + * liboil/liboilfunction.c: (oil_class_optimize): Log what + implementation we chose. + + * liboil/liboildebug.h: (OIL_FUNCTION): Make sure we get + PRETTY_FUNCTION with gcc. + 2005-06-18 David Schleef <ds@schleef.org> * configure.ac: add compiler flag for powerpc diff --git a/liboil/liboildebug.h b/liboil/liboildebug.h index 6481a13..59cc30e 100644 --- a/liboil/liboildebug.h +++ b/liboil/liboildebug.h @@ -48,7 +48,7 @@ typedef enum { #define OIL_DEBUG(...) OIL_DEBUG_PRINT(OIL_DEBUG_DEBUG, __VA_ARGS__) #define OIL_LOG(...) OIL_DEBUG_PRINT(OIL_DEBUG_LOG, __VA_ARGS__) -#ifdef __PRETTY_FUNCTION__ +#if defined (__GNUC__) || defined (__PRETTY_FUNCTION__) #define OIL_FUNCTION __PRETTY_FUNCTION__ #elif defined(__func__) #define OIL_FUNCTION __func__ diff --git a/liboil/liboilfunction.c b/liboil/liboilfunction.c index 966ea6f..68b0bcb 100644 --- a/liboil/liboilfunction.c +++ b/liboil/liboilfunction.c @@ -290,6 +290,8 @@ oil_class_optimize (OilFunctionClass * klass) klass->name); return; } + + OIL_DEBUG("chose implementation %s", min_impl->name); klass->chosen_impl = min_impl; klass->func = min_impl->func; diff --git a/liboil/liboilprototype.c b/liboil/liboilprototype.c index 0a61400..a694ad3 100644 --- a/liboil/liboilprototype.c +++ b/liboil/liboilprototype.c @@ -401,7 +401,50 @@ static OilType oil_type_from_string (const char *s, int ptr) const char * oil_arg_type_name (OilArgType type) { - return "FIXME"; + switch (type) { + case OIL_ARG_N: + return "n"; + case OIL_ARG_M: + return "m"; + case OIL_ARG_DEST1: + return "dest1"; + case OIL_ARG_DSTR1: + return "dstr1"; + case OIL_ARG_DEST2: + return "dest2"; + case OIL_ARG_DSTR2: + return "dstr2"; + case OIL_ARG_SRC1: + return "src1"; + case OIL_ARG_SSTR1: + return "sstr1"; + case OIL_ARG_SRC2: + return "src2"; + case OIL_ARG_SSTR2: + return "sstr2"; + case OIL_ARG_SRC3: + return "src3"; + case OIL_ARG_SSTR3: + return "sstr3"; + case OIL_ARG_SRC4: + return "src4"; + case OIL_ARG_SSTR4: + return "sstr4"; + case OIL_ARG_SRC5: + return "src5"; + case OIL_ARG_SSTR5: + return "sstr5"; + case OIL_ARG_INPLACE1: + return "inplace1"; + case OIL_ARG_ISTR1: + return "istr1"; + case OIL_ARG_INPLACE2: + return "inplace2"; + case OIL_ARG_ISTR2: + return "istr2"; + default: + return "INVALID"; + } } static const |