comparison src/cpu/x86/vm/templateInterpreter_x86_64.cpp @ 23614:32b682649973 jdk8u75-b04

8132051: Better byte behavior Reviewed-by: coleenp, roland
author kevinw
date Fri, 15 Jan 2016 22:33:15 +0000
parents 0bf37f737702
children b5f3a471e646
comparison
equal deleted inserted replaced
23613:b374548dcb48 23614:32b682649973
1 /* 1 /*
2 * Copyright (c) 2003, 2013, Oracle and/or its affiliates. All rights reserved. 2 * Copyright (c) 2003, 2016, Oracle and/or its affiliates. All rights reserved.
3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. 3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4 * 4 *
5 * This code is free software; you can redistribute it and/or modify it 5 * This code is free software; you can redistribute it and/or modify it
6 * under the terms of the GNU General Public License version 2 only, as 6 * under the terms of the GNU General Public License version 2 only, as
7 * published by the Free Software Foundation. 7 * published by the Free Software Foundation.
678 rdx, 678 rdx,
679 Address::times_8, 679 Address::times_8,
680 ConstantPoolCache::base_offset() + 680 ConstantPoolCache::base_offset() +
681 ConstantPoolCacheEntry::flags_offset())); 681 ConstantPoolCacheEntry::flags_offset()));
682 682
683 Label notObj, notInt, notByte, notShort; 683 Label notObj, notInt, notByte, notBool, notShort;
684 const Address field_address(rax, rcx, Address::times_1); 684 const Address field_address(rax, rcx, Address::times_1);
685 685
686 // Need to differentiate between igetfield, agetfield, bgetfield etc. 686 // Need to differentiate between igetfield, agetfield, bgetfield etc.
687 // because they are different sizes. 687 // because they are different sizes.
688 // Use the type from the constant pool cache 688 // Use the type from the constant pool cache
709 // btos 709 // btos
710 __ load_signed_byte(rax, field_address); 710 __ load_signed_byte(rax, field_address);
711 __ jmp(xreturn_path); 711 __ jmp(xreturn_path);
712 712
713 __ bind(notByte); 713 __ bind(notByte);
714 __ cmpl(rdx, ztos);
715 __ jcc(Assembler::notEqual, notBool);
716 // ztos
717 __ load_signed_byte(rax, field_address);
718 __ jmp(xreturn_path);
719
720 __ bind(notBool);
714 __ cmpl(rdx, stos); 721 __ cmpl(rdx, stos);
715 __ jcc(Assembler::notEqual, notShort); 722 __ jcc(Assembler::notEqual, notShort);
716 // stos 723 // stos
717 __ load_signed_short(rax, field_address); 724 __ load_signed_short(rax, field_address);
718 __ jmp(xreturn_path); 725 __ jmp(xreturn_path);