Skip to content

assembly errors with clang #20

@letrout

Description

@letrout

I'm trying to compile tinymembench with clang and hitting errors in x86-sse2 assembly code. I removed all the .func and .endfunc directives since it seems LLVM has no interest in supporting them (as noted in another issue), but it's still complaining about ambiguous or invalid operands. I know next to nothing about assembly, any help on how to move past this would be greatly appreciated.
$ make
/opt/clang7.0.0/bin/clang-7 -O2 -c x86-sse2.S
/tmp/x86-sse2-ab79fe.s:81:9: error: ambiguous operand size for instruction 'add'
add SRC, 64
^~~
/tmp/x86-sse2-ab79fe.s:82:9: error: ambiguous operand size for instruction 'add'
add DST, 64
^~~
/tmp/x86-sse2-ab79fe.s:83:9: error: ambiguous operand size for instruction 'sub'
sub SIZE, 64
^~~~
/tmp/x86-sse2-ab79fe.s:84:5: error: invalid operand for instruction
jg 0b
^
/tmp/x86-sse2-ab79fe.s:97:9: error: ambiguous operand size for instruction 'add'
add SRC, 64
^~~
/tmp/x86-sse2-ab79fe.s:98:9: error: ambiguous operand size for instruction 'add'
add DST, 64
^~~
/tmp/x86-sse2-ab79fe.s:99:9: error: ambiguous operand size for instruction 'sub'
sub SIZE, 64
^~~~
/tmp/x86-sse2-ab79fe.s:100:5: error: invalid operand for instruction
jg 0b
^
/tmp/x86-sse2-ab79fe.s:115:9: error: ambiguous operand size for instruction 'add'
add SRC, 64
^~~
/tmp/x86-sse2-ab79fe.s:116:9: error: ambiguous operand size for instruction 'add'
add DST, 64
^~~
/tmp/x86-sse2-ab79fe.s:117:9: error: ambiguous operand size for instruction 'sub'
sub SIZE, 64
^~~~
/tmp/x86-sse2-ab79fe.s:118:5: error: invalid operand for instruction
jg 0b
^
/tmp/x86-sse2-ab79fe.s:133:9: error: ambiguous operand size for instruction 'add'
add SRC, 64
^~~
/tmp/x86-sse2-ab79fe.s:134:9: error: ambiguous operand size for instruction 'add'
add DST, 64
^~~
/tmp/x86-sse2-ab79fe.s:135:9: error: ambiguous operand size for instruction 'sub'
sub SIZE, 64
^~~~
/tmp/x86-sse2-ab79fe.s:136:5: error: invalid operand for instruction
jg 0b
^
/tmp/x86-sse2-ab79fe.s:150:9: error: ambiguous operand size for instruction 'add'
add SRC, 64
^~~
/tmp/x86-sse2-ab79fe.s:151:9: error: ambiguous operand size for instruction 'add'
add DST, 64
^~~
/tmp/x86-sse2-ab79fe.s:152:9: error: ambiguous operand size for instruction 'sub'
sub SIZE, 64
^~~~
/tmp/x86-sse2-ab79fe.s:153:5: error: invalid operand for instruction
jg 0b
^
/tmp/x86-sse2-ab79fe.s:167:9: error: ambiguous operand size for instruction 'add'
add SRC, 64
^~~
/tmp/x86-sse2-ab79fe.s:168:9: error: ambiguous operand size for instruction 'add'
add DST, 64
^~~
/tmp/x86-sse2-ab79fe.s:169:9: error: ambiguous operand size for instruction 'sub'
sub SIZE, 64
^~~~
/tmp/x86-sse2-ab79fe.s:170:5: error: invalid operand for instruction
jg 0b
^
/tmp/x86-sse2-ab79fe.s:180:9: error: ambiguous operand size for instruction 'add'
add DST, 64
^~~
/tmp/x86-sse2-ab79fe.s:181:9: error: ambiguous operand size for instruction 'sub'
sub SIZE, 64
^~~~
/tmp/x86-sse2-ab79fe.s:182:5: error: invalid operand for instruction
jg 0b
^
/tmp/x86-sse2-ab79fe.s:192:9: error: ambiguous operand size for instruction 'add'
add DST, 64
^~~
/tmp/x86-sse2-ab79fe.s:193:9: error: ambiguous operand size for instruction 'sub'
sub SIZE, 64
^~~~
/tmp/x86-sse2-ab79fe.s:194:5: error: invalid operand for instruction
jg 0b
^
Makefile:17: recipe for target 'x86-sse2.o' failed
make: *** [x86-sse2.o] Error 1
$ echo $CC
/opt/clang7.0.0/bin/clang-7
$ /opt/clang7.0.0/bin/clang-7 --version
clang version 7.0.0 (tags/RELEASE_700/final)
Target: x86_64-unknown-linux-gnu
Thread model: posix
InstalledDir: /opt/clang7.0.0/bin
$ uname -a
Linux jluth-desk 4.15.0-38-generic #41-Ubuntu SMP Wed Oct 10 10:59:38 UTC 2018 x86_64 x86_64 x86_64 GNU/Linux

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions