Skip to content

Commit dbaf284

Browse files
bsberndpablodelara
authored andcommitted
aarch64_multibinary.h: Fix -Wasm-operand-widths
Compilation with clang 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. Signed-off-by: Bernd Schubert <[email protected]>
1 parent 4e898ec commit dbaf284

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

include/aarch64_multibinary.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -331,7 +331,7 @@ static inline int sysctlEnabled(const char* name){
331331
*/
332332
static inline uint32_t get_micro_arch_id(void)
333333
{
334-
uint32_t id=CPU_IMPLEMENTER_RESERVE;
334+
uint64_t id=CPU_IMPLEMENTER_RESERVE;
335335
#ifndef __APPLE__
336336
if ((getauxval(AT_HWCAP) & HWCAP_CPUID)) {
337337
/** Here will trap into kernel space */

0 commit comments

Comments
 (0)