Skip to content
This repository was archived by the owner on Mar 1, 2024. It is now read-only.
This repository was archived by the owner on Mar 1, 2024. It is now read-only.

Clang is incompatible with deflate_quick asm #6

Closed
@mp15

Description

@mp15

Clang (masquerading as gcc on OS X) doesn't like your assembler syntax for some reason. From what I understand it may be related to this http://llvm.org/bugs/show_bug.cgi?id=7459#c5 where clang is being stricter about certain assumptions than gas.

gcc -O3  -DHAVE_HIDDEN -DX86_64 -DUNALIGNED_OK -DADLER32_UNROLL_LESS -DCRC32_UNROLL_LESS -UCHECK_SSE2 -DHAVE_SSE2 -DUSE_SSE4_2_CRC_HASH -DHAVE_PCLMULQDQ -DUSE_QUICK -DUSE_MEDIUM -msse4 -I. -c -o deflate_quick.o deflate_quick.c
deflate_quick.c:46:27: error: invalid instruction mnemonic 'movzxw'
        "jb         loop\n\t"
                          ^
<inline asm>:12:2: note: instantiated into assembly here
        movzxw     (%rsi, %rbx), %rax
        ^~~~~~
deflate_quick.c:48:50: error: invalid operand for instruction
        "movzxw     (%[src0], %[result]), %[ax]\n\t"
                                                 ^
<inline asm>:13:28: note: instantiated into assembly here
        xorw        (%rdi, %rbx), %rax
                                  ^~~~
deflate_quick.c:34:5: error: invalid symbol redefinition
    "loop:\n\t"
    ^
<inline asm>:1:2: note: instantiated into assembly here
        loop:
        ^
deflate_quick.c:46:27: error: invalid instruction mnemonic 'movzxw'
        "jb         loop\n\t"
                          ^
<inline asm>:12:2: note: instantiated into assembly here
        movzxw     (%rsi, %rbx), %rax
        ^~~~~~
deflate_quick.c:48:50: error: invalid operand for instruction
        "movzxw     (%[src0], %[result]), %[ax]\n\t"
                                                 ^
<inline asm>:13:28: note: instantiated into assembly here
        xorw        (%rdi, %rbx), %rax
                                  ^~~~
deflate_quick.c:54:6: error: invalid symbol redefinition
    "miscompare16:\n\t"
     ^
<inline asm>:17:1: note: instantiated into assembly here
miscompare16:
^
deflate_quick.c:57:6: error: invalid symbol redefinition
    "miscompare:\n\t"
     ^
<inline asm>:20:1: note: instantiated into assembly here
miscompare:
^
deflate_quick.c:59:6: error: invalid symbol redefinition
    "end:\n\t"
     ^
<inline asm>:22:1: note: instantiated into assembly here
end:
^
8 errors generated.
make: *** [deflate_quick.o] Error 1

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions