This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [PATCH, x86_64]: Provide longlong.h definitions for 128bit operations


void test_add(DI AL, DI AH, DI BL, DI BH, DI *RL, DI *RH) {
  TI A = AL | ((TI)AH << 64);
  TI B = AL | ((TI)BH << 64);

TI C = A + B;
*RL = (DI)C;
*RH = (DI)(C >> 64);
}


Should produce some thing like this:

_test_add:
        addq %rdi, %rdi
        adcq %rsi, %rcx
        movq %rdi, (%r8)
        movq %rcx, (%r9)
        ret

Right. This probably wasn't true before the lower-subreg pass.


Paolo


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]