Changeset 534 for trunk/lib


Ignore:
Timestamp:
Jul 26, 2010, 1:49:58 PM (9 years ago)
Author:
ksherdy
Message:

Add inline asm macros for clc and adc.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/lib/block_carry.h

    r473 r534  
    5656#define carry_or(carry1, carry2) (carry1 | carry2)
    5757
     58#define clc() \
     59  __asm__ __volatile__ ("clc\n\t":::)
     60
     61#define adc(x,y,carry,sum) \
     62  __asm__ __volatile__ ("add %[carryflag], %[e]\n\t" \
     63        "adc %[e], %[z]\n\t" \
     64        "mov $0, %1\n\t" \
     65        "adc %[carryflag], %1\n\t" \
     66        : [z] "=r" (sum), [carryflag] "=a" (carry) \
     67        : "[z]" (x), [e] "r" (y), "[carryflag]" (carry) \
     68        : "cc")
     69
    5870#define double_int64_adc(x1, x2, y1, y2, rslt1, rslt2, carry) \
    5971   __asm__ __volatile__ ("add %[carryin], %[z1]\n\t" \
Note: See TracChangeset for help on using the changeset viewer.