Changeset 725 for trunk/lib


Ignore:
Timestamp:
Nov 28, 2010, 3:36:09 PM (9 years ago)
Author:
cameron
Message:

specialize double_int_64_advance for ADC64 mode

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/lib/block_carry.h

    r724 r725  
    9393#define double_int64_advance(x1, x2, rslt1, rslt2, carry) \
    9494  __asm__  (\
    95         "cmp $0, %[carry]\n\t" \
    96         "adc %[z1], %[z1]\n\t" \
     95        "add %[z1], %[z1]\n\t" \
    9796        "adc %[z2], %[z2]\n\t" \
    98         "mov $0, %[carryout]\n\t" \
    99         "adc $0, %[carryout]\n\t" \
    100      : [z1] "=r" (rslt1), [z2] "=r" (rslt2), [carryout] "=r" (carry) \
    101          : "[z1]" (x1), "[z2]" (x2), \
    102            "[carryin]" "2" (carry) \
    103          : "cc")
    104 
     97        "lea 0(%[carryflag], %[z1]), %[z1]\n\t" \
     98        "setc %%al\n\t" \
     99         : [z1] "=r" (rslt1), [z2] "=r" (rslt2), [carryflag] "=a" (carry) \
     100         : "[z1]" (x1), "[z2]" (x2), \
     101           "[carryflag]" (carry) \
     102         : "cc")
     103
     104/*  Slow
     105#define double_int64_advance(x1, x2, rslt1, rslt2, carry) \
     106  __asm__  (\
     107        "shld $1, %[z1], %[z2]\n\t" \
     108        "lea 0(%[carryflag], %[z1], 2), %[z1]\n\t" \
     109        "setc %%al\n\t" \
     110         : [z1] "=r" (rslt1), [z2] "=r" (rslt2), [carryflag] "=a" (carry) \
     111         : "[z1]" (x1), "[z2]" (x2), \
     112           "[carryflag]" (carry) \
     113         : "cc")
     114*/
    105115
    106116#define advance_with_carry(cursor, carry, rslt)\
Note: See TracChangeset for help on using the changeset viewer.