fujitsu / xbyak_aarch64

Apache License 2.0
186 stars 39 forks source link

application get isa info under el0 mode #57

Closed jitMatrix closed 3 years ago

jitMatrix commented 3 years ago

Hi, i encounter illegal instruction when using xbyak on Cortex-A57. It's mainly due to line https://github.com/fujitsu/xbyak_aarch64/blob/main/xbyak_aarch64/xbyak_aarch64_util.h#L68 for getting the isa info since the appliaction is running under el0 mode which has no privilege to read register. How can I get a walk around?

nSircombe commented 3 years ago

Hi @jitMatrix,

A similar issue was recently reported against oneDNN (see https://github.com/oneapi-src/oneDNN/issues/1025). A quick fix would be to manually set the HW features in the src. A more permanent solution might be to use getauxval(AT_HWCAP), as discussed on the oneDNN ticket.

jitMatrix commented 3 years ago

Thanks. It looks good:)

kawakami-k commented 3 years ago

Hi, @jitMatrix Thank you for the bug report. I'll fix the bug. Please wait a few days.

jitMatrix commented 3 years ago

@kawakami-k Thx.

kawakami-k commented 3 years ago

HI, @jitMatrix, @nSircombe

I'll fix the bug https://github.com/fujitsu/xbyak_aarch64/pull/58 It has been merged into the main branch.

Thank you for the report.

jitMatrix commented 3 years ago

I'll close the issue. Thanks for the fix.