]> git.ipfire.org Git - thirdparty/valgrind.git/commitdiff
Regtest: fix build of none crc32 x86 master
authorPaul Floyd <pjfloyd@wanadoo.fr>
Tue, 23 Jun 2026 06:55:37 +0000 (08:55 +0200)
committerPaul Floyd <pjfloyd@wanadoo.fr>
Tue, 23 Jun 2026 06:55:37 +0000 (08:55 +0200)
The 32bit opcode variant needs an explicit l suffix for clang.

The test is still failing due the the flags mask/printf.

With clang, in gdb jusrt before the crc32 opcode rthe flags are

eflags         0x200296            [ PF AF SF IF ID ]

but with gcc

eflags         0x200202            [ IF ID ]

AF and SF need to be masked. It seems to work without masking PF,
not sure why, need to look at that a bit more.

none/tests/x86/crc32.c

index f5e2a561e591d4f1f2e4a05c24dcf7a4eb5d6812..1bfcd26ef906618026b3e1850ddc4bb5d9ae3358 100644 (file)
@@ -313,7 +313,7 @@ void test_CRC32_U32_x86 ( void )
       __asm__ __volatile__(
          "movl %0,       %%eax"  "\n\t"
          "movl 4(%%eax), %%ecx"  "\n\t"
-         "crc32 0(%%eax), %%ecx"  "\n\t"
+         "crc32l 0(%%eax), %%ecx"  "\n\t"
          "movl %%ecx, 8(%%eax)"  "\n\t"
          "pushf"                 "\n\t"
          "popl %%edx"             "\n\t"