summaryrefslogtreecommitdiffstats
path: root/debian/uncrustify-trinity/uncrustify-trinity-0.78.1/tests/expected/cpp/34370-asm_block_pp.cpp
blob: e8fc87a6d76ccd09d0ff100d3b6c683fc106e320 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20

void add128( uint64_t & rlo, uint64_t & rhi, uint64_t addlo ) {
#if defined(HAVE_X86_64_ASM)
	__asm__ ("addq %2, %0\n"
                 "adcq $0, %1\n"
#if defined(__clang__)
	           // clang cannot work properly with "g" and silently
	           // produces hardly-workging code, if "g" is specified;
                 : "+r" (rlo), "+r" (rhi)
                 : "m" (addlo)
#else
                 : "+g" (rlo), "+g" (rhi)
                 : "g" (addlo)
#endif
        );
#else
	rlo += addlo;
	rhi += (rlo < addlo);
#endif
}