Re: [Qemu-devel] qemu exec-all.h host-utils.c host-utils.h targe...

2007-11-03 Thread J. Mayer

On Sun, 2007-11-04 at 02:24 +, Jocelyn Mayer wrote:
 CVSROOT:  /sources/qemu
 Module name:  qemu
 Changes by:   Jocelyn Mayer j_mayer 07/11/04 02:24:58
 
 Modified files:
   .  : exec-all.h host-utils.c host-utils.h 
   target-alpha   : op.c 
   target-i386: helper.c 
 
 Log message:
   For consistency, move muls64 / mulu64 prototypes to host-utils.h
   Make x86_64 optimized versions inline.

Following this patch, I also got optimized versions of muls64 / mulu64 /
clz64 for PowerPC 64 and clz32 for PowerPC 32 hosts.
Seems like it could be useful...

-- 
J. Mayer [EMAIL PROTECTED]
Never organized
Index: host-utils.h
===
RCS file: /sources/qemu/qemu/host-utils.h,v
retrieving revision 1.3
diff -u -d -d -p -r1.3 host-utils.h
--- host-utils.h	4 Nov 2007 02:24:57 -	1.3
+++ host-utils.h	4 Nov 2007 02:26:34 -
@@ -40,6 +40,25 @@ static always_inline void muls64 (uint64
  : =d (*phigh), =a (*plow)
  : a (a), 0 (b));
 }
+#elif defined(__powerpc64__)
+#define __HAVE_FAST_MULU64__
+static always_inline void mulu64 (uint64_t *plow, uint64_t *phigh,
+  uint64_t a, uint64_t b)
+{
+__asm__ (mulld %1, %2, %3  \n\t
+ mulhdu %0, %2, %3 \n\t
+ : =r(*phigh), =r(*plow)
+ : r(a), r(b));
+}
+#define __HAVE_FAST_MULS64__
+static always_inline void muls64 (uint64_t *plow, uint64_t *phigh,
+  uint64_t a, uint64_t b)
+{
+__asm__ (mulld %1, %2, %3 \n\t
+ mulhd %0, %2, %3 \n\t
+ : =r(*phigh), =r(*plow)
+ : r(a), r(b));
+}
 #else
 void muls64(int64_t *phigh, int64_t *plow, int64_t a, int64_t b);
 void mulu64(uint64_t *phigh, uint64_t *plow, uint64_t a, uint64_t b);
@@ -50,7 +69,19 @@ void mulu64(uint64_t *phigh, uint64_t *p
cope with that. */
 
 /* Binary search for leading zeros.  */
+#if defined(__powerpc__)
+#define __HAVE_FAST_CLZ32__
+static always_inline int clz32 (uint32_t val)
+{
+int cnt;
+
+__asm__ (cntlzw %0, %1 \n\t
+ : =r(cnt)
+ : r(val));
 
+return cnt;
+}
+#else
 static always_inline int clz32(uint32_t val)
 {
 int cnt = 0;
@@ -80,12 +111,26 @@ static always_inline int clz32(uint32_t 
 }
 return cnt;
 }
+#endif
 
 static always_inline int clo32(uint32_t val)
 {
 return clz32(~val);
 }
 
+#if defined(__powerpc64__)
+#define __HAVE_FAST_CLZ64__
+static always_inline int clz64 (uint32_t val)
+{
+int cnt;
+
+__asm__ (cntlzd %0, %1 \n\t
+ : =r(cnt)
+ : r(val));
+
+return cnt;
+}
+#else
 static always_inline int clz64(uint64_t val)
 {
 int cnt = 0;
@@ -98,6 +143,7 @@ static always_inline int clz64(uint64_t 
 
 return cnt + clz32(val);
 }
+#endif
 
 static always_inline int clo64(uint64_t val)
 {


Re: [Qemu-devel] qemu exec-all.h kqemu.c vl.c

2005-09-03 Thread Filip Navara
Please add if (kqemu_fd) before the CancelIo call in kqemu.c, 
otherwise the call will fail every time for non-KQEMU case (which can 
slow down things a bit).


- Filip

Fabrice Bellard wrote:


CVSROOT:/cvsroot/qemu
Module name:qemu
Branch: 
Changes by: Fabrice Bellard [EMAIL PROTECTED]   05/09/03 17:55:47

Modified files:
	.  : exec-all.h kqemu.c vl.c 


Log message:
kqemu_cpu_interrupt support for win32 (Filip Navara)

CVSWeb URLs:
http://savannah.gnu.org/cgi-bin/viewcvs/qemu/qemu/exec-all.h.diff?tr1=1.36tr2=1.37r1=textr2=text
http://savannah.gnu.org/cgi-bin/viewcvs/qemu/qemu/kqemu.c.diff?tr1=1.7tr2=1.8r1=textr2=text
http://savannah.gnu.org/cgi-bin/viewcvs/qemu/qemu/vl.c.diff?tr1=1.134tr2=1.135r1=textr2=text



___
Qemu-devel mailing list
Qemu-devel@nongnu.org
http://lists.nongnu.org/mailman/listinfo/qemu-devel


 





___
Qemu-devel mailing list
Qemu-devel@nongnu.org
http://lists.nongnu.org/mailman/listinfo/qemu-devel


Re: [Qemu-devel] qemu exec-all.h

2005-08-21 Thread Ozan Türkyılmaz
i have a request
cound you put cvs checkouts to another maling list ?

On 21/08/05, Fabrice Bellard [EMAIL PROTECTED] wrote:
 CVSROOT:/cvsroot/qemu
 Module name:qemu
 Branch:
 Changes by: Fabrice Bellard [EMAIL PROTECTED]  05/08/21 09:37:35
 
 Modified files:
 .  : exec-all.h
 
 Log message:
 added kqemu_set_notdirty()
 
 CVSWeb URLs:
 http://savannah.gnu.org/cgi-bin/viewcvs/qemu/qemu/exec-all.h.diff?tr1=1.34tr2=1.35r1=textr2=text
 
 
 
 ___
 Qemu-devel mailing list
 Qemu-devel@nongnu.org
 http://lists.nongnu.org/mailman/listinfo/qemu-devel
 


-- 
Ozan


___
Qemu-devel mailing list
Qemu-devel@nongnu.org
http://lists.nongnu.org/mailman/listinfo/qemu-devel


Re: [Qemu-devel] qemu exec-all.h

2005-08-21 Thread Johannes Schindelin
Hi,

On Sun, 21 Aug 2005, Ozan Türky?lmaz wrote:

 i have a request
 cound you put cvs checkouts to another maling list ?

I veto that. I find it highly informative what patches Fabrice applied, 
and it has a high relevance to the name of the list.

Ciao,
Dscho___
Qemu-devel mailing list
[EMAIL PROTECTED]
http://lists.nongnu.org/mailman/listinfo/qemu-devel


Re: [Qemu-devel] qemu exec-all.h

2005-08-21 Thread Martin Bochnig

Ozan Türkyılmaz wrote:


i have a request
cound you put cvs checkouts to another maling list ?
 




Ozan Türkyılmaz,

do you have any idea what you're actually talking about??
I'd suggest that you first find out

#0)
who Fabrice Bellard is and

#1)
what he is doing here!


On 21/08/05, Fabrice Bellard [EMAIL PROTECTED] wrote:
 


CVSROOT:/cvsroot/qemu
Module name:qemu
Branch:
Changes by: Fabrice Bellard [EMAIL PROTECTED]  05/08/21 09:37:35

   



 





___
Qemu-devel mailing list
[EMAIL PROTECTED]
http://lists.nongnu.org/mailman/listinfo/qemu-devel


Re: [Qemu-devel] qemu exec-all.h

2005-07-24 Thread Hetz Ben Hamo
How much is it useful? is it a good enough solution to install win9x with kqemu?

Thanks,
Hetz

 Modified files:
 .  : exec-all.h
 
 Log message:
 temporary work around for 16 bit code in kqemu


___
Qemu-devel mailing list
Qemu-devel@nongnu.org
http://lists.nongnu.org/mailman/listinfo/qemu-devel