S390: Refactor gconv_simple ifunc handling.
The ifunc handling for various __gconv_transform_* functions which are using IFUNC on s390x are adjusted in order to omit ifunc if the minimum architecture level already supports newer CPUs by default. Instead those functions are just an alias to the vector variants. Furthermore the ifunc-macro s390_libc_ifunc_expr is now used instead of s390_vx_libc_ifunc. ChangeLog: * sysdeps/s390/multiarch/gconv_simple.c (ICONV_VX_IFUNC): Define macro dependent on HAVE_S390_MIN_Z13_ZARCH_ASM_SUPPORT.
This commit is contained in:
parent
25654a8c74
commit
12f0dcb8da
@ -1,3 +1,8 @@
|
|||||||
|
2018-12-18 Stefan Liebler <stli@linux.ibm.com>
|
||||||
|
|
||||||
|
* sysdeps/s390/multiarch/gconv_simple.c (ICONV_VX_IFUNC):
|
||||||
|
Define macro dependent on HAVE_S390_MIN_Z13_ZARCH_ASM_SUPPORT.
|
||||||
|
|
||||||
2018-12-18 Stefan Liebler <stli@linux.ibm.com>
|
2018-12-18 Stefan Liebler <stli@linux.ibm.com>
|
||||||
|
|
||||||
* sysdeps/s390/multiarch/Makefile
|
* sysdeps/s390/multiarch/Makefile
|
||||||
|
@ -27,17 +27,18 @@
|
|||||||
|
|
||||||
# define ICONV_C_NAME(NAME) __##NAME##_c
|
# define ICONV_C_NAME(NAME) __##NAME##_c
|
||||||
# define ICONV_VX_NAME(NAME) __##NAME##_vx
|
# define ICONV_VX_NAME(NAME) __##NAME##_vx
|
||||||
# define ICONV_VX_IFUNC(FUNC) \
|
# ifdef HAVE_S390_MIN_Z13_ZARCH_ASM_SUPPORT
|
||||||
extern __typeof (ICONV_C_NAME (FUNC)) __##FUNC; \
|
/* We support z13 instructions by default -> Just use the vector variant. */
|
||||||
s390_vx_libc_ifunc (__##FUNC) \
|
# define ICONV_VX_IFUNC(FUNC) strong_alias (ICONV_VX_NAME (FUNC), FUNC)
|
||||||
int FUNC (struct __gconv_step *step, struct __gconv_step_data *data, \
|
# else
|
||||||
const unsigned char **inptrp, const unsigned char *inend, \
|
/* We have to use ifunc to determine if z13 instructions are supported. */
|
||||||
unsigned char **outbufstart, size_t *irreversible, \
|
# define ICONV_VX_IFUNC(FUNC) \
|
||||||
int do_flush, int consume_incomplete) \
|
s390_libc_ifunc_expr (ICONV_C_NAME (FUNC), FUNC, \
|
||||||
{ \
|
(hwcap & HWCAP_S390_VX) \
|
||||||
return __##FUNC (step, data, inptrp, inend,outbufstart, \
|
? ICONV_VX_NAME (FUNC) \
|
||||||
irreversible, do_flush, consume_incomplete); \
|
: ICONV_C_NAME (FUNC) \
|
||||||
}
|
)
|
||||||
|
# endif
|
||||||
# define ICONV_VX_SINGLE(NAME) \
|
# define ICONV_VX_SINGLE(NAME) \
|
||||||
static __typeof (NAME##_single) __##NAME##_vx_single __attribute__((alias(#NAME "_single")));
|
static __typeof (NAME##_single) __##NAME##_vx_single __attribute__((alias(#NAME "_single")));
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user