7046893: LP64 problem with double_quadword in c1_LIRAssembler_x86.cpp

Tue, 24 May 2011 15:30:05 -0700

author
iveresov
date
Tue, 24 May 2011 15:30:05 -0700
changeset 2932
ccf072cdba91
parent 2931
7523488edce5
child 2933
28a9fe9534ea

7046893: LP64 problem with double_quadword in c1_LIRAssembler_x86.cpp
Summary: Fixed invalid casts in address computation
Reviewed-by: kvn, never
Contributed-by: thomas.salter@unisys.com

src/cpu/x86/vm/c1_LIRAssembler_x86.cpp file | annotate | diff | comparison | revisions
     1.1 --- a/src/cpu/x86/vm/c1_LIRAssembler_x86.cpp	Tue May 24 12:54:51 2011 -0700
     1.2 +++ b/src/cpu/x86/vm/c1_LIRAssembler_x86.cpp	Tue May 24 15:30:05 2011 -0700
     1.3 @@ -47,7 +47,7 @@
     1.4  static jlong* double_quadword(jlong *adr, jlong lo, jlong hi) {
     1.5    // Use the expression (adr)&(~0xF) to provide 128-bits aligned address
     1.6    // of 128-bits operands for SSE instructions.
     1.7 -  jlong *operand = (jlong*)(((long)adr)&((long)(~0xF)));
     1.8 +  jlong *operand = (jlong*)(((intptr_t)adr) & ((intptr_t)(~0xF)));
     1.9    // Store the value to a 128-bits operand.
    1.10    operand[0] = lo;
    1.11    operand[1] = hi;

mercurial