[LLVMdev] adde/addc
Evan Cheng
evan.cheng at apple.com
Mon Sep 8 10:24:02 PDT 2008
Legalizer will expand arithmetics using addc and adde. Is it not
working for you? It works fine on x86, you can take a look how it's
done.
Evan
On Sep 8, 2008, at 4:03 AM, Richard Pennington wrote:
> My target doesn't support 64 bit arithmetic, so I'd like to supply
> definitions for adde/addc. The problem is I can't seem to figure out
> the
> magic. Here's an example of what I need to generate:
>
> # two i64s in r5/r6 and r7/r8
> # result in r1/r2, carry in r3
>
> # adde
> add r2, r6, r8
> cmpltu r3, r2, r6 # compute carry
>
> # addc
> add r1, r5, r7
> add r1, zero, r3
>
> Is this possible given the current code generation stuff? Is there
> another approach that I should consider?
>
> -Rich
>
> _______________________________________________
> LLVM Developers mailing list
> LLVMdev at cs.uiuc.edu http://llvm.cs.uiuc.edu
> http://lists.cs.uiuc.edu/mailman/listinfo/llvmdev
More information about the llvm-dev
mailing list