Re: [Qemu-devel] [PATCH] SPARC target : Fix carry flagupdate inaddxcc and subxc

2006-04-14 Thread Blue Swirl
Conclusion : the computation of the V flag in qemu is correct, and their is no special case to consider if the C flag is set or not :-) For tomorrow, the formal proof of the correctness of the whole qemu code ;-) Thanks for the superb analysis! Now it's time to check if real hardware works ac

Re: [Qemu-devel] [PATCH] SPARC target : Fix carry flagupdate inaddxcc and subxc

2006-04-13 Thread Even Rouault
Hello, As far as the V flag is concerned, I've taken a look at the Sparc V8 reference manual (www.sparc.org/standards/V8.pdf) We can read at page 170 for the update of the V flag for "addcc" and "addxcc": Vtheory = (r[rs1]<31> & operand2<31> & !result<31>) | (!r[rs1]<31> & !operand2<31> && resu

Re: [Qemu-devel] [PATCH] SPARC target : Fix carry flagupdate inaddxcc and subxc

2006-04-13 Thread Blue Swirl
As far as the V flag is concerned, mmm, I'm not really sure whether we should change something in the sparc code. If we compare to the arm code, we don't take into account the fact that the carry flag is set before. We'd probably need some extensive tests and their associated expected results.