From mboxrd@z Thu Jan 1 00:00:00 1970 From: Paolo Bonzini Date: Thu, 03 Mar 2016 12:45:25 +0000 Subject: Re: [kvm-unit-tests PATCH] powerpc: Add tests for RTAS Message-Id: <56D831E5.2030604@redhat.com> List-Id: References: <1457008099-29944-1-git-send-email-lvivier@redhat.com> In-Reply-To: <1457008099-29944-1-git-send-email-lvivier@redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: Laurent Vivier , kvm@vger.kernel.org, kvm-ppc@vger.kernel.org Cc: drjones@redhat.com, thuth@redhat.com, dgibson@redhat.com On 03/03/2016 13:28, Laurent Vivier wrote: > + > +#define DAYS(y,m,d) (365UL * (y) + ((y) / 4) - ((y) / 100) + ((y) / 400) + \ > + 367UL * (m) / 12 + \ Out of curiosity, where did you take this from? I knew the variant with 2447/80 instead of 367/12, but they give the same result, as checked with bc: $ bc for (n=1;n<;n++)2447*n/80-367*n/12; 0 0 0 0 0 0 0 0 0 0 0 0 Paolo > + (d)) > +