1 /* |
1 /* |
2 * Copyright 1999-2009 Sun Microsystems, Inc. All Rights Reserved. |
2 * Copyright 1999-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. |
315 const int ic_cmp_size = LP64_ONLY(10) NOT_LP64(9); |
315 const int ic_cmp_size = LP64_ONLY(10) NOT_LP64(9); |
316 assert(offset() - start_offset == ic_cmp_size, "check alignment in emit_method_entry"); |
316 assert(offset() - start_offset == ic_cmp_size, "check alignment in emit_method_entry"); |
317 } |
317 } |
318 |
318 |
319 |
319 |
320 void C1_MacroAssembler::method_exit(bool restore_frame) { |
|
321 if (restore_frame) { |
|
322 leave(); |
|
323 } |
|
324 ret(0); |
|
325 } |
|
326 |
|
327 |
|
328 void C1_MacroAssembler::build_frame(int frame_size_in_bytes) { |
320 void C1_MacroAssembler::build_frame(int frame_size_in_bytes) { |
329 // Make sure there is enough stack space for this method's activation. |
321 // Make sure there is enough stack space for this method's activation. |
330 // Note that we do this before doing an enter(). This matches the |
322 // Note that we do this before doing an enter(). This matches the |
331 // ordering of C2's stack overflow check / rsp decrement and allows |
323 // ordering of C2's stack overflow check / rsp decrement and allows |
332 // the SharedRuntime stack overflow handling to be consistent |
324 // the SharedRuntime stack overflow handling to be consistent |
333 // between the two compilers. |
325 // between the two compilers. |
334 generate_stack_overflow_check(frame_size_in_bytes); |
326 generate_stack_overflow_check(frame_size_in_bytes); |
335 |
327 |
336 enter(); |
328 push(rbp); |
337 #ifdef TIERED |
329 #ifdef TIERED |
338 // c2 leaves fpu stack dirty. Clean it on entry |
330 // c2 leaves fpu stack dirty. Clean it on entry |
339 if (UseSSE < 2 ) { |
331 if (UseSSE < 2 ) { |
340 empty_FPU_stack(); |
332 empty_FPU_stack(); |
341 } |
333 } |
342 #endif // TIERED |
334 #endif // TIERED |
343 decrement(rsp, frame_size_in_bytes); // does not emit code for frame_size == 0 |
335 decrement(rsp, frame_size_in_bytes); // does not emit code for frame_size == 0 |
|
336 } |
|
337 |
|
338 |
|
339 void C1_MacroAssembler::remove_frame(int frame_size_in_bytes) { |
|
340 increment(rsp, frame_size_in_bytes); // Does not emit code for frame_size == 0 |
|
341 pop(rbp); |
344 } |
342 } |
345 |
343 |
346 |
344 |
347 void C1_MacroAssembler::unverified_entry(Register receiver, Register ic_klass) { |
345 void C1_MacroAssembler::unverified_entry(Register receiver, Register ic_klass) { |
348 if (C1Breakpoint) int3(); |
346 if (C1Breakpoint) int3(); |