[LLVMdev] ADDE on HW that doesn't have flags?
andrewl at lenharth.org
Mon Oct 27 09:53:08 PDT 2008
On Mon, Oct 27, 2008 at 11:46 AM, Daniel M Gessel <gessel at apple.com> wrote:
> Thanks very much for your help.
> I didn't quite understand how adde really uses flags in, say x86 or
> any of the other architectures I looked at.
Flags are a hack. They say "the producer and the consumer must be
sequential". That way things like the carry flag on x86 just works
out for cases like this.
> It seemed to declare it used EFLAGS, but little else: like how would
> you feed a zero in for the carry.
That is really incidental to the addc/adde sequence. The flag edge in
the DAG simple makes sure the instructions are togeather so hidden
dataflow isn't clobbered.
More information about the llvm-dev