Re: GCC does not generate ADCX or ADOX for _addcarryx_u64

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



> I'm trying to use _addcarryx_u64. GCC 7.1 is still generating ADD and
> ADC instead of ADCX or ADOX:
> ...
>
> Any ideas what I am doing wrong with respect to ADX?
>
> Thanks in advance
>
> ****************************************
>
> $ g++ -Wall -march=native test.cxx -c

I probably should have mentioned... Adding flags like -O3, -O5 and
-madx does not help. Below is the dump using -O3 -madx.

Disassembly of section .text:

0000000000000000 <unsigned char Add<8u>(unsigned long*, unsigned long
const*, unsigned long const*)>:
   0:   48 8b 46 38             mov    0x38(%rsi),%rax
   4:   48 03 42 38             add    0x38(%rdx),%rax
   8:   0f 92 c1                setb   %cl
   b:   48 89 47 38             mov    %rax,0x38(%rdi)
   f:   48 8b 46 30             mov    0x30(%rsi),%rax
  13:   80 c1 ff                add    $0xff,%cl
  16:   48 13 42 30             adc    0x30(%rdx),%rax
  1a:   0f 92 c1                setb   %cl
  1d:   48 89 47 30             mov    %rax,0x30(%rdi)
  21:   48 8b 46 28             mov    0x28(%rsi),%rax
  25:   80 c1 ff                add    $0xff,%cl
  28:   48 13 42 28             adc    0x28(%rdx),%rax
  2c:   0f 92 c1                setb   %cl
  2f:   48 89 47 28             mov    %rax,0x28(%rdi)
  33:   48 8b 46 20             mov    0x20(%rsi),%rax
  37:   80 c1 ff                add    $0xff,%cl
  3a:   48 13 42 20             adc    0x20(%rdx),%rax
  3e:   0f 92 c1                setb   %cl
  41:   48 89 47 20             mov    %rax,0x20(%rdi)
  45:   48 8b 46 18             mov    0x18(%rsi),%rax
  49:   80 c1 ff                add    $0xff,%cl
  4c:   48 13 42 18             adc    0x18(%rdx),%rax
  50:   0f 92 c1                setb   %cl
  53:   48 89 47 18             mov    %rax,0x18(%rdi)
  57:   48 8b 46 10             mov    0x10(%rsi),%rax
  5b:   80 c1 ff                add    $0xff,%cl
  5e:   48 13 42 10             adc    0x10(%rdx),%rax
  62:   0f 92 c1                setb   %cl
  65:   48 89 47 10             mov    %rax,0x10(%rdi)
  69:   48 8b 46 08             mov    0x8(%rsi),%rax
  6d:   80 c1 ff                add    $0xff,%cl
  70:   48 13 42 08             adc    0x8(%rdx),%rax
  74:   48 89 47 08             mov    %rax,0x8(%rdi)
  78:   0f 92 c1                setb   %cl
  7b:   48 8b 06                mov    (%rsi),%rax
  7e:   48 8b 12                mov    (%rdx),%rdx
  81:   80 c1 ff                add    $0xff,%cl
  84:   48 11 c2                adc    %rax,%rdx
  87:   0f 92 c0                setb   %al
  8a:   48 89 17                mov    %rdx,(%rdi)
  8d:   c3                      retq

Jeff



[Index of Archives]     [Linux C Programming]     [Linux Kernel]     [eCos]     [Fedora Development]     [Fedora Announce]     [Autoconf]     [The DWARVES Debugging Tools]     [Yosemite Campsites]     [Yosemite News]     [Linux GCC]

  Powered by Linux