diff graal/com.oracle.graal.printer/src/com/oracle/graal/printer/HexCodeFile.java @ 16324:cb196ea71d77

[SPARC] Fixing last issues on jtt.bytecode, reverting changes to HexCodeFile, fixed parsing method in Disassembler and submitted the patch
author Stefan Anzinger <stefan.anzinger@gmail.com>
date Fri, 06 Jun 2014 00:18:30 +0200
parents f22e4fd06a7e
children 7cc21427d54b
line wrap: on
line diff
--- 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);