Print this page
Split |
Close |
Expand all |
Collapse all |
--- old/src/share/vm/c1/c1_CodeStubs.hpp
+++ new/src/share/vm/c1/c1_CodeStubs.hpp
1 1 /*
2 - * Copyright 1999-2006 Sun Microsystems, Inc. All Rights Reserved.
2 + * Copyright 1999-2010 Sun Microsystems, Inc. All Rights Reserved.
3 3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4 4 *
5 5 * This code is free software; you can redistribute it and/or modify it
6 6 * under the terms of the GNU General Public License version 2 only, as
7 7 * published by the Free Software Foundation.
8 8 *
9 9 * This code is distributed in the hope that it will be useful, but WITHOUT
10 10 * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
11 11 * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
12 12 * version 2 for more details (a copy is included in the LICENSE file that
13 13 * accompanied this code).
14 14 *
15 15 * You should have received a copy of the GNU General Public License version
16 16 * 2 along with this work; if not, write to the Free Software Foundation,
17 17 * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
18 18 *
19 19 * Please contact Sun Microsystems, Inc., 4150 Network Circle, Santa Clara,
20 20 * CA 95054 USA or visit www.sun.com if you need additional information or
21 21 * have any questions.
22 22 *
23 23 */
24 24
25 25 class CodeEmitInfo;
26 26 class LIR_Assembler;
27 27 class LIR_OpVisitState;
28 28
29 29 // CodeStubs are little 'out-of-line' pieces of code that
30 30 // usually handle slow cases of operations. All code stubs
31 31 // are collected and code is emitted at the end of the
32 32 // nmethod.
33 33
34 34 class CodeStub: public CompilationResourceObj {
35 35 protected:
36 36 Label _entry; // label at the stub entry point
37 37 Label _continuation; // label where stub continues, if any
38 38
39 39 public:
40 40 CodeStub() {}
41 41
42 42 // code generation
43 43 void assert_no_unbound_labels() { assert(!_entry.is_unbound() && !_continuation.is_unbound(), "unbound label"); }
44 44 virtual void emit_code(LIR_Assembler* e) = 0;
45 45 virtual CodeEmitInfo* info() const { return NULL; }
46 46 virtual bool is_exception_throw_stub() const { return false; }
47 47 virtual bool is_range_check_stub() const { return false; }
48 48 virtual bool is_divbyzero_stub() const { return false; }
49 49 #ifndef PRODUCT
50 50 virtual void print_name(outputStream* out) const = 0;
51 51 #endif
52 52
53 53 // label access
54 54 Label* entry() { return &_entry; }
55 55 Label* continuation() { return &_continuation; }
56 56 // for LIR
57 57 virtual void visit(LIR_OpVisitState* visit) {
58 58 #ifndef PRODUCT
59 59 if (LIRTracePeephole && Verbose) {
60 60 tty->print("no visitor for ");
61 61 print_name(tty);
62 62 tty->cr();
63 63 }
64 64 #endif
65 65 }
66 66 };
67 67
68 68
69 69 define_array(CodeStubArray, CodeStub*)
70 70 define_stack(_CodeStubList, CodeStubArray)
71 71
72 72 class CodeStubList: public _CodeStubList {
73 73 public:
74 74 CodeStubList(): _CodeStubList() {}
75 75
76 76 void append(CodeStub* stub) {
77 77 if (!contains(stub)) {
78 78 _CodeStubList::append(stub);
79 79 }
80 80 }
81 81 };
82 82
83 83 #ifdef TIERED
84 84 class CounterOverflowStub: public CodeStub {
85 85 private:
86 86 CodeEmitInfo* _info;
87 87 int _bci;
88 88
89 89 public:
90 90 CounterOverflowStub(CodeEmitInfo* info, int bci) : _info(info), _bci(bci) {
91 91 }
92 92
93 93 virtual void emit_code(LIR_Assembler* e);
94 94
95 95 virtual void visit(LIR_OpVisitState* visitor) {
96 96 visitor->do_slow_case(_info);
97 97 }
98 98
99 99 #ifndef PRODUCT
100 100 virtual void print_name(outputStream* out) const { out->print("CounterOverflowStub"); }
101 101 #endif // PRODUCT
102 102
103 103 };
104 104 #endif // TIERED
105 105
106 106 class ConversionStub: public CodeStub {
107 107 private:
108 108 Bytecodes::Code _bytecode;
109 109 LIR_Opr _input;
110 110 LIR_Opr _result;
111 111
112 112 static float float_zero;
113 113 static double double_zero;
114 114 public:
115 115 ConversionStub(Bytecodes::Code bytecode, LIR_Opr input, LIR_Opr result)
116 116 : _bytecode(bytecode), _input(input), _result(result) {
117 117 }
118 118
119 119 Bytecodes::Code bytecode() { return _bytecode; }
120 120 LIR_Opr input() { return _input; }
121 121 LIR_Opr result() { return _result; }
122 122
123 123 virtual void emit_code(LIR_Assembler* e);
124 124 virtual void visit(LIR_OpVisitState* visitor) {
125 125 visitor->do_slow_case();
126 126 visitor->do_input(_input);
127 127 visitor->do_output(_result);
128 128 }
129 129 #ifndef PRODUCT
130 130 virtual void print_name(outputStream* out) const { out->print("ConversionStub"); }
131 131 #endif // PRODUCT
132 132 };
133 133
134 134
135 135 // Throws ArrayIndexOutOfBoundsException by default but can be
136 136 // configured to throw IndexOutOfBoundsException in constructor
137 137 class RangeCheckStub: public CodeStub {
138 138 private:
139 139 CodeEmitInfo* _info;
140 140 LIR_Opr _index;
141 141 bool _throw_index_out_of_bounds_exception;
142 142
143 143 public:
144 144 RangeCheckStub(CodeEmitInfo* info, LIR_Opr index, bool throw_index_out_of_bounds_exception = false);
145 145 virtual void emit_code(LIR_Assembler* e);
146 146 virtual CodeEmitInfo* info() const { return _info; }
147 147 virtual bool is_exception_throw_stub() const { return true; }
148 148 virtual bool is_range_check_stub() const { return true; }
149 149 virtual void visit(LIR_OpVisitState* visitor) {
150 150 visitor->do_slow_case(_info);
151 151 visitor->do_input(_index);
152 152 }
153 153 #ifndef PRODUCT
154 154 virtual void print_name(outputStream* out) const { out->print("RangeCheckStub"); }
155 155 #endif // PRODUCT
156 156 };
157 157
158 158
159 159 class DivByZeroStub: public CodeStub {
160 160 private:
161 161 CodeEmitInfo* _info;
162 162 int _offset;
163 163
164 164 public:
165 165 DivByZeroStub(CodeEmitInfo* info)
166 166 : _info(info), _offset(-1) {
167 167 }
168 168 DivByZeroStub(int offset, CodeEmitInfo* info)
169 169 : _info(info), _offset(offset) {
170 170 }
171 171 virtual void emit_code(LIR_Assembler* e);
172 172 virtual CodeEmitInfo* info() const { return _info; }
173 173 virtual bool is_exception_throw_stub() const { return true; }
174 174 virtual bool is_divbyzero_stub() const { return true; }
175 175 virtual void visit(LIR_OpVisitState* visitor) {
176 176 visitor->do_slow_case(_info);
177 177 }
178 178 #ifndef PRODUCT
179 179 virtual void print_name(outputStream* out) const { out->print("DivByZeroStub"); }
180 180 #endif // PRODUCT
181 181 };
182 182
183 183
184 184 class ImplicitNullCheckStub: public CodeStub {
185 185 private:
186 186 CodeEmitInfo* _info;
187 187 int _offset;
188 188
189 189 public:
190 190 ImplicitNullCheckStub(int offset, CodeEmitInfo* info)
191 191 : _offset(offset), _info(info) {
192 192 }
193 193 virtual void emit_code(LIR_Assembler* e);
194 194 virtual CodeEmitInfo* info() const { return _info; }
195 195 virtual bool is_exception_throw_stub() const { return true; }
196 196 virtual void visit(LIR_OpVisitState* visitor) {
197 197 visitor->do_slow_case(_info);
198 198 }
199 199 #ifndef PRODUCT
200 200 virtual void print_name(outputStream* out) const { out->print("ImplicitNullCheckStub"); }
201 201 #endif // PRODUCT
202 202 };
203 203
204 204
205 205 class NewInstanceStub: public CodeStub {
206 206 private:
207 207 ciInstanceKlass* _klass;
208 208 LIR_Opr _klass_reg;
209 209 LIR_Opr _result;
210 210 CodeEmitInfo* _info;
211 211 Runtime1::StubID _stub_id;
212 212
213 213 public:
214 214 NewInstanceStub(LIR_Opr klass_reg, LIR_Opr result, ciInstanceKlass* klass, CodeEmitInfo* info, Runtime1::StubID stub_id);
215 215 virtual void emit_code(LIR_Assembler* e);
216 216 virtual CodeEmitInfo* info() const { return _info; }
217 217 virtual void visit(LIR_OpVisitState* visitor) {
218 218 visitor->do_slow_case(_info);
219 219 visitor->do_input(_klass_reg);
220 220 visitor->do_output(_result);
221 221 }
222 222 #ifndef PRODUCT
223 223 virtual void print_name(outputStream* out) const { out->print("NewInstanceStub"); }
224 224 #endif // PRODUCT
225 225 };
226 226
227 227
228 228 class NewTypeArrayStub: public CodeStub {
229 229 private:
230 230 LIR_Opr _klass_reg;
231 231 LIR_Opr _length;
232 232 LIR_Opr _result;
233 233 CodeEmitInfo* _info;
234 234
235 235 public:
236 236 NewTypeArrayStub(LIR_Opr klass_reg, LIR_Opr length, LIR_Opr result, CodeEmitInfo* info);
237 237 virtual void emit_code(LIR_Assembler* e);
238 238 virtual CodeEmitInfo* info() const { return _info; }
239 239 virtual void visit(LIR_OpVisitState* visitor) {
240 240 visitor->do_slow_case(_info);
241 241 visitor->do_input(_klass_reg);
242 242 visitor->do_input(_length);
243 243 assert(_result->is_valid(), "must be valid"); visitor->do_output(_result);
244 244 }
245 245 #ifndef PRODUCT
246 246 virtual void print_name(outputStream* out) const { out->print("NewTypeArrayStub"); }
247 247 #endif // PRODUCT
248 248 };
249 249
250 250
251 251 class NewObjectArrayStub: public CodeStub {
252 252 private:
253 253 LIR_Opr _klass_reg;
254 254 LIR_Opr _length;
255 255 LIR_Opr _result;
256 256 CodeEmitInfo* _info;
257 257
258 258 public:
259 259 NewObjectArrayStub(LIR_Opr klass_reg, LIR_Opr length, LIR_Opr result, CodeEmitInfo* info);
260 260 virtual void emit_code(LIR_Assembler* e);
261 261 virtual CodeEmitInfo* info() const { return _info; }
262 262 virtual void visit(LIR_OpVisitState* visitor) {
263 263 visitor->do_slow_case(_info);
264 264 visitor->do_input(_klass_reg);
265 265 visitor->do_input(_length);
266 266 assert(_result->is_valid(), "must be valid"); visitor->do_output(_result);
267 267 }
268 268 #ifndef PRODUCT
269 269 virtual void print_name(outputStream* out) const { out->print("NewObjectArrayStub"); }
270 270 #endif // PRODUCT
271 271 };
272 272
273 273
274 274 class MonitorAccessStub: public CodeStub {
275 275 protected:
276 276 LIR_Opr _obj_reg;
277 277 LIR_Opr _lock_reg;
278 278
279 279 public:
280 280 MonitorAccessStub(LIR_Opr obj_reg, LIR_Opr lock_reg) {
281 281 _obj_reg = obj_reg;
282 282 _lock_reg = lock_reg;
283 283 }
284 284
285 285 #ifndef PRODUCT
286 286 virtual void print_name(outputStream* out) const { out->print("MonitorAccessStub"); }
287 287 #endif // PRODUCT
288 288 };
289 289
290 290
291 291 class MonitorEnterStub: public MonitorAccessStub {
292 292 private:
293 293 CodeEmitInfo* _info;
294 294
295 295 public:
296 296 MonitorEnterStub(LIR_Opr obj_reg, LIR_Opr lock_reg, CodeEmitInfo* info);
297 297
298 298 virtual void emit_code(LIR_Assembler* e);
299 299 virtual CodeEmitInfo* info() const { return _info; }
300 300 virtual void visit(LIR_OpVisitState* visitor) {
301 301 visitor->do_input(_obj_reg);
302 302 visitor->do_input(_lock_reg);
303 303 visitor->do_slow_case(_info);
304 304 }
305 305 #ifndef PRODUCT
306 306 virtual void print_name(outputStream* out) const { out->print("MonitorEnterStub"); }
307 307 #endif // PRODUCT
308 308 };
309 309
310 310
311 311 class MonitorExitStub: public MonitorAccessStub {
312 312 private:
313 313 bool _compute_lock;
314 314 int _monitor_ix;
315 315
316 316 public:
317 317 MonitorExitStub(LIR_Opr lock_reg, bool compute_lock, int monitor_ix)
318 318 : MonitorAccessStub(LIR_OprFact::illegalOpr, lock_reg),
319 319 _compute_lock(compute_lock), _monitor_ix(monitor_ix) { }
320 320 virtual void emit_code(LIR_Assembler* e);
321 321 virtual void visit(LIR_OpVisitState* visitor) {
322 322 assert(_obj_reg->is_illegal(), "unused");
323 323 if (_compute_lock) {
324 324 visitor->do_temp(_lock_reg);
325 325 } else {
326 326 visitor->do_input(_lock_reg);
327 327 }
328 328 }
329 329 #ifndef PRODUCT
330 330 virtual void print_name(outputStream* out) const { out->print("MonitorExitStub"); }
331 331 #endif // PRODUCT
332 332 };
333 333
334 334
335 335 class PatchingStub: public CodeStub {
336 336 public:
337 337 enum PatchID {
338 338 access_field_id,
339 339 load_klass_id
340 340 };
341 341 enum constants {
342 342 patch_info_size = 3
343 343 };
344 344 private:
345 345 PatchID _id;
346 346 address _pc_start;
347 347 int _bytes_to_copy;
348 348 Label _patched_code_entry;
349 349 Label _patch_site_entry;
350 350 Label _patch_site_continuation;
351 351 Register _obj;
352 352 CodeEmitInfo* _info;
353 353 int _oop_index; // index of the patchable oop in nmethod oop table if needed
354 354 static int _patch_info_offset;
355 355
356 356 void align_patch_site(MacroAssembler* masm);
357 357
358 358 public:
359 359 static int patch_info_offset() { return _patch_info_offset; }
360 360
361 361 PatchingStub(MacroAssembler* masm, PatchID id, int oop_index = -1):
362 362 _id(id)
363 363 , _info(NULL)
364 364 , _oop_index(oop_index) {
365 365 if (os::is_MP()) {
366 366 // force alignment of patch sites on MP hardware so we
367 367 // can guarantee atomic writes to the patch site.
368 368 align_patch_site(masm);
369 369 }
370 370 _pc_start = masm->pc();
371 371 masm->bind(_patch_site_entry);
372 372 }
373 373
374 374 void install(MacroAssembler* masm, LIR_PatchCode patch_code, Register obj, CodeEmitInfo* info) {
375 375 _info = info;
376 376 _obj = obj;
377 377 masm->bind(_patch_site_continuation);
378 378 _bytes_to_copy = masm->pc() - pc_start();
379 379 if (_id == PatchingStub::access_field_id) {
380 380 // embed a fixed offset to handle long patches which need to be offset by a word.
381 381 // the patching code will just add the field offset field to this offset so
382 382 // that we can refernce either the high or low word of a double word field.
383 383 int field_offset = 0;
384 384 switch (patch_code) {
385 385 case lir_patch_low: field_offset = lo_word_offset_in_bytes; break;
386 386 case lir_patch_high: field_offset = hi_word_offset_in_bytes; break;
387 387 case lir_patch_normal: field_offset = 0; break;
388 388 default: ShouldNotReachHere();
389 389 }
390 390 NativeMovRegMem* n_move = nativeMovRegMem_at(pc_start());
391 391 n_move->set_offset(field_offset);
392 392 } else if (_id == load_klass_id) {
393 393 assert(_obj != noreg, "must have register object for load_klass");
394 394 #ifdef ASSERT
395 395 // verify that we're pointing at a NativeMovConstReg
396 396 nativeMovConstReg_at(pc_start());
397 397 #endif
398 398 } else {
399 399 ShouldNotReachHere();
400 400 }
401 401 assert(_bytes_to_copy <= (masm->pc() - pc_start()), "not enough bytes");
402 402 }
403 403
404 404 address pc_start() const { return _pc_start; }
405 405 PatchID id() const { return _id; }
406 406
407 407 virtual void emit_code(LIR_Assembler* e);
↓ open down ↓ |
395 lines elided |
↑ open up ↑ |
408 408 virtual CodeEmitInfo* info() const { return _info; }
409 409 virtual void visit(LIR_OpVisitState* visitor) {
410 410 visitor->do_slow_case(_info);
411 411 }
412 412 #ifndef PRODUCT
413 413 virtual void print_name(outputStream* out) const { out->print("PatchingStub"); }
414 414 #endif // PRODUCT
415 415 };
416 416
417 417
418 +//------------------------------------------------------------------------------
419 +// DeoptimizeStub
420 +//
421 +class DeoptimizeStub : public CodeStub {
422 +private:
423 + CodeEmitInfo* _info;
424 +
425 +public:
426 + DeoptimizeStub(CodeEmitInfo* info) : _info(new CodeEmitInfo(info)) {}
427 +
428 + virtual void emit_code(LIR_Assembler* e);
429 + virtual CodeEmitInfo* info() const { return _info; }
430 + virtual bool is_exception_throw_stub() const { return true; }
431 + virtual void visit(LIR_OpVisitState* visitor) {
432 + visitor->do_slow_case(_info);
433 + }
434 +#ifndef PRODUCT
435 + virtual void print_name(outputStream* out) const { out->print("DeoptimizeStub"); }
436 +#endif // PRODUCT
437 +};
438 +
439 +
418 440 class SimpleExceptionStub: public CodeStub {
419 441 private:
420 442 LIR_Opr _obj;
421 443 Runtime1::StubID _stub;
422 444 CodeEmitInfo* _info;
423 445
424 446 public:
425 447 SimpleExceptionStub(Runtime1::StubID stub, LIR_Opr obj, CodeEmitInfo* info):
426 448 _obj(obj), _info(info), _stub(stub) {
427 449 }
428 450
429 451 virtual void emit_code(LIR_Assembler* e);
430 452 virtual CodeEmitInfo* info() const { return _info; }
431 453 virtual bool is_exception_throw_stub() const { return true; }
432 454 virtual void visit(LIR_OpVisitState* visitor) {
433 455 if (_obj->is_valid()) visitor->do_input(_obj);
434 456 visitor->do_slow_case(_info);
435 457 }
436 458 #ifndef PRODUCT
437 459 virtual void print_name(outputStream* out) const { out->print("SimpleExceptionStub"); }
438 460 #endif // PRODUCT
439 461 };
440 462
441 463
442 464
443 465 class ArrayStoreExceptionStub: public CodeStub {
444 466 private:
445 467 CodeEmitInfo* _info;
446 468
447 469 public:
448 470 ArrayStoreExceptionStub(CodeEmitInfo* info);
449 471 virtual void emit_code(LIR_Assembler* emit);
450 472 virtual CodeEmitInfo* info() const { return _info; }
451 473 virtual bool is_exception_throw_stub() const { return true; }
452 474 virtual void visit(LIR_OpVisitState* visitor) {
453 475 visitor->do_slow_case(_info);
454 476 }
455 477 #ifndef PRODUCT
456 478 virtual void print_name(outputStream* out) const { out->print("ArrayStoreExceptionStub"); }
457 479 #endif // PRODUCT
458 480 };
459 481
460 482
461 483 class ArrayCopyStub: public CodeStub {
462 484 private:
463 485 LIR_OpArrayCopy* _op;
464 486
465 487 public:
466 488 ArrayCopyStub(LIR_OpArrayCopy* op): _op(op) { }
467 489
468 490 LIR_Opr src() const { return _op->src(); }
469 491 LIR_Opr src_pos() const { return _op->src_pos(); }
470 492 LIR_Opr dst() const { return _op->dst(); }
471 493 LIR_Opr dst_pos() const { return _op->dst_pos(); }
472 494 LIR_Opr length() const { return _op->length(); }
473 495 LIR_Opr tmp() const { return _op->tmp(); }
474 496
475 497 virtual void emit_code(LIR_Assembler* e);
476 498 virtual CodeEmitInfo* info() const { return _op->info(); }
477 499 virtual void visit(LIR_OpVisitState* visitor) {
478 500 // don't pass in the code emit info since it's processed in the fast path
479 501 visitor->do_slow_case();
480 502 }
481 503 #ifndef PRODUCT
482 504 virtual void print_name(outputStream* out) const { out->print("ArrayCopyStub"); }
483 505 #endif // PRODUCT
484 506 };
485 507
486 508 //////////////////////////////////////////////////////////////////////////////////////////
487 509 #ifndef SERIALGC
488 510
489 511 // Code stubs for Garbage-First barriers.
490 512 class G1PreBarrierStub: public CodeStub {
491 513 private:
492 514 LIR_Opr _addr;
493 515 LIR_Opr _pre_val;
494 516 LIR_PatchCode _patch_code;
495 517 CodeEmitInfo* _info;
496 518
497 519 public:
498 520 // pre_val (a temporary register) must be a register;
499 521 // addr (the address of the field to be read) must be a LIR_Address
500 522 G1PreBarrierStub(LIR_Opr addr, LIR_Opr pre_val, LIR_PatchCode patch_code, CodeEmitInfo* info) :
501 523 _addr(addr), _pre_val(pre_val), _patch_code(patch_code), _info(info)
502 524 {
503 525 assert(_pre_val->is_register(), "should be temporary register");
504 526 assert(_addr->is_address(), "should be the address of the field");
505 527 }
506 528
507 529 LIR_Opr addr() const { return _addr; }
508 530 LIR_Opr pre_val() const { return _pre_val; }
509 531 LIR_PatchCode patch_code() const { return _patch_code; }
510 532 CodeEmitInfo* info() const { return _info; }
511 533
512 534 virtual void emit_code(LIR_Assembler* e);
513 535 virtual void visit(LIR_OpVisitState* visitor) {
514 536 // don't pass in the code emit info since it's processed in the fast
515 537 // path
516 538 if (_info != NULL)
517 539 visitor->do_slow_case(_info);
518 540 else
519 541 visitor->do_slow_case();
520 542 visitor->do_input(_addr);
521 543 visitor->do_temp(_pre_val);
522 544 }
523 545 #ifndef PRODUCT
524 546 virtual void print_name(outputStream* out) const { out->print("G1PreBarrierStub"); }
525 547 #endif // PRODUCT
526 548 };
527 549
528 550 class G1PostBarrierStub: public CodeStub {
529 551 private:
530 552 LIR_Opr _addr;
531 553 LIR_Opr _new_val;
532 554
533 555 static jbyte* _byte_map_base;
534 556 static jbyte* byte_map_base_slow();
535 557 static jbyte* byte_map_base() {
536 558 if (_byte_map_base == NULL) {
537 559 _byte_map_base = byte_map_base_slow();
538 560 }
539 561 return _byte_map_base;
540 562 }
541 563
542 564 public:
543 565 // addr (the address of the object head) and new_val must be registers.
544 566 G1PostBarrierStub(LIR_Opr addr, LIR_Opr new_val): _addr(addr), _new_val(new_val) { }
545 567
546 568 LIR_Opr addr() const { return _addr; }
547 569 LIR_Opr new_val() const { return _new_val; }
548 570
549 571 virtual void emit_code(LIR_Assembler* e);
550 572 virtual void visit(LIR_OpVisitState* visitor) {
551 573 // don't pass in the code emit info since it's processed in the fast path
552 574 visitor->do_slow_case();
553 575 visitor->do_input(_addr);
554 576 visitor->do_input(_new_val);
555 577 }
556 578 #ifndef PRODUCT
557 579 virtual void print_name(outputStream* out) const { out->print("G1PostBarrierStub"); }
558 580 #endif // PRODUCT
559 581 };
560 582
561 583 #endif // SERIALGC
562 584 //////////////////////////////////////////////////////////////////////////////////////////
↓ open down ↓ |
135 lines elided |
↑ open up ↑ |
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX