hotspot/src/cpu/sparc/vm/bytecodeInterpreter_sparc.hpp

Print this page
rev 611 : Merge
   1 #ifdef USE_PRAGMA_IDENT_HDR
   2 #pragma ident "@(#)bytecodeInterpreter_sparc.hpp        1.10 07/08/29 13:42:16 JVM"
   3 #endif
   4 /*
   5  * Copyright 2002 Sun Microsystems, Inc.  All Rights Reserved.
   6  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
   7  *
   8  * This code is free software; you can redistribute it and/or modify it
   9  * under the terms of the GNU General Public License version 2 only, as
  10  * published by the Free Software Foundation.
  11  *
  12  * This code is distributed in the hope that it will be useful, but WITHOUT
  13  * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
  14  * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
  15  * version 2 for more details (a copy is included in the LICENSE file that
  16  * accompanied this code).
  17  *
  18  * You should have received a copy of the GNU General Public License version
  19  * 2 along with this work; if not, write to the Free Software Foundation,
  20  * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
  21  *
  22  * Please contact Sun Microsystems, Inc., 4150 Network Circle, Santa Clara,
  23  * CA 95054 USA or visit www.sun.com if you need additional information or
  24  * have any questions.
  25  *  


  64 #define STACK_INT(offset)     (*((jint*) &topOfStack[-(offset)]))
  65 #define STACK_FLOAT(offset)   (*((jfloat *) &topOfStack[-(offset)]))
  66 #define STACK_OBJECT(offset)  (*((oop *) &topOfStack [-(offset)]))
  67 #define STACK_DOUBLE(offset)  (((VMJavaVal64*) &topOfStack[-(offset)])->d)
  68 #define STACK_LONG(offset)    (((VMJavaVal64 *) &topOfStack[-(offset)])->l)
  69 
  70 #define SET_STACK_SLOT(value, offset)   (*(intptr_t*)&topOfStack[-(offset)] = *(intptr_t*)(value))
  71 #define SET_STACK_ADDR(value, offset)   (*((address *)&topOfStack[-(offset)]) = (value))
  72 #define SET_STACK_INT(value, offset)    (*((jint *)&topOfStack[-(offset)]) = (value))
  73 #define SET_STACK_FLOAT(value, offset)  (*((jfloat *)&topOfStack[-(offset)]) = (value))
  74 #define SET_STACK_OBJECT(value, offset) (*((oop *)&topOfStack[-(offset)]) = (value))
  75 #define SET_STACK_DOUBLE(value, offset) (((VMJavaVal64*)&topOfStack[-(offset)])->d = (value))
  76 #define SET_STACK_DOUBLE_FROM_ADDR(addr, offset) (((VMJavaVal64*)&topOfStack[-(offset)])->d =  \
  77                                                  ((VMJavaVal64*)(addr))->d)
  78 #define SET_STACK_LONG(value, offset)   (((VMJavaVal64*)&topOfStack[-(offset)])->l = (value))
  79 #define SET_STACK_LONG_FROM_ADDR(addr, offset)   (((VMJavaVal64*)&topOfStack[-(offset)])->l =  \
  80                                                  ((VMJavaVal64*)(addr))->l)
  81 
  82 #define LOCALS_SLOT(offset)    ((intptr_t*)&locals[-(offset)])
  83 #define LOCALS_ADDR(offset)    ((address)locals[-(offset)])
  84 #define LOCALS_INT(offset)     ((jint)(locals[-(offset)]))
  85 #define LOCALS_FLOAT(offset)   (*((jfloat*)&locals[-(offset)]))
  86 #define LOCALS_OBJECT(offset)  ((oop)locals[-(offset)])
  87 #define LOCALS_DOUBLE(offset)  (((VMJavaVal64*)&locals[-((offset) + 1)])->d)
  88 #define LOCALS_LONG(offset)    (((VMJavaVal64*)&locals[-((offset) + 1)])->l)
  89 #define LOCALS_LONG_AT(offset) (((address)&locals[-((offset) + 1)]))
  90 #define LOCALS_DOUBLE_AT(offset) (((address)&locals[-((offset) + 1)]))
  91 
  92 #define SET_LOCALS_SLOT(value, offset)    (*(intptr_t*)&locals[-(offset)] = *(intptr_t *)(value))
  93 #define SET_LOCALS_ADDR(value, offset)    (*((address *)&locals[-(offset)]) = (value))
  94 #define SET_LOCALS_INT(value, offset)     (*((jint *)&locals[-(offset)]) = (value))
  95 #define SET_LOCALS_FLOAT(value, offset)   (*((jfloat *)&locals[-(offset)]) = (value))
  96 #define SET_LOCALS_OBJECT(value, offset)  (*((oop *)&locals[-(offset)]) = (value))
  97 #define SET_LOCALS_DOUBLE(value, offset)  (((VMJavaVal64*)&locals[-((offset)+1)])->d = (value))
  98 #define SET_LOCALS_LONG(value, offset)    (((VMJavaVal64*)&locals[-((offset)+1)])->l = (value))
  99 #define SET_LOCALS_DOUBLE_FROM_ADDR(addr, offset) (((VMJavaVal64*)&locals[-((offset)+1)])->d = \
 100                                                   ((VMJavaVal64*)(addr))->d)
 101 #define SET_LOCALS_LONG_FROM_ADDR(addr, offset) (((VMJavaVal64*)&locals[-((offset)+1)])->l = \
 102                                                 ((VMJavaVal64*)(addr))->l)
 103 
 104 



   1 /*
   2  * Copyright 2002-2008 Sun Microsystems, Inc.  All Rights Reserved.
   3  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
   4  *
   5  * This code is free software; you can redistribute it and/or modify it
   6  * under the terms of the GNU General Public License version 2 only, as
   7  * published by the Free Software Foundation.
   8  *
   9  * This code is distributed in the hope that it will be useful, but WITHOUT
  10  * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
  11  * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
  12  * version 2 for more details (a copy is included in the LICENSE file that
  13  * accompanied this code).
  14  *
  15  * You should have received a copy of the GNU General Public License version
  16  * 2 along with this work; if not, write to the Free Software Foundation,
  17  * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
  18  *
  19  * Please contact Sun Microsystems, Inc., 4150 Network Circle, Santa Clara,
  20  * CA 95054 USA or visit www.sun.com if you need additional information or
  21  * have any questions.
  22  *


  61 #define STACK_INT(offset)     (*((jint*) &topOfStack[-(offset)]))
  62 #define STACK_FLOAT(offset)   (*((jfloat *) &topOfStack[-(offset)]))
  63 #define STACK_OBJECT(offset)  (*((oop *) &topOfStack [-(offset)]))
  64 #define STACK_DOUBLE(offset)  (((VMJavaVal64*) &topOfStack[-(offset)])->d)
  65 #define STACK_LONG(offset)    (((VMJavaVal64 *) &topOfStack[-(offset)])->l)
  66 
  67 #define SET_STACK_SLOT(value, offset)   (*(intptr_t*)&topOfStack[-(offset)] = *(intptr_t*)(value))
  68 #define SET_STACK_ADDR(value, offset)   (*((address *)&topOfStack[-(offset)]) = (value))
  69 #define SET_STACK_INT(value, offset)    (*((jint *)&topOfStack[-(offset)]) = (value))
  70 #define SET_STACK_FLOAT(value, offset)  (*((jfloat *)&topOfStack[-(offset)]) = (value))
  71 #define SET_STACK_OBJECT(value, offset) (*((oop *)&topOfStack[-(offset)]) = (value))
  72 #define SET_STACK_DOUBLE(value, offset) (((VMJavaVal64*)&topOfStack[-(offset)])->d = (value))
  73 #define SET_STACK_DOUBLE_FROM_ADDR(addr, offset) (((VMJavaVal64*)&topOfStack[-(offset)])->d =  \
  74                                                  ((VMJavaVal64*)(addr))->d)
  75 #define SET_STACK_LONG(value, offset)   (((VMJavaVal64*)&topOfStack[-(offset)])->l = (value))
  76 #define SET_STACK_LONG_FROM_ADDR(addr, offset)   (((VMJavaVal64*)&topOfStack[-(offset)])->l =  \
  77                                                  ((VMJavaVal64*)(addr))->l)
  78 
  79 #define LOCALS_SLOT(offset)    ((intptr_t*)&locals[-(offset)])
  80 #define LOCALS_ADDR(offset)    ((address)locals[-(offset)])
  81 #define LOCALS_INT(offset)     (*((jint*)&locals[-(offset)]))
  82 #define LOCALS_FLOAT(offset)   (*((jfloat*)&locals[-(offset)]))
  83 #define LOCALS_OBJECT(offset)  ((oop)locals[-(offset)])
  84 #define LOCALS_DOUBLE(offset)  (((VMJavaVal64*)&locals[-((offset) + 1)])->d)
  85 #define LOCALS_LONG(offset)    (((VMJavaVal64*)&locals[-((offset) + 1)])->l)
  86 #define LOCALS_LONG_AT(offset) (((address)&locals[-((offset) + 1)]))
  87 #define LOCALS_DOUBLE_AT(offset) (((address)&locals[-((offset) + 1)]))
  88 
  89 #define SET_LOCALS_SLOT(value, offset)    (*(intptr_t*)&locals[-(offset)] = *(intptr_t *)(value))
  90 #define SET_LOCALS_ADDR(value, offset)    (*((address *)&locals[-(offset)]) = (value))
  91 #define SET_LOCALS_INT(value, offset)     (*((jint *)&locals[-(offset)]) = (value))
  92 #define SET_LOCALS_FLOAT(value, offset)   (*((jfloat *)&locals[-(offset)]) = (value))
  93 #define SET_LOCALS_OBJECT(value, offset)  (*((oop *)&locals[-(offset)]) = (value))
  94 #define SET_LOCALS_DOUBLE(value, offset)  (((VMJavaVal64*)&locals[-((offset)+1)])->d = (value))
  95 #define SET_LOCALS_LONG(value, offset)    (((VMJavaVal64*)&locals[-((offset)+1)])->l = (value))
  96 #define SET_LOCALS_DOUBLE_FROM_ADDR(addr, offset) (((VMJavaVal64*)&locals[-((offset)+1)])->d = \
  97                                                   ((VMJavaVal64*)(addr))->d)
  98 #define SET_LOCALS_LONG_FROM_ADDR(addr, offset) (((VMJavaVal64*)&locals[-((offset)+1)])->l = \
  99                                                 ((VMJavaVal64*)(addr))->l)