|
1 | 1 | /* |
2 | 2 | * 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. |
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 |
@@ -265,11 +265,11 @@ void TemplateTable::sipush() { |
265 | 265 | // T2 : index |
266 | 266 | // T3 : cpool |
267 | 267 | // T8 : tag |
268 | | -void TemplateTable::ldc(bool wide) { |
| 268 | +void TemplateTable::ldc(LdcType type) { |
269 | 269 | transition(vtos, vtos); |
270 | 270 | Label call_ldc, notFloat, notClass, notInt, Done; |
271 | 271 | // get index in cpool |
272 | | - if (wide) { |
| 272 | + if (is_ldc_wide(type)) { |
273 | 273 | __ get_unsigned_2_byte_index_at_bcp(T2, 1); |
274 | 274 | } else { |
275 | 275 | __ ld_bu(T2, at_bcp(1)); |
@@ -303,7 +303,7 @@ void TemplateTable::ldc(bool wide) { |
303 | 303 | __ bne(AT, R0, notClass); |
304 | 304 |
|
305 | 305 | __ bind(call_ldc); |
306 | | - __ li(A1, wide); |
| 306 | + __ li(A1, is_ldc_wide(type) ? 1 : 0); |
307 | 307 | call_VM(FSR, CAST_FROM_FN_PTR(address, InterpreterRuntime::ldc), A1); |
308 | 308 | //__ push(atos); |
309 | 309 | __ addi_d(SP, SP, - Interpreter::stackElementSize); |
@@ -444,14 +444,14 @@ void TemplateTable::condy_helper(Label& Done) { |
444 | 444 | } |
445 | 445 |
|
446 | 446 | // Fast path for caching oop constants. |
447 | | -void TemplateTable::fast_aldc(bool wide) { |
| 447 | +void TemplateTable::fast_aldc(LdcType type) { |
448 | 448 | transition(vtos, atos); |
449 | 449 |
|
450 | 450 | Register result = FSR; |
451 | 451 | Register tmp = A1; |
452 | 452 | Register rarg = A2; |
453 | 453 |
|
454 | | - int index_size = wide ? sizeof(u2) : sizeof(u1); |
| 454 | + int index_size = is_ldc_wide(type) ? sizeof(u2) : sizeof(u1); |
455 | 455 |
|
456 | 456 | Label resolved; |
457 | 457 |
|
|
0 commit comments