From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([140.186.70.92]:36005) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1RFOpg-0000QD-1w for qemu-devel@nongnu.org; Sun, 16 Oct 2011 07:24:44 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1RFOpe-0001TP-Rt for qemu-devel@nongnu.org; Sun, 16 Oct 2011 07:24:44 -0400 Received: from mx1.redhat.com ([209.132.183.28]:8776) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1RFOpe-0001TA-F3 for qemu-devel@nongnu.org; Sun, 16 Oct 2011 07:24:42 -0400 From: Avi Kivity Date: Sun, 16 Oct 2011 13:24:22 +0200 Message-Id: <1318764264-22745-1-git-send-email-avi@redhat.com> Subject: [Qemu-devel] [RFC128 0/2] 128-bit arithmetic for the memory API List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: qemu-devel@nongnu.org, David Gibson In order to solve the recurring overflow issues with the memory API, introduce a 128-bit integer type to hold sizes (range 0 - 2^64) and intermediates. While the patchset does reduce readability, I believe it is the only way to prevent overflows emerging in unlikely places in the code. Avi Kivity (2): Add support for 128-bit arithmetic memory: use 128-bit integers for sizes and intermediates int128.h | 116 +++++++++++++++++++++++++++++++++++++ memory.c | 193 ++++++++++++++++++++++++++++++++++++-------------------------- memory.h | 3 +- 3 files changed, 231 insertions(+), 81 deletions(-) create mode 100644 int128.h -- 1.7.6.3