https://gcc.gnu.org/bugzilla/show_bug.cgi?id=96625

--- Comment #1 from Hongtao.liu <crazylht at gmail dot com> ---
movabs rax,0x1ffffffffffffff8 --- it also clear high 3 bits.
and    rax,rdi

differs from 

and    rax,0xfffffffffffffff8

using g++ -O2 test.c -S got
---
        movq    %rdi, %rax
        andq    $-8, %rax
        ret
---

but gcc -O2 test.c -S got
---
        movabsq $2305843009213693944, %rax  ---- (1FFFFFFFFFFFFFF8₁₆)
        andq    %rdi, %rax
        ret
---

Is this related to language standard?

Reply via email to