Specifically, replace `adcd MEM, 0' by `adc dword ptr MEM, 0'. This
removes one reason why Clang's defective assembler won't work, but there
are others.
This is not part of a concerted effort to improve Clang support.
Honestly, as far as I'm concerned, `CCASFLAGS=-fno-integrated-as
-Wno-unicode' is sufficient support for building Catacomb using
Clang. (That said, I don't actively object to supporting Clang: it's
just not something I want to put much effort into. I'm happy to accept
tasteful patches which improve Clang support.) But in retrospect, using
`adcd' here was kind of bletcherous in its own right, and it should be
fixed.
.intel_syntax noprefix
.globl foo
foo:
.intel_syntax noprefix
.globl foo
foo:
// Continue carry propagation until the end of the buffer.
0: add [rdi], C
mov C, 0 // preserves flags
// Continue carry propagation until the end of the buffer.
0: add [rdi], C
mov C, 0 // preserves flags
- adcd [rdi + 4], 0
- adcd [rdi + 8], 0
- adcd [rdi + 12], 0
+ adc dword ptr [rdi + 4], 0
+ adc dword ptr [rdi + 8], 0
+ adc dword ptr [rdi + 12], 0
adc C, 0
add rdi, 16
cmp rdi, DVL4
adc C, 0
add rdi, 16
cmp rdi, DVL4
// Continue carry propagation until the end of the buffer.
0: add [edi], eax
mov eax, 0 // preserves flags
// Continue carry propagation until the end of the buffer.
0: add [edi], eax
mov eax, 0 // preserves flags
- adcd [edi + 4], 0
- adcd [edi + 8], 0
- adcd [edi + 12], 0
+ adc dword ptr [edi + 4], 0
+ adc dword ptr [edi + 8], 0
+ adc dword ptr [edi + 12], 0
adc eax, 0
add edi, 16
cmp edi, esi
adc eax, 0
add edi, 16
cmp edi, esi