herumi / xbyak

A JIT assembler for x86/x64 architectures supporting MMX, SSE (1-4), AVX (1-2, 512), FPU, APX, and AVX10.2
BSD 3-Clause "New" or "Revised" License
2.05k stars 278 forks source link

Build failure with XBYAK_NO_EXCEPTION #147

Closed nivas-x86 closed 2 years ago

nivas-x86 commented 2 years ago

First of all, thanks for quickly extending the Cpu data structure to 128bits.

But it seems the commit 095ebbf broke the build with XBYAK_NO_EXCEPTION.

Example: Below build runs fine on 3ea8e45 make -C sample profiler CXXFLAGS='-DXBYAK_NO_EXCEPTION=1 ' But fails with below error on 095ebbf

In file included from ../xbyak/xbyak_util.h:21:0,
                 from profiler.cpp:9:
../xbyak/xbyak_util.h: In member function ‘unsigned int Xbyak::util::local::CpuT<dummy>::getNumCores(Xbyak::util::IntelCpuTopologyLevel) const’:
../xbyak/xbyak.h:299:35: error: ‘SetError’ is not a member of ‘Xbyak::util::local’
 #define XBYAK_THROW_RET(err, r) { local::SetError(err); return r; }
                                   ^
../xbyak/xbyak_util.h:295:27: note: in expansion of macro ‘XBYAK_THROW_RET’
   if (!x2APIC_supported_) XBYAK_THROW_RET(ERR_X2APIC_IS_NOT_SUPPORTED, 0)
                           ^
../xbyak/xbyak.h:299:35: note: suggested alternative:
 #define XBYAK_THROW_RET(err, r) { local::SetError(err); return r; }
                                   ^
../xbyak/xbyak_util.h:295:27: note: in expansion of macro ‘XBYAK_THROW_RET’
   if (!x2APIC_supported_) XBYAK_THROW_RET(ERR_X2APIC_IS_NOT_SUPPORTED, 0)
                           ^
../xbyak/xbyak.h:286:13: note:   ‘Xbyak::local::SetError’
 inline void SetError(int err) {
             ^
herumi commented 2 years ago

Thank you for the report. I've fixed it at v6.051.

nivas-x86 commented 2 years ago

Thanks for the fix.