# HG changeset patch # User Roland Schatz # Date 1399985157 -7200 # Node ID c44cf62d1c97368b7d27d8ede503fc7c0e05dfe9 # Parent 66d31e70bd792f901cc6bedcf55b3317315e65bb Simplify code generation of reinterpret-memory. diff -r 66d31e70bd79 -r c44cf62d1c97 graal/com.oracle.graal.compiler.amd64/src/com/oracle/graal/compiler/amd64/AMD64NodeLIRBuilder.java --- a/graal/com.oracle.graal.compiler.amd64/src/com/oracle/graal/compiler/amd64/AMD64NodeLIRBuilder.java Tue May 13 14:35:15 2014 +0200 +++ b/graal/com.oracle.graal.compiler.amd64/src/com/oracle/graal/compiler/amd64/AMD64NodeLIRBuilder.java Tue May 13 14:45:57 2014 +0200 @@ -274,40 +274,9 @@ } private Value emitReinterpretMemory(PlatformKind to, Access access) { - Kind from = getMemoryKind(access); - assert to != from : "should have been eliminated"; - - /* - * Conversions between integer to floating point types require moves between CPU and FPU - * registers. - */ - switch ((Kind) to) { - case Int: - switch (from) { - case Float: - return emitConvert2MemoryOp(to, MOV_F2I, access); - } - break; - case Long: - switch (from) { - case Double: - return emitConvert2MemoryOp(to, MOV_D2L, access); - } - break; - case Float: - switch (from) { - case Int: - return emitConvert2MemoryOp(to, MOV_I2F, access); - } - break; - case Double: - switch (from) { - case Long: - return emitConvert2MemoryOp(to, MOV_L2D, access); - } - break; - } - throw GraalInternalError.shouldNotReachHere(); + AMD64AddressValue address = makeAddress(access); + LIRFrameState state = getState(access); + return getLIRGeneratorTool().emitLoad(to, address, state); } protected AMD64Arithmetic getOp(ValueNode operation, Access access) {