lightning
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Lightning] Reducing opcode permutations


From: Paolo Bonzini
Subject: Re: [Lightning] Reducing opcode permutations
Date: Sun, 30 Mar 2008 19:37:13 +0200
User-agent: Thunderbird 2.0.0.12 (Macintosh/20080213)

Sandro Magi wrote:
On Fri, Mar 28, 2008 at 12:20 PM, Paolo Bonzini <address@hidden> wrote:
 > jit_movi_i(JIT_R1, INT_MAX)     // R1 = 2^31
 > jit_addci_i(JIT_R0, JIT_R1, 1)   // R0 = R1 + 1, set carry
 > jit_addxi_i(JIT_R2, JIT_R0, 0)   // R2 = R0 + 0 + carry

 Don't confuse carry with overflow.  Carry is the same for integer and
 unsigned integer.  Overflow differs, but what tests overflow is
 boadd/bosub, not addc/addx.

Ah, my mistake. So a similar instruction sequence to the above using
boadd_i would branch to the overflow address, but if I were to use
boadd_ui it would not?

Yep.

Paolo




reply via email to

[Prev in Thread] Current Thread [Next in Thread]