1
1
/*
2
2
* Copyright (c) 1997, 2020, Oracle and/or its affiliates. All rights reserved.
3
- * Copyright (c) 2012, 2019 SAP SE. All rights reserved.
3
+ * Copyright (c) 2012, 2020 SAP SE. All rights reserved.
4
4
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
5
5
*
6
6
* This code is free software; you can redistribute it and/or modify it
@@ -177,6 +177,7 @@ void NativeFarCall::verify() {
177
177
address NativeMovConstReg::next_instruction_address () const {
178
178
#ifdef ASSERT
179
179
CodeBlob* nm = CodeCache::find_blob (instruction_address ());
180
+ assert (nm != NULL , " Could not find code blob" );
180
181
assert (!MacroAssembler::is_set_narrow_oop (addr_at (0 ), nm->content_begin ()), " Should not patch narrow oop here" );
181
182
#endif
182
183
@@ -195,6 +196,7 @@ intptr_t NativeMovConstReg::data() const {
195
196
}
196
197
197
198
CodeBlob* cb = CodeCache::find_blob_unsafe (addr);
199
+ assert (cb != NULL , " Could not find code blob" );
198
200
if (MacroAssembler::is_set_narrow_oop (addr, cb->content_begin ())) {
199
201
narrowOop no = MacroAssembler::get_narrow_oop (addr, cb->content_begin ());
200
202
// We can reach here during GC with 'no' pointing to new object location
@@ -297,6 +299,7 @@ void NativeMovConstReg::set_data(intptr_t data) {
297
299
void NativeMovConstReg::set_narrow_oop (narrowOop data, CodeBlob *code /* = NULL */ ) {
298
300
address inst2_addr = addr_at (0 );
299
301
CodeBlob* cb = (code) ? code : CodeCache::find_blob (instruction_address ());
302
+ assert (cb != NULL , " Could not find code blob" );
300
303
if (MacroAssembler::get_narrow_oop (inst2_addr, cb->content_begin ()) == data) {
301
304
return ;
302
305
}
@@ -403,6 +406,7 @@ address NativeCallTrampolineStub::encoded_destination_addr() const {
403
406
404
407
address NativeCallTrampolineStub::destination (nmethod *nm) const {
405
408
CodeBlob* cb = nm ? nm : CodeCache::find_blob_unsafe (addr_at (0 ));
409
+ assert (cb != NULL , " Could not find code blob" );
406
410
address ctable = cb->content_begin ();
407
411
408
412
return *(address*)(ctable + destination_toc_offset ());
@@ -414,6 +418,7 @@ int NativeCallTrampolineStub::destination_toc_offset() const {
414
418
415
419
void NativeCallTrampolineStub::set_destination (address new_destination) {
416
420
CodeBlob* cb = CodeCache::find_blob (addr_at (0 ));
421
+ assert (cb != NULL , " Could not find code blob" );
417
422
address ctable = cb->content_begin ();
418
423
419
424
*(address*)(ctable + destination_toc_offset ()) = new_destination;
0 commit comments