Skip to content

Commit f5dbbc3

Browse files
authored
Merge pull request #24278 from knn-k/aarch64clangUpdate2
Avoid compilation failures with memcpy/memset and cfi_startproc
2 parents 2c7020f + 7936ac3 commit f5dbbc3

3 files changed

Lines changed: 5 additions & 6 deletions

File tree

runtime/compiler/control/rossa.cpp

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1292,7 +1292,6 @@ extern "C" jint onLoadInternal(J9JavaVM *javaVM, J9JITConfig *jitConfig, char *x
12921292
= (TR::CodeCacheManager *)j9mem_allocate_memory(sizeof(TR::CodeCacheManager), J9MEM_CATEGORY_JIT);
12931293
if (codeCacheManager == NULL)
12941294
return -1;
1295-
memset(codeCacheManager, 0, sizeof(TR::CodeCacheManager));
12961295

12971296
// must initialize manager using the global (not thread specific) fe because current thread isn't guaranteed to live
12981297
// longer than the manager

runtime/compiler/ras/HashTable.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -180,7 +180,7 @@ void TR_HashTable::remove(TR_HashIndex index)
180180
// to put in its place.
181181
TR_HashIndex firstCollision;
182182
if ((firstCollision = _table[index].getCollisionChain()) != 0) {
183-
memcpy(_table + index, _table + firstCollision, sizeof(TR_HashTableEntry));
183+
_table[index] = _table[firstCollision];
184184
_table[firstCollision].setCollisionChain(_nextFree);
185185
_table[firstCollision].invalidate();
186186
_nextFree = firstCollision;
@@ -287,7 +287,7 @@ void TR_HashTable::growAndRehash(TR_HashTableEntry *oldTable, TR_HashIndex oldSi
287287
if (index > _highestIndex)
288288
_highestIndex = index;
289289

290-
memcpy(_table + index, oldTable + i, sizeof(TR_HashTableEntry));
290+
_table[index] = oldTable[i];
291291
_table[index].setCollisionChain(0);
292292
}
293293
}

runtime/libffi/aarch64/sysv.S

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -76,8 +76,8 @@ SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */
7676
x5 closure
7777
*/
7878

79-
cfi_startproc
8079
CNAME(ffi_call_SYSV):
80+
cfi_startproc
8181
/* Sign the lr with x1 since that is where it will be stored */
8282
SIGN_LR_WITH_REG(x1)
8383

@@ -268,8 +268,8 @@ CNAME(ffi_closure_SYSV_V):
268268
#endif
269269

270270
.align 4
271-
cfi_startproc
272271
CNAME(ffi_closure_SYSV):
272+
cfi_startproc
273273
SIGN_LR
274274
stp x29, x30, [sp, #-ffi_closure_SYSV_FS]!
275275
cfi_adjust_cfa_offset (ffi_closure_SYSV_FS)
@@ -500,8 +500,8 @@ CNAME(ffi_go_closure_SYSV_V):
500500
#endif
501501

502502
.align 4
503-
cfi_startproc
504503
CNAME(ffi_go_closure_SYSV):
504+
cfi_startproc
505505
stp x29, x30, [sp, #-ffi_closure_SYSV_FS]!
506506
cfi_adjust_cfa_offset (ffi_closure_SYSV_FS)
507507
cfi_rel_offset (x29, 0)

0 commit comments

Comments
 (0)