Mercurial > hg > truffle
comparison src/cpu/x86/vm/c1_CodeStubs_x86.cpp @ 1930:2d26b0046e0d
Merge.
author | Thomas Wuerthinger <wuerthinger@ssw.jku.at> |
---|---|
date | Tue, 30 Nov 2010 14:53:30 +0100 |
parents | 07a218de38cb |
children | f95d63e2154a |
comparison
equal
deleted
inserted
replaced
1484:6b7001391c97 | 1930:2d26b0046e0d |
---|---|
1 /* | 1 /* |
2 * Copyright 1999-2010 Sun Microsystems, Inc. All Rights Reserved. | 2 * Copyright (c) 1999, 2010, Oracle and/or its affiliates. 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. |
14 * | 14 * |
15 * You should have received a copy of the GNU General Public License version | 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, | 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. | 17 * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. |
18 * | 18 * |
19 * Please contact Sun Microsystems, Inc., 4150 Network Circle, Santa Clara, | 19 * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA |
20 * CA 95054 USA or visit www.sun.com if you need additional information or | 20 * or visit www.oracle.com if you need additional information or have any |
21 * have any questions. | 21 * questions. |
22 * | 22 * |
23 */ | 23 */ |
24 | 24 |
25 #include "incls/_precompiled.incl" | 25 #include "incls/_precompiled.incl" |
26 #include "incls/_c1_CodeStubs_x86.cpp.incl" | 26 #include "incls/_c1_CodeStubs_x86.cpp.incl" |
66 | 66 |
67 __ bind(do_return); | 67 __ bind(do_return); |
68 __ jmp(_continuation); | 68 __ jmp(_continuation); |
69 } | 69 } |
70 | 70 |
71 #ifdef TIERED | |
72 void CounterOverflowStub::emit_code(LIR_Assembler* ce) { | 71 void CounterOverflowStub::emit_code(LIR_Assembler* ce) { |
73 __ bind(_entry); | 72 __ bind(_entry); |
73 ce->store_parameter(_method->as_register(), 1); | |
74 ce->store_parameter(_bci, 0); | 74 ce->store_parameter(_bci, 0); |
75 __ call(RuntimeAddress(Runtime1::entry_for(Runtime1::counter_overflow_id))); | 75 __ call(RuntimeAddress(Runtime1::entry_for(Runtime1::counter_overflow_id))); |
76 ce->add_call_info_here(_info); | 76 ce->add_call_info_here(_info); |
77 ce->verify_oop_map(_info); | 77 ce->verify_oop_map(_info); |
78 | 78 __ jmp(_continuation); |
79 __ jmp(_continuation); | 79 } |
80 } | |
81 #endif // TIERED | |
82 | |
83 | |
84 | 80 |
85 RangeCheckStub::RangeCheckStub(CodeEmitInfo* info, LIR_Opr index, | 81 RangeCheckStub::RangeCheckStub(CodeEmitInfo* info, LIR_Opr index, |
86 bool throw_index_out_of_bounds_exception) | 82 bool throw_index_out_of_bounds_exception) |
87 : _throw_index_out_of_bounds_exception(throw_index_out_of_bounds_exception) | 83 : _throw_index_out_of_bounds_exception(throw_index_out_of_bounds_exception) |
88 , _index(index) | 84 , _index(index) |
89 { | 85 { |
90 _info = info == NULL ? NULL : new CodeEmitInfo(info); | 86 assert(info != NULL, "must have info"); |
87 _info = new CodeEmitInfo(info); | |
91 } | 88 } |
92 | 89 |
93 | 90 |
94 void RangeCheckStub::emit_code(LIR_Assembler* ce) { | 91 void RangeCheckStub::emit_code(LIR_Assembler* ce) { |
95 __ bind(_entry); | 92 __ bind(_entry); |
500 assert(addr()->is_register(), "Precondition."); | 497 assert(addr()->is_register(), "Precondition."); |
501 assert(new_val()->is_register(), "Precondition."); | 498 assert(new_val()->is_register(), "Precondition."); |
502 Register new_val_reg = new_val()->as_register(); | 499 Register new_val_reg = new_val()->as_register(); |
503 __ cmpptr(new_val_reg, (int32_t) NULL_WORD); | 500 __ cmpptr(new_val_reg, (int32_t) NULL_WORD); |
504 __ jcc(Assembler::equal, _continuation); | 501 __ jcc(Assembler::equal, _continuation); |
505 ce->store_parameter(addr()->as_register(), 0); | 502 ce->store_parameter(addr()->as_pointer_register(), 0); |
506 __ call(RuntimeAddress(Runtime1::entry_for(Runtime1::g1_post_barrier_slow_id))); | 503 __ call(RuntimeAddress(Runtime1::entry_for(Runtime1::g1_post_barrier_slow_id))); |
507 __ jmp(_continuation); | 504 __ jmp(_continuation); |
508 } | 505 } |
509 | 506 |
510 #endif // SERIALGC | 507 #endif // SERIALGC |