Skip to content

Commit

Permalink
aarch64_multibinary.h: Fix -Wasm-operand-widths
Browse files Browse the repository at this point in the history
Compilation gave warnings as per below. Arm64 is has a width of
64 bit and these warnings came up.

In file included from igzip/aarch64/igzip_multibinary_aarch64_dispatcher.c:29:
./include/aarch64_multibinary.h:338:35: warning: value size does not match register size specified by the constraint and modifier [-Wasm-operand-widths]
                asm("mrs %0, MIDR_EL1 " : "=r" (id));
                                                ^
./include/aarch64_multibinary.h:338:12: note: use constraint modifier "w"
                asm("mrs %0, MIDR_EL1 " : "=r" (id));
                         ^~
                         %w0
1 warning generated.
In file included from mem/aarch64/mem_aarch64_dispatcher.c:29:
./include/aarch64_multibinary.h:338:35: warning: value size does not match register size specified by the constraint and modifier [-Wasm-operand-widths]
                asm("mrs %0, MIDR_EL1 " : "=r" (id));
                                                ^
./include/aarch64_multibinary.h:338:12: note: use constraint modifier "w"
                asm("mrs %0, MIDR_EL1 " : "=r" (id));
                         ^~
                         %w0
1 warning generated.
  • Loading branch information
bsbernd committed Apr 25, 2024
1 parent 7b30857 commit 9757075
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion include/aarch64_multibinary.h
Original file line number Diff line number Diff line change
Expand Up @@ -331,7 +331,7 @@ static inline int sysctlEnabled(const char* name){
*/
static inline uint32_t get_micro_arch_id(void)
{
uint32_t id=CPU_IMPLEMENTER_RESERVE;
uint64_t id=CPU_IMPLEMENTER_RESERVE;
#ifndef __APPLE__
if ((getauxval(AT_HWCAP) & HWCAP_CPUID)) {
/** Here will trap into kernel space */
Expand Down

0 comments on commit 9757075

Please sign in to comment.