Skip to content

Commit ea8ad06

Browse files
authored
Update (2023.01.09)
28982: LA port of 8294591: Fix cast-function-type warning in TemplateTable
1 parent 69df8f6 commit ea8ad06

File tree

1 file changed

+6
-6
lines changed

1 file changed

+6
-6
lines changed

src/hotspot/cpu/loongarch/templateTable_loongarch_64.cpp

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
/*
22
* Copyright (c) 2003, 2013, Oracle and/or its affiliates. All rights reserved.
3-
* Copyright (c) 2015, 2022, Loongson Technology. All rights reserved.
3+
* Copyright (c) 2015, 2023, Loongson Technology. All rights reserved.
44
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
55
*
66
* This code is free software; you can redistribute it and/or modify it
@@ -265,11 +265,11 @@ void TemplateTable::sipush() {
265265
// T2 : index
266266
// T3 : cpool
267267
// T8 : tag
268-
void TemplateTable::ldc(bool wide) {
268+
void TemplateTable::ldc(LdcType type) {
269269
transition(vtos, vtos);
270270
Label call_ldc, notFloat, notClass, notInt, Done;
271271
// get index in cpool
272-
if (wide) {
272+
if (is_ldc_wide(type)) {
273273
__ get_unsigned_2_byte_index_at_bcp(T2, 1);
274274
} else {
275275
__ ld_bu(T2, at_bcp(1));
@@ -303,7 +303,7 @@ void TemplateTable::ldc(bool wide) {
303303
__ bne(AT, R0, notClass);
304304

305305
__ bind(call_ldc);
306-
__ li(A1, wide);
306+
__ li(A1, is_ldc_wide(type) ? 1 : 0);
307307
call_VM(FSR, CAST_FROM_FN_PTR(address, InterpreterRuntime::ldc), A1);
308308
//__ push(atos);
309309
__ addi_d(SP, SP, - Interpreter::stackElementSize);
@@ -444,14 +444,14 @@ void TemplateTable::condy_helper(Label& Done) {
444444
}
445445

446446
// Fast path for caching oop constants.
447-
void TemplateTable::fast_aldc(bool wide) {
447+
void TemplateTable::fast_aldc(LdcType type) {
448448
transition(vtos, atos);
449449

450450
Register result = FSR;
451451
Register tmp = A1;
452452
Register rarg = A2;
453453

454-
int index_size = wide ? sizeof(u2) : sizeof(u1);
454+
int index_size = is_ldc_wide(type) ? sizeof(u2) : sizeof(u1);
455455

456456
Label resolved;
457457

0 commit comments

Comments
 (0)