358 uint64_t limes = UINT64_C(1) << w;
359 return x < limes;
360 }
361
362 static bool is_uimm12(uint64_t x) { return is_uimm(x, 12); }
363 static bool is_uimm32(uint64_t x) { return is_uimm(x, 32); }
364
365 // Accessors
366 CodeSection* code_section() const { return _code_section; }
367 CodeBuffer* code() const { return code_section()->outer(); }
368 int sect() const { return code_section()->index(); }
369 address pc() const { return code_section()->end(); }
370 address begin() const { return code_section()->start(); }
371 int offset() const { return code_section()->size(); }
372 int locator() const { return CodeBuffer::locator(offset(), sect()); }
373
374 OopRecorder* oop_recorder() const { return _oop_recorder; }
375 void set_oop_recorder(OopRecorder* r) { _oop_recorder = r; }
376
377 void register_skipped(int size) { code_section()->register_skipped(size); }
378
379 address inst_mark() const { return code_section()->mark(); }
380 void set_inst_mark() { code_section()->set_mark(); }
381 void set_inst_mark(address addr) { code_section()->set_mark(addr); }
382 void clear_inst_mark() { code_section()->clear_mark(); }
383 void set_inst_end(address addr) { code_section()->set_end(addr); }
384
385 // Constants in code
386 void relocate(RelocationHolder const& rspec, int format = 0) {
387 assert(!pd_check_instruction_mark()
388 || inst_mark() == nullptr || inst_mark() == code_section()->end(),
389 "call relocate() between instructions");
390 code_section()->relocate(code_section()->end(), rspec, format);
391 }
392 void relocate( relocInfo::relocType rtype, int format = 0) {
393 code_section()->relocate(code_section()->end(), rtype, format);
394 }
395 void relocate(address addr, relocInfo::relocType rtype, int format = 0) {
396 code_section()->relocate(addr, rtype, format);
397 }
|
358 uint64_t limes = UINT64_C(1) << w;
359 return x < limes;
360 }
361
362 static bool is_uimm12(uint64_t x) { return is_uimm(x, 12); }
363 static bool is_uimm32(uint64_t x) { return is_uimm(x, 32); }
364
365 // Accessors
366 CodeSection* code_section() const { return _code_section; }
367 CodeBuffer* code() const { return code_section()->outer(); }
368 int sect() const { return code_section()->index(); }
369 address pc() const { return code_section()->end(); }
370 address begin() const { return code_section()->start(); }
371 int offset() const { return code_section()->size(); }
372 int locator() const { return CodeBuffer::locator(offset(), sect()); }
373
374 OopRecorder* oop_recorder() const { return _oop_recorder; }
375 void set_oop_recorder(OopRecorder* r) { _oop_recorder = r; }
376
377 void register_skipped(int size) { code_section()->register_skipped(size); }
378 void set_skipped(int size) { code_section()->set_skipped(size); }
379 int get_skipped() { return code_section()->get_skipped(); }
380
381 address inst_mark() const { return code_section()->mark(); }
382 void set_inst_mark() { code_section()->set_mark(); }
383 void set_inst_mark(address addr) { code_section()->set_mark(addr); }
384 void clear_inst_mark() { code_section()->clear_mark(); }
385 void set_inst_end(address addr) { code_section()->set_end(addr); }
386
387 // Constants in code
388 void relocate(RelocationHolder const& rspec, int format = 0) {
389 assert(!pd_check_instruction_mark()
390 || inst_mark() == nullptr || inst_mark() == code_section()->end(),
391 "call relocate() between instructions");
392 code_section()->relocate(code_section()->end(), rspec, format);
393 }
394 void relocate( relocInfo::relocType rtype, int format = 0) {
395 code_section()->relocate(code_section()->end(), rtype, format);
396 }
397 void relocate(address addr, relocInfo::relocType rtype, int format = 0) {
398 code_section()->relocate(addr, rtype, format);
399 }
|