Mercurial > hg > graal-compiler
changeset 15610:c44cf62d1c97
Simplify code generation of reinterpret-memory.
author | Roland Schatz <roland.schatz@oracle.com> |
---|---|
date | Tue, 13 May 2014 14:45:57 +0200 |
parents | 66d31e70bd79 |
children | 9129a2237dd8 |
files | graal/com.oracle.graal.compiler.amd64/src/com/oracle/graal/compiler/amd64/AMD64NodeLIRBuilder.java |
diffstat | 1 files changed, 3 insertions(+), 34 deletions(-) [+] |
line wrap: on
line diff
--- 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) {