7 * published by the Free Software Foundation.
8 *
9 * This code is distributed in the hope that it will be useful, but WITHOUT
10 * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
11 * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
12 * version 2 for more details (a copy is included in the LICENSE file that
13 * accompanied this code).
14 *
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,
17 * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
18 *
19 * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
20 * or visit www.oracle.com if you need additional information or have any
21 * questions.
22 *
23 */
24
25 #include "precompiled.hpp"
26 #include "gc/shared/c1/cardTableBarrierSetC1.hpp"
27 #include "gc/shared/cardTableBarrierSet.hpp"
28 #include "utilities/macros.hpp"
29
30 #ifdef ASSERT
31 #define __ gen->lir(__FILE__, __LINE__)->
32 #else
33 #define __ gen->lir()->
34 #endif
35
36 void CardTableBarrierSetC1::post_barrier(LIRAccess& access, LIR_OprDesc* addr, LIR_OprDesc* new_val) {
37 DecoratorSet decorators = access.decorators();
38 LIRGenerator* gen = access.gen();
39 bool in_heap = (decorators & IN_HEAP) != 0;
40 if (!in_heap) {
41 return;
42 }
43
44 BarrierSet* bs = BarrierSet::barrier_set();
45 CardTableBarrierSet* ctbs = barrier_set_cast<CardTableBarrierSet>(bs);
46 CardTable* ct = ctbs->card_table();
|
7 * published by the Free Software Foundation.
8 *
9 * This code is distributed in the hope that it will be useful, but WITHOUT
10 * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
11 * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
12 * version 2 for more details (a copy is included in the LICENSE file that
13 * accompanied this code).
14 *
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,
17 * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
18 *
19 * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
20 * or visit www.oracle.com if you need additional information or have any
21 * questions.
22 *
23 */
24
25 #include "precompiled.hpp"
26 #include "gc/shared/c1/cardTableBarrierSetC1.hpp"
27 #include "gc/shared/cardTable.hpp"
28 #include "gc/shared/cardTableBarrierSet.hpp"
29 #include "utilities/macros.hpp"
30
31 #ifdef ASSERT
32 #define __ gen->lir(__FILE__, __LINE__)->
33 #else
34 #define __ gen->lir()->
35 #endif
36
37 void CardTableBarrierSetC1::post_barrier(LIRAccess& access, LIR_OprDesc* addr, LIR_OprDesc* new_val) {
38 DecoratorSet decorators = access.decorators();
39 LIRGenerator* gen = access.gen();
40 bool in_heap = (decorators & IN_HEAP) != 0;
41 if (!in_heap) {
42 return;
43 }
44
45 BarrierSet* bs = BarrierSet::barrier_set();
46 CardTableBarrierSet* ctbs = barrier_set_cast<CardTableBarrierSet>(bs);
47 CardTable* ct = ctbs->card_table();
|