//   Copyright Naoki Shibata and contributors 2010 - 2025.
// Distributed under the Boost Software License, Version 1.0.
//    (See accompanying file LICENSE.txt or copy at
//          http://www.boost.org/LICENSE_1_0.txt)

#include <stdint.h>
#include <assert.h>
#include <signal.h>
#include <setjmp.h>
#include <sys/auxv.h>

#include "misc.h"

#define SLEEF_IMPORT_IS_EXPORT
#include "sleef.h"

#include "dispatcher.h"

static int cpuSupportsVXE2() {
  static int ret = -1;
  if (ret == -1)
    ret = !!(getauxval(AT_HWCAP) & HWCAP_S390_VXRS_EXT2);
  return ret;
}

#ifdef ENABLE_VXE2
#define SUBST_IF_EXT1(funcvxe2) if (cpuSupportsVXE2()) p = funcvxe2;
#else
#define SUBST_IF_EXT1(funcvxe2)
#endif

#define SUBST_IF_EXT2(funcExt2)

//

