Skip to content

add linux-headers/arch/arm64 since we only have x86 #312

Open
@vogler

Description

@vogler

On Apple M1 many regression tests fail due to the wrongly used x86 headers:

goblint/analyzer/linux-headers/arch/x86/include/asm/pvclock.h:56:2: error: #error implement me!
  -    56 | #error implement me!
  -       |  ^~~~~
  - Goblint: Preprocessing failed.

pvclock.h:

#ifdef __i386__
	__asm__ (
		"mul  %5       ; "
		"mov  %4,%%eax ; "
		"mov  %%edx,%4 ; "
		"mul  %5       ; "
		"xor  %5,%5    ; "
		"add  %4,%%eax ; "
		"adc  %5,%%edx ; "
		: "=A" (product), "=r" (tmp1), "=r" (tmp2)
		: "a" ((u32)delta), "1" ((u32)(delta >> 32)), "2" (mul_frac) );
#elif defined(__x86_64__)
	__asm__ (
		"mulq %[mul_frac] ; shrd $32, %[hi], %[lo]"
		: [lo]"=a"(product),
		  [hi]"=d"(tmp)
		: "0"(delta),
		  [mul_frac]"rm"((u64)mul_frac));
#else
#error implement me!
#endif

I think these headers are pretty old, maybe it's also a good idea to update them.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions