Wed, 30 Oct 2013 09:26:44 -0700
Merge
1.1 --- a/src/cpu/x86/vm/interp_masm_x86_32.cpp Wed Oct 30 09:11:04 2013 -0700 1.2 +++ b/src/cpu/x86/vm/interp_masm_x86_32.cpp Wed Oct 30 09:26:44 2013 -0700 1.3 @@ -196,7 +196,7 @@ 1.4 1.5 void InterpreterMacroAssembler::get_unsigned_2_byte_index_at_bcp(Register reg, int bcp_offset) { 1.6 assert(bcp_offset >= 0, "bcp is still pointing to start of bytecode"); 1.7 - movl(reg, Address(rsi, bcp_offset)); 1.8 + load_unsigned_short(reg, Address(rsi, bcp_offset)); 1.9 bswapl(reg); 1.10 shrl(reg, 16); 1.11 }
2.1 --- a/src/cpu/x86/vm/interp_masm_x86_64.cpp Wed Oct 30 09:11:04 2013 -0700 2.2 +++ b/src/cpu/x86/vm/interp_masm_x86_64.cpp Wed Oct 30 09:26:44 2013 -0700 2.3 @@ -192,7 +192,7 @@ 2.4 Register reg, 2.5 int bcp_offset) { 2.6 assert(bcp_offset >= 0, "bcp is still pointing to start of bytecode"); 2.7 - movl(reg, Address(r13, bcp_offset)); 2.8 + load_unsigned_short(reg, Address(r13, bcp_offset)); 2.9 bswapl(reg); 2.10 shrl(reg, 16); 2.11 }
3.1 --- a/src/cpu/x86/vm/templateTable_x86_32.cpp Wed Oct 30 09:11:04 2013 -0700 3.2 +++ b/src/cpu/x86/vm/templateTable_x86_32.cpp Wed Oct 30 09:26:44 2013 -0700 3.3 @@ -558,7 +558,7 @@ 3.4 3.5 3.6 void TemplateTable::locals_index_wide(Register reg) { 3.7 - __ movl(reg, at_bcp(2)); 3.8 + __ load_unsigned_short(reg, at_bcp(2)); 3.9 __ bswapl(reg); 3.10 __ shrl(reg, 16); 3.11 __ negptr(reg); 3.12 @@ -1552,7 +1552,11 @@ 3.13 InvocationCounter::counter_offset(); 3.14 3.15 // Load up EDX with the branch displacement 3.16 - __ movl(rdx, at_bcp(1)); 3.17 + if (is_wide) { 3.18 + __ movl(rdx, at_bcp(1)); 3.19 + } else { 3.20 + __ load_signed_short(rdx, at_bcp(1)); 3.21 + } 3.22 __ bswapl(rdx); 3.23 if (!is_wide) __ sarl(rdx, 16); 3.24 LP64_ONLY(__ movslq(rdx, rdx));
4.1 --- a/src/cpu/x86/vm/templateTable_x86_64.cpp Wed Oct 30 09:11:04 2013 -0700 4.2 +++ b/src/cpu/x86/vm/templateTable_x86_64.cpp Wed Oct 30 09:26:44 2013 -0700 4.3 @@ -568,7 +568,7 @@ 4.4 } 4.5 4.6 void TemplateTable::locals_index_wide(Register reg) { 4.7 - __ movl(reg, at_bcp(2)); 4.8 + __ load_unsigned_short(reg, at_bcp(2)); 4.9 __ bswapl(reg); 4.10 __ shrl(reg, 16); 4.11 __ negptr(reg); 4.12 @@ -1575,7 +1575,11 @@ 4.13 InvocationCounter::counter_offset(); 4.14 4.15 // Load up edx with the branch displacement 4.16 - __ movl(rdx, at_bcp(1)); 4.17 + if (is_wide) { 4.18 + __ movl(rdx, at_bcp(1)); 4.19 + } else { 4.20 + __ load_signed_short(rdx, at_bcp(1)); 4.21 + } 4.22 __ bswapl(rdx); 4.23 4.24 if (!is_wide) {