This is the mail archive of the java-patches@sourceware.cygnus.com mailing list for the Java project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

Patch: no more %esi


I'm checking in the appended patch, which removes the use of %esi from
the interpreter.  This code causes problems with some versions of g++.

Kresten, I assume this code is a performance hack?  Does it make a
measurable difference when this code is included?  If it does, then we
might want to enable it, but with a different register.  If it
doesn't, then there's no harm leaving it out.  (Unfortunately I
currently don't have time to do any profiling.)

2000-01-19  Tom Tromey  <tromey@cygnus.com>

	* interpret.cc (PC_REGISTER_ASM): Removed.

Tom

Index: interpret.cc
===================================================================
RCS file: /cvs/java/libgcj/libjava/interpret.cc,v
retrieving revision 1.7
diff -u -r1.7 interpret.cc
--- interpret.cc	2000/01/19 18:39:23	1.7
+++ interpret.cc	2000/01/19 20:57:12
@@ -1,6 +1,6 @@
 // interpret.cc - Code for the interpreter
 
-/* Copyright (C) 1999  Red Hat, Inc.
+/* Copyright (C) 1999, 2000  Red Hat, Inc.
 
    This file is part of libgcj.
 
@@ -403,19 +403,13 @@
 */
 
 
-#ifdef __i386__
-#define PC_REGISTER_ASM  asm("%esi")
-#else
-#define PC_REGISTER_ASM
-#endif
-
 void _Jv_InterpMethod::continue1 (_Jv_InterpMethodInvocation *inv)
 {
   using namespace java::lang::reflect;
 
-  register _Jv_word      *sp                  = inv->sp;
-  register unsigned char *pc PC_REGISTER_ASM  = inv->pc;
-  _Jv_word               *locals              = inv->local_base ();
+  register _Jv_word      *sp     = inv->sp;
+  register unsigned char *pc     = inv->pc;
+  _Jv_word               *locals = inv->local_base ();
 
   _Jv_word *pool_data   = defining_class->constants.data;
   

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]