# HG changeset patch # User Stefan Anzinger # Date 1402006710 -7200 # Node ID cb196ea71d773ddb3a0c9b28aff6d989719519b8 # Parent f22e4fd06a7e670dc53f27280805f83e4ed6779b [SPARC] Fixing last issues on jtt.bytecode, reverting changes to HexCodeFile, fixed parsing method in Disassembler and submitted the patch diff -r f22e4fd06a7e -r cb196ea71d77 graal/com.oracle.graal.lir.sparc/src/com/oracle/graal/lir/sparc/SPARCArithmetic.java --- a/graal/com.oracle.graal.lir.sparc/src/com/oracle/graal/lir/sparc/SPARCArithmetic.java Thu Jun 05 16:28:13 2014 +0200 +++ b/graal/com.oracle.graal.lir.sparc/src/com/oracle/graal/lir/sparc/SPARCArithmetic.java Fri Jun 06 00:18:30 2014 +0200 @@ -599,33 +599,33 @@ } break; case F2D: - new Fstod(masm, asDoubleReg(dst), asDoubleReg(dst)); + new Fstod(masm, asFloatReg(src), asDoubleReg(dst)); break; case F2L: new Fcmp(CC.Fcc0, Opfs.Fcmps, asFloatReg(dst), asFloatReg(dst)).emit(masm); new Fbfcc(masm, FCond.Fbo, false, 4); - new Fstox(masm, asFloatReg(dst), asFloatReg(dst)); + new Fstox(masm, asFloatReg(src), asFloatReg(dst)); new Fitos(masm, asFloatReg(dst), asFloatReg(dst)); new Fsubs(asFloatReg(dst), asFloatReg(dst), asFloatReg(dst)).emit(masm); break; case F2I: new Fcmp(CC.Fcc0, Opfs.Fcmps, asFloatReg(dst), asFloatReg(dst)).emit(masm); new Fbfcc(masm, FCond.Fbo, false, 4); - new Fstoi(masm, asFloatReg(dst), asFloatReg(dst)); + new Fstoi(masm, asFloatReg(src), asFloatReg(dst)); new Fitos(masm, asFloatReg(dst), asFloatReg(dst)); new Fsubs(asFloatReg(dst), asFloatReg(dst), asFloatReg(dst)).emit(masm); break; case D2L: new Fcmp(CC.Fcc0, Opfs.Fcmpd, asDoubleReg(dst), asDoubleReg(dst)).emit(masm); new Fbfcc(masm, FCond.Fbo, false, 4); - new Fdtox(masm, asDoubleReg(dst), asDoubleReg(dst)); + new Fdtox(masm, asDoubleReg(src), asDoubleReg(dst)); new Fxtod(masm, asDoubleReg(dst), asDoubleReg(dst)); new Fsubd(asDoubleReg(dst), asDoubleReg(dst), asDoubleReg(dst)).emit(masm); break; case D2I: new Fcmp(CC.Fcc0, Opfs.Fcmpd, asDoubleReg(dst), asDoubleReg(dst)).emit(masm); new Fbfcc(masm, FCond.Fbo, false, 4); - new Fdtoi(masm, asDoubleReg(dst), asDoubleReg(dst)); + new Fdtoi(masm, asDoubleReg(src), asDoubleReg(dst)); new Fitod(masm, asDoubleReg(dst), asDoubleReg(dst)); new Fsubd(asDoubleReg(dst), asDoubleReg(dst), asDoubleReg(dst)).emit(masm); break; diff -r f22e4fd06a7e -r cb196ea71d77 graal/com.oracle.graal.printer/src/com/oracle/graal/printer/HexCodeFile.java --- a/graal/com.oracle.graal.printer/src/com/oracle/graal/printer/HexCodeFile.java Thu Jun 05 16:28:13 2014 +0200 +++ b/graal/com.oracle.graal.printer/src/com/oracle/graal/printer/HexCodeFile.java Fri Jun 06 00:18:30 2014 +0200 @@ -23,7 +23,6 @@ package com.oracle.graal.printer; import java.io.*; -import java.math.*; import java.util.*; import java.util.regex.*; @@ -160,19 +159,9 @@ } public void writeTo(OutputStream out) { - /** - * The BigInteger issue is necessary, as the c1visualizer/mxpaser/Long.parseLong cannot - * parse unsigned strings representing values greater or equal 1<<63 - */ - BigInteger relocatedtartAddress = new BigInteger(Long.toHexString(startAddress), 16); - if (startAddress < 0) { - relocatedtartAddress = relocatedtartAddress.clearBit(63); // Remove the sign bit. - comments.get(0).add(0, String.format("NOTICE: Address value is always 0x%x less than physical.", Long.MIN_VALUE)); - } - // Now generate the output. PrintStream ps = out instanceof PrintStream ? (PrintStream) out : new PrintStream(out); ps.printf("Platform %s %d %s%n", isa, wordWidth, SECTION_DELIM); - ps.printf("HexCode %x %s %s%n", relocatedtartAddress.longValue(), HexCodeFile.hexCodeString(code), SECTION_DELIM); + ps.printf("HexCode %x %s %s%n", startAddress, HexCodeFile.hexCodeString(code), SECTION_DELIM); for (JumpTable table : jumpTables) { ps.printf("JumpTable %d %d %d %d %s%n", table.position, table.entrySize, table.low, table.high, SECTION_DELIM);