Skip to content

Commit

Permalink
[riscv][wip] Added skeleton substrate for RISC-V.
Browse files Browse the repository at this point in the history
  • Loading branch information
gigiblender committed Aug 13, 2019
1 parent 178d5b1 commit b54b366
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 7 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -850,8 +850,8 @@ protected void fixup() {
asm.nop(RISCV64MacroAssembler.PLACEHOLDER_INSTRUCTIONS_FOR_LONG_OFFSETS);
} else {
int startPos = buf.position();
asm.mov64BitConstant(scratch1, offset);
asm.add(64, scratch, scratch, scratch1);
asm.mov64BitConstant(scratch2, offset);
asm.add(64, scratch, scratch, scratch2);
int endPos = buf.position();
assert endPos - startPos <= RISCV64MacroAssembler.PLACEHOLDER_INSTRUCTIONS_FOR_LONG_OFFSETS * RISCV64MacroAssembler.INSTRUCTION_SIZE : endPos - startPos;
}
Expand Down
11 changes: 6 additions & 5 deletions com.sun.max/src/com/sun/max/platform/Platform.java
Original file line number Diff line number Diff line change
Expand Up @@ -207,7 +207,7 @@ private CiTarget createTarget() {
inlineObjects,
false,
false,
hasIDiv());
true);
}

private static final Pattern NON_REGEX_TEST_PATTERN = Pattern.compile("\\w+");
Expand Down Expand Up @@ -447,8 +447,9 @@ private static String getOS() {
*/
@HOSTED_ONLY
private static int getPageSize() {
Prototype.loadHostedLibrary();
return nativeGetPageSize();
return 4096;
// Prototype.loadHostedLibrary();
// return nativeGetPageSize();
}

private static native int nativeGetPageSize();
Expand Down Expand Up @@ -556,9 +557,9 @@ private static Platform createDefaultPlatform0() {
map.put("maxve-amd64", new Platform(CPU.AMD64, OS.MAXVE, Ints.K * 8, 32));
map.put("linux-arm", new Platform(CPU.ARMV7, OS.LINUX, Ints.K * 4, 32));
map.put("darwin-arm", new Platform(CPU.ARMV7, OS.DARWIN, Ints.K * 4, 32));
map.put("linux-aarch64", new Platform(CPU.Aarch64, OS.LINUX, Ints.K * 8, 32));
map.put("linux-aarch64", new Platform(CPU.Aarch64, OS.LINUX, Ints.K * 4, 32));
map.put("linux-riscv32", new Platform(CPU.RISCV32, OS.LINUX, Ints.K * 4, 32));
map.put("linux-riscv64", new Platform(CPU.RISCV64, OS.LINUX, Ints.K * 8, 32));
map.put("linux-riscv64", new Platform(CPU.RISCV64, OS.LINUX, Ints.K * 4, 32));
Supported = Collections.unmodifiableMap(map);
Default = map.get("linux-amd64");
}
Expand Down

0 comments on commit b54b366

Please sign in to comment.