Skip to content

Commit

Permalink
Remove command line options for boot image addresses from GenerateInt…
Browse files Browse the repository at this point in the history
…erfaceDeclarations.

The values are taken from the HeapLayoutConstants since the addition of the 64-bit address space layout in cf6b820 .
  • Loading branch information
erik-brangs committed May 16, 2016
1 parent d748c1c commit 2f32def
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 52 deletions.
6 changes: 0 additions & 6 deletions build.xml
Original file line number Diff line number Diff line change
Expand Up @@ -1806,12 +1806,6 @@ Check to make sure all required properties are specified. This includes properti
<sysproperty key="mmtk.hostjvm" value="org.jikesrvm.mm.mmtk.Factory"/>
<sysproperty key="mmtk.properties" value="${mmtk.properties}"/>
<jvmarg value="-Xbootclasspath/a:${build.rt.jar}"/>
<arg value="-da"/>
<arg value="${target.bootimage.data.address}"/>
<arg value="-ca"/>
<arg value="${target.bootimage.code.address}"/>
<arg value="-ra"/>
<arg value="${target.bootimage.rmap.address}"/>
<arg value="-out"/>
<arg path="${build.native}/InterfaceDeclarations.h"/>
</java>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -102,47 +102,16 @@ static void pln() {
GenerateInterfaceDeclarations() {
}

static long bootImageDataAddress = HeapLayoutConstants.BOOT_IMAGE_DATA_START.toLong();
static long bootImageCodeAddress = HeapLayoutConstants.BOOT_IMAGE_CODE_START.toLong();
static long bootImageRMapAddress = HeapLayoutConstants.BOOT_IMAGE_RMAP_START.toLong();
protected static final long bootImageDataAddress = HeapLayoutConstants.BOOT_IMAGE_DATA_START.toLong();
protected static final long bootImageCodeAddress = HeapLayoutConstants.BOOT_IMAGE_CODE_START.toLong();
protected static final long bootImageRMapAddress = HeapLayoutConstants.BOOT_IMAGE_RMAP_START.toLong();
static String outFileName;

private static long decodeLong(String s) {
if (s.endsWith("L")) {
s = s.substring(0, s.length() - 1);
}
return Long.decode(s);
}

public static void main(String[] args) throws Exception {

// Process command line directives.
//
for (int i = 0, n = args.length; i < n; ++i) {
if (args[i].equals("-da")) { // image address
if (++i == args.length) {
System.err.println("Error: The -da flag requires an argument");
System.exit(EXIT_STATUS_BOGUS_COMMAND_LINE_ARG);
}
bootImageDataAddress = decodeLong(args[i]);
continue;
}
if (args[i].equals("-ca")) { // image address
if (++i == args.length) {
System.err.println("Error: The -ca flag requires an argument");
System.exit(EXIT_STATUS_BOGUS_COMMAND_LINE_ARG);
}
bootImageCodeAddress = decodeLong(args[i]);
continue;
}
if (args[i].equals("-ra")) { // image address
if (++i == args.length) {
System.err.println("Error: The -ra flag requires an argument");
System.exit(EXIT_STATUS_BOGUS_COMMAND_LINE_ARG);
}
bootImageRMapAddress = decodeLong(args[i]);
continue;
}
if (args[i].equals("-out")) { // output file
if (++i == args.length) {
System.err.println("Error: The -out flag requires an argument");
Expand All @@ -155,18 +124,6 @@ public static void main(String[] args) throws Exception {
System.exit(EXIT_STATUS_BOGUS_COMMAND_LINE_ARG);
}

if (bootImageDataAddress == 0) {
System.err.println("Error: Must specify boot image data load address.");
System.exit(EXIT_STATUS_BOGUS_COMMAND_LINE_ARG);
}
if (bootImageCodeAddress == 0) {
System.err.println("Error: Must specify boot image code load address.");
System.exit(EXIT_STATUS_BOGUS_COMMAND_LINE_ARG);
}
if (bootImageRMapAddress == 0) {
System.err.println("Error: Must specify boot image ref map load address.");
System.exit(EXIT_STATUS_BOGUS_COMMAND_LINE_ARG);
}
if (outFileName == null) {
out = System.out;
} else {
Expand Down

0 comments on commit 2f32def

Please sign in to comment.