1 /*
2 * Copyright (c) 2014, 2016, Oracle and/or its affiliates. All rights reserved.
3 * Copyright (c) 2015, 2016 SAP SE. All rights reserved.
4 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
5 *
6 * This code is free software; you can redistribute it and/or modify it
7 * under the terms of the GNU General Public License version 2 only, as
8 * published by the Free Software Foundation.
9 *
10 * This code is distributed in the hope that it will be useful, but WITHOUT
11 * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
12 * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
13 * version 2 for more details (a copy is included in the LICENSE file that
14 * accompanied this code).
15 *
16 * You should have received a copy of the GNU General Public License version
17 * 2 along with this work; if not, write to the Free Software Foundation,
18 * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
19 *
20 * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
21 * or visit www.oracle.com if you need additional information or have any
22 * questions.
23 *
384 break;
385 case T_BYTE:
386 // sign extend 8 bits
387 __ extsb(R3_RET, R3_RET);
388 break;
389 case T_CHAR:
390 // zero extend 16 bits
391 __ clrldi(R3_RET, R3_RET, 48);
392 break;
393 case T_SHORT:
394 // sign extend 16 bits
395 __ extsh(R3_RET, R3_RET);
396 break;
397 case T_INT:
398 // sign extend 32 bits
399 __ extsw(R3_RET, R3_RET);
400 break;
401 case T_LONG:
402 break;
403 case T_OBJECT:
404 // unbox result if not null
405 __ cmpdi(CCR0, R3_RET, 0);
406 __ beq(CCR0, done);
407 __ ld(R3_RET, 0, R3_RET);
408 __ verify_oop(R3_RET);
409 break;
410 case T_FLOAT:
411 break;
412 case T_DOUBLE:
413 break;
414 case T_VOID:
415 break;
416 default: ShouldNotReachHere();
417 }
418
419 BIND(done);
420 __ blr();
421
422 return entry;
423 }
424
425 // Abstract method entry.
426 //
427 address TemplateInterpreterGenerator::generate_abstract_entry(void) {
428 address entry = __ pc();
|
1 /*
2 * Copyright (c) 2014, 2017, Oracle and/or its affiliates. All rights reserved.
3 * Copyright (c) 2015, 2017 SAP SE. All rights reserved.
4 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
5 *
6 * This code is free software; you can redistribute it and/or modify it
7 * under the terms of the GNU General Public License version 2 only, as
8 * published by the Free Software Foundation.
9 *
10 * This code is distributed in the hope that it will be useful, but WITHOUT
11 * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
12 * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
13 * version 2 for more details (a copy is included in the LICENSE file that
14 * accompanied this code).
15 *
16 * You should have received a copy of the GNU General Public License version
17 * 2 along with this work; if not, write to the Free Software Foundation,
18 * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
19 *
20 * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
21 * or visit www.oracle.com if you need additional information or have any
22 * questions.
23 *
384 break;
385 case T_BYTE:
386 // sign extend 8 bits
387 __ extsb(R3_RET, R3_RET);
388 break;
389 case T_CHAR:
390 // zero extend 16 bits
391 __ clrldi(R3_RET, R3_RET, 48);
392 break;
393 case T_SHORT:
394 // sign extend 16 bits
395 __ extsh(R3_RET, R3_RET);
396 break;
397 case T_INT:
398 // sign extend 32 bits
399 __ extsw(R3_RET, R3_RET);
400 break;
401 case T_LONG:
402 break;
403 case T_OBJECT:
404 // JNIHandles::resolve result.
405 __ resolve_jobject(R3_RET, R11_scratch1, R12_scratch2, /* needs_frame */ true); // kills R31
406 break;
407 case T_FLOAT:
408 break;
409 case T_DOUBLE:
410 break;
411 case T_VOID:
412 break;
413 default: ShouldNotReachHere();
414 }
415
416 BIND(done);
417 __ blr();
418
419 return entry;
420 }
421
422 // Abstract method entry.
423 //
424 address TemplateInterpreterGenerator::generate_abstract_entry(void) {
425 address entry = __ pc();
|