comparison src/cpu/x86/vm/interp_masm_x86_64.hpp @ 1506:2338d41fbd81

6943304: remove tagged stack interpreter Reviewed-by: coleenp, never, gbenson
author twisti
date Fri, 30 Apr 2010 08:37:24 -0700
parents 87684f1a88b5
children c18cbe5936b8 ab102d5d923e
comparison
equal deleted inserted replaced
1505:0c5b3cf3c1f5 1506:2338d41fbd81
1 /* 1 /*
2 * Copyright 2003-2009 Sun Microsystems, Inc. All Rights Reserved. 2 * Copyright 2003-2010 Sun Microsystems, Inc. All Rights Reserved.
3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. 3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4 * 4 *
5 * This code is free software; you can redistribute it and/or modify it 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 6 * under the terms of the GNU General Public License version 2 only, as
7 * published by the Free Software Foundation. 7 * published by the Free Software Foundation.
118 void push(int32_t imm ) { ((MacroAssembler*)this)->push(imm); } 118 void push(int32_t imm ) { ((MacroAssembler*)this)->push(imm); }
119 119
120 void pop(TosState state); // transition vtos -> state 120 void pop(TosState state); // transition vtos -> state
121 void push(TosState state); // transition state -> vtos 121 void push(TosState state); // transition state -> vtos
122 122
123 // Tagged stack support, pop and push both tag and value. 123 void empty_expression_stack() {
124 void pop_ptr(Register r, Register tag);
125 void push_ptr(Register r, Register tag);
126 #endif // CC_INTERP
127
128 DEBUG_ONLY(void verify_stack_tag(frame::Tag t);)
129
130 #ifndef CC_INTERP
131
132 // Tagged stack helpers for swap and dup
133 void load_ptr_and_tag(int n, Register val, Register tag);
134 void store_ptr_and_tag(int n, Register val, Register tag);
135
136 // Tagged Local support
137 void tag_local(frame::Tag tag, int n);
138 void tag_local(Register tag, int n);
139 void tag_local(frame::Tag tag, Register idx);
140 void tag_local(Register tag, Register idx);
141
142 #ifdef ASSERT
143 void verify_local_tag(frame::Tag tag, int n);
144 void verify_local_tag(frame::Tag tag, Register idx);
145 #endif // ASSERT
146
147
148 void empty_expression_stack()
149 {
150 movptr(rsp, Address(rbp, frame::interpreter_frame_monitor_block_top_offset * wordSize)); 124 movptr(rsp, Address(rbp, frame::interpreter_frame_monitor_block_top_offset * wordSize));
151 // NULL last_sp until next java call 125 // NULL last_sp until next java call
152 movptr(Address(rbp, frame::interpreter_frame_last_sp_offset * wordSize), (int32_t)NULL_WORD); 126 movptr(Address(rbp, frame::interpreter_frame_last_sp_offset * wordSize), (int32_t)NULL_WORD);
153 } 127 }
128
129 // Helpers for swap and dup
130 void load_ptr(int n, Register val);
131 void store_ptr(int n, Register val);
154 132
155 // Super call_VM calls - correspond to MacroAssembler::call_VM(_leaf) calls 133 // Super call_VM calls - correspond to MacroAssembler::call_VM(_leaf) calls
156 void super_call_VM_leaf(address entry_point); 134 void super_call_VM_leaf(address entry_point);
157 void super_call_VM_leaf(address entry_point, Register arg_1); 135 void super_call_VM_leaf(address entry_point, Register arg_1);
158 void super_call_VM_leaf(address entry_point, Register arg_1, Register arg_2); 136 void super_call_VM_leaf(address entry_point, Register arg_1, Register arg_2);