diff options
author | dbj <dbj@pkgsrc.org> | 2005-11-04 21:10:42 +0000 |
---|---|---|
committer | dbj <dbj@pkgsrc.org> | 2005-11-04 21:10:42 +0000 |
commit | 7b86f9d0b9cdcb2aa44061154f28e073067d37c5 (patch) | |
tree | 92c18d0d207934ffb33b18d9ec99b057f9e71641 /emulators/qemu/patches | |
parent | c89de0b862a7c5c26d87d6b45d222a767600e8b2 (diff) | |
download | pkgsrc-7b86f9d0b9cdcb2aa44061154f28e073067d37c5.tar.gz |
fix to i386 div64 taken from qemu cvs
bump PKGREVISION
Diffstat (limited to 'emulators/qemu/patches')
-rw-r--r-- | emulators/qemu/patches/patch-ay | 24 |
1 files changed, 24 insertions, 0 deletions
diff --git a/emulators/qemu/patches/patch-ay b/emulators/qemu/patches/patch-ay new file mode 100644 index 00000000000..d50ab3d4136 --- /dev/null +++ b/emulators/qemu/patches/patch-ay @@ -0,0 +1,24 @@ +$NetBSD: patch-ay,v 1.1 2005/11/04 21:10:42 dbj Exp $ + +--- target-i386/helper.c.orig 2005-09-04 13:11:31.000000000 -0400 ++++ target-i386/helper.c +@@ -3261,7 +3261,7 @@ static void imul64(uint64_t *plow, uint6 + static int div64(uint64_t *plow, uint64_t *phigh, uint64_t b) + { + uint64_t q, r, a1, a0; +- int i, qb; ++ int i, qb, ab; + + a0 = *plow; + a1 = *phigh; +@@ -3275,8 +3275,9 @@ static int div64(uint64_t *plow, uint64_ + return 1; + /* XXX: use a better algorithm */ + for(i = 0; i < 64; i++) { ++ ab = a1 >> 63; + a1 = (a1 << 1) | (a0 >> 63); +- if (a1 >= b) { ++ if (ab || a1 >= b) { + a1 -= b; + qb = 1; + } else { |