Mercurial > hg > truffle
comparison src/cpu/zero/vm/bytecodeInterpreter_zero.hpp @ 2480:4b95bbb36464
7035870: JSR 292: Zero support
Summary: This adds support for JSR 292 to Zero.
Reviewed-by: twisti
Contributed-by: Gary Benson <gbenson@redhat.com>
author | twisti |
---|---|
date | Tue, 12 Apr 2011 02:40:23 -0700 |
parents | f95d63e2154a |
children | da91efe96a93 |
comparison
equal
deleted
inserted
replaced
2479:15c9a0e16269 | 2480:4b95bbb36464 |
---|---|
1 /* | 1 /* |
2 * Copyright (c) 2002, 2010, Oracle and/or its affiliates. All rights reserved. | 2 * Copyright (c) 2002, 2010, Oracle and/or its affiliates. All rights reserved. |
3 * Copyright 2007, 2008 Red Hat, Inc. | 3 * Copyright 2007, 2008, 2011 Red Hat, Inc. |
4 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. | 4 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. |
5 * | 5 * |
6 * This code is free software; you can redistribute it and/or modify it | 6 * This code is free software; you can redistribute it and/or modify it |
7 * under the terms of the GNU General Public License version 2 only, as | 7 * under the terms of the GNU General Public License version 2 only, as |
8 * published by the Free Software Foundation. | 8 * published by the Free Software Foundation. |
148 #define SET_LOCALS_DOUBLE_FROM_ADDR(addr, offset) (((VMJavaVal64*)&locals[-((offset)+1)])->d = \ | 148 #define SET_LOCALS_DOUBLE_FROM_ADDR(addr, offset) (((VMJavaVal64*)&locals[-((offset)+1)])->d = \ |
149 ((VMJavaVal64*)(addr))->d) | 149 ((VMJavaVal64*)(addr))->d) |
150 #define SET_LOCALS_LONG_FROM_ADDR(addr, offset) (((VMJavaVal64*)&locals[-((offset)+1)])->l = \ | 150 #define SET_LOCALS_LONG_FROM_ADDR(addr, offset) (((VMJavaVal64*)&locals[-((offset)+1)])->l = \ |
151 ((VMJavaVal64*)(addr))->l) | 151 ((VMJavaVal64*)(addr))->l) |
152 | 152 |
153 // VMSlots implementation | |
154 | |
155 #define VMSLOTS_SLOT(offset) ((intptr_t*)&vmslots[(offset)]) | |
156 #define VMSLOTS_ADDR(offset) ((address)vmslots[(offset)]) | |
157 #define VMSLOTS_INT(offset) (*((jint*)&vmslots[(offset)])) | |
158 #define VMSLOTS_FLOAT(offset) (*((jfloat*)&vmslots[(offset)])) | |
159 #define VMSLOTS_OBJECT(offset) ((oop)vmslots[(offset)]) | |
160 #define VMSLOTS_DOUBLE(offset) (((VMJavaVal64*)&vmslots[(offset) - 1])->d) | |
161 #define VMSLOTS_LONG(offset) (((VMJavaVal64*)&vmslots[(offset) - 1])->l) | |
162 | |
163 #define SET_VMSLOTS_SLOT(value, offset) (*(intptr_t*)&vmslots[(offset)] = *(intptr_t *)(value)) | |
164 #define SET_VMSLOTS_ADDR(value, offset) (*((address *)&vmslots[(offset)]) = (value)) | |
165 #define SET_VMSLOTS_INT(value, offset) (*((jint *)&vmslots[(offset)]) = (value)) | |
166 #define SET_VMSLOTS_FLOAT(value, offset) (*((jfloat *)&vmslots[(offset)]) = (value)) | |
167 #define SET_VMSLOTS_OBJECT(value, offset) (*((oop *)&vmslots[(offset)]) = (value)) | |
168 #define SET_VMSLOTS_DOUBLE(value, offset) (((VMJavaVal64*)&vmslots[(offset) - 1])->d = (value)) | |
169 #define SET_VMSLOTS_LONG(value, offset) (((VMJavaVal64*)&vmslots[(offset) - 1])->l = (value)) | |
170 | |
153 #endif // CPU_ZERO_VM_BYTECODEINTERPRETER_ZERO_HPP | 171 #endif // CPU_ZERO_VM_BYTECODEINTERPRETER_ZERO_HPP |