1 /* |
1 /* |
2 * Copyright 2003-2007 Sun Microsystems, Inc. All Rights Reserved. |
2 * Copyright 2003-2008 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. |
1225 |
1225 |
1226 __ shrq(start, CardTableModRefBS::card_shift); |
1226 __ shrq(start, CardTableModRefBS::card_shift); |
1227 __ shrq(end, CardTableModRefBS::card_shift); |
1227 __ shrq(end, CardTableModRefBS::card_shift); |
1228 __ subq(end, start); // number of bytes to copy |
1228 __ subq(end, start); // number of bytes to copy |
1229 |
1229 |
|
1230 intptr_t disp = (intptr_t) ct->byte_map_base; |
|
1231 if (__ is_simm32(disp)) { |
|
1232 Address cardtable(noreg, noreg, Address::no_scale, disp); |
|
1233 __ lea(scratch, cardtable); |
|
1234 } else { |
|
1235 ExternalAddress cardtable((address)disp); |
|
1236 __ lea(scratch, cardtable); |
|
1237 } |
|
1238 |
1230 const Register count = end; // 'end' register contains bytes count now |
1239 const Register count = end; // 'end' register contains bytes count now |
1231 __ lea(scratch, ExternalAddress((address)ct->byte_map_base)); |
|
1232 __ addq(start, scratch); |
1240 __ addq(start, scratch); |
1233 __ BIND(L_loop); |
1241 __ BIND(L_loop); |
1234 __ movb(Address(start, count, Address::times_1), 0); |
1242 __ movb(Address(start, count, Address::times_1), 0); |
1235 __ decrementq(count); |
1243 __ decrementq(count); |
1236 __ jcc(Assembler::greaterEqual, L_loop); |
1244 __ jcc(Assembler::greaterEqual, L_loop); |