Atomic load/store must explicit define alignment.

This commit is contained in:
Siu Kwan Lam 2012-08-03 14:13:22 -07:00
commit 5e15b27909
6 changed files with 78 additions and 14 deletions

View file

@ -695,6 +695,31 @@ _w ## func (PyObject *self, PyObject *args) \
}
/**
* Wrap LLVM functions of the type
* outtype func(intype1 arg1, intype2 arg2, <unsigned/signed int> arg3, const char *arg4, <unsigned/signed int> arg5)
*/
#define _wrap_objobjintstrint2obj(func, intype1, intype2, outtype)\
static PyObject * \
_w ## func (PyObject *self, PyObject *args) \
{ \
PyObject *obj1, *obj2; \
intype1 arg1; \
intype2 arg2; \
int arg3; \
const char *arg4; \
int arg5; \
\
if (!PyArg_ParseTuple(args, "OOisi", &obj1, &obj2, &arg3, &arg4, &arg5)) \
return NULL; \
\
arg1 = ( intype1 ) PyCapsule_GetPointer(obj1, NULL); \
arg2 = ( intype2 ) PyCapsule_GetPointer(obj2, NULL); \
\
return ctor_ ## outtype ( func (arg1, arg2, arg3, arg4, arg5)); \
}
/**
* Wrap LLVM functions of the type
* outtype func(intype1 arg1, const char *arg2, <unsigned/signed int> arg3)
@ -743,6 +768,34 @@ _w ## func (PyObject *self, PyObject *args) \
}
/**
* Wrap LLVM functions of the type
* outtype func(intype1 arg1, intype2 arg2, intype3, <unsigned/signed int> arg4, const char *arg5, <unsigned/signed int> arg6)
*/
#define _wrap_objobjobjintstrint2obj(func, intype1, intype2, intype3, outtype)\
static PyObject * \
_w ## func (PyObject *self, PyObject *args) \
{ \
PyObject *obj1, *obj2, *obj3; \
intype1 arg1; \
intype2 arg2; \
intype3 arg3; \
int arg4; \
const char *arg5; \
int arg6; \
\
if (!PyArg_ParseTuple(args, "OOOisi", &obj1, &obj2, &obj3, &arg4, &arg5, &arg6)) \
return NULL; \
\
arg1 = ( intype1 ) PyCapsule_GetPointer(obj1, NULL); \
arg2 = ( intype2 ) PyCapsule_GetPointer(obj2, NULL); \
arg3 = ( intype3 ) PyCapsule_GetPointer(obj3, NULL); \
\
return ctor_ ## outtype ( func (arg1, arg2, arg3, arg4, arg5, arg6)); \
}
/**
* Wrap LLVM functions of the type
* outtype func(intype1 arg1, intype2 arg2, intype3 arg3, intype4, const char *arg5, <unsigned/signed int> arg6)
@ -770,6 +823,7 @@ _w ## func (PyObject *self, PyObject *args) \
return ctor_ ## outtype ( func (arg1, arg2, arg3, arg4, arg5, arg6)); \
}
/**
* Wrap LLVM functions of the type
* outtype func(intype1 arg1, const char* arg2, intype3 arg3, intype4, const char *arg5, <unsigned/signed int> arg6)