1.1 --- a/src/cpu/zero/vm/bytecodeInterpreter_zero.hpp Mon Apr 11 15:30:31 2011 -0700 1.2 +++ b/src/cpu/zero/vm/bytecodeInterpreter_zero.hpp Tue Apr 12 02:40:23 2011 -0700 1.3 @@ -1,6 +1,6 @@ 1.4 /* 1.5 * Copyright (c) 2002, 2010, Oracle and/or its affiliates. All rights reserved. 1.6 - * Copyright 2007, 2008 Red Hat, Inc. 1.7 + * Copyright 2007, 2008, 2011 Red Hat, Inc. 1.8 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. 1.9 * 1.10 * This code is free software; you can redistribute it and/or modify it 1.11 @@ -150,4 +150,22 @@ 1.12 #define SET_LOCALS_LONG_FROM_ADDR(addr, offset) (((VMJavaVal64*)&locals[-((offset)+1)])->l = \ 1.13 ((VMJavaVal64*)(addr))->l) 1.14 1.15 +// VMSlots implementation 1.16 + 1.17 +#define VMSLOTS_SLOT(offset) ((intptr_t*)&vmslots[(offset)]) 1.18 +#define VMSLOTS_ADDR(offset) ((address)vmslots[(offset)]) 1.19 +#define VMSLOTS_INT(offset) (*((jint*)&vmslots[(offset)])) 1.20 +#define VMSLOTS_FLOAT(offset) (*((jfloat*)&vmslots[(offset)])) 1.21 +#define VMSLOTS_OBJECT(offset) ((oop)vmslots[(offset)]) 1.22 +#define VMSLOTS_DOUBLE(offset) (((VMJavaVal64*)&vmslots[(offset) - 1])->d) 1.23 +#define VMSLOTS_LONG(offset) (((VMJavaVal64*)&vmslots[(offset) - 1])->l) 1.24 + 1.25 +#define SET_VMSLOTS_SLOT(value, offset) (*(intptr_t*)&vmslots[(offset)] = *(intptr_t *)(value)) 1.26 +#define SET_VMSLOTS_ADDR(value, offset) (*((address *)&vmslots[(offset)]) = (value)) 1.27 +#define SET_VMSLOTS_INT(value, offset) (*((jint *)&vmslots[(offset)]) = (value)) 1.28 +#define SET_VMSLOTS_FLOAT(value, offset) (*((jfloat *)&vmslots[(offset)]) = (value)) 1.29 +#define SET_VMSLOTS_OBJECT(value, offset) (*((oop *)&vmslots[(offset)]) = (value)) 1.30 +#define SET_VMSLOTS_DOUBLE(value, offset) (((VMJavaVal64*)&vmslots[(offset) - 1])->d = (value)) 1.31 +#define SET_VMSLOTS_LONG(value, offset) (((VMJavaVal64*)&vmslots[(offset) - 1])->l = (value)) 1.32 + 1.33 #endif // CPU_ZERO_VM_BYTECODEINTERPRETER_ZERO_HPP