Design and Implementation of a 64-bit PowerPC Port of Jikes RVM 2.0.3 - PowerPoint PPT Presentation

1 / 21
About This Presentation
Title:

Design and Implementation of a 64-bit PowerPC Port of Jikes RVM 2.0.3

Description:

Sergiy Kyrylkov, University of New Mexico. Darko Stefanovic, University ... int beg = VM.objectAsAddress(instructions); private static int obsoleteMethodCount; ... – PowerPoint PPT presentation

Number of Views:63
Avg rating:3.0/5.0
Slides: 22
Provided by: serg106
Category:

less

Transcript and Presenter's Notes

Title: Design and Implementation of a 64-bit PowerPC Port of Jikes RVM 2.0.3


1
Design and Implementation of a 64-bit PowerPC
Port of Jikes RVM 2.0.3
  • Sergiy Kyrylkov, University of New Mexico
  • Darko Stefanovic, University of New Mexico
  • Eliot Moss, University of Massachusetts Amherst

2
Motivation for a 64-bit VM
  • New set of research opportunities
  • Particularly interesting for memory management
    research
  • No 64-bit open-source VM with enough
    functionality available

3
Jikes RVM 2.0.3for 64-bit PowerPC
  • 32/64-bit clean runtime
  • 32/64-bit clean baseline compiler
  • Most of GCTk collectors (SS, gen, Appel, OF,
    Beltway)
  • No optimizing compiler
  • No adaptive subsystem
  • No watson collectors
  • No JNI

4
Jikes RVM 2.0.3for 64-bit PowerPC
  • Addresses are ADDRESS
  • Words are WORD
  • Offsets are int
  • JTOC is int
  • Operand stack is WORD
  • Default object header is two words
  • Method and interface IDs are int

5
Design DecisionsJTOC Layout
6
Design DecisionsObject Layout
7
Design DecisionsStack Frame Layout
8
Design DecisionsOperand Stack Layout
9
Porting Baseline Compiler
  • New 64-bit instructions in VM_Assembler
  • static final int LDtemplate 58ltlt26
  • static final INSTRUCTION LD (int RT, int DS, int
    RA)
  • return 58ltlt26 RTltlt21 RAltlt16 (DS0xFFFC)
  • final void emitLD (int RT, int DS, int RA)
  • if (VM.VerifyAssertions)
  • VM.assert(fits(DS, 16))
  • VM.assert(correctds(DS))
  • INSTRUCTION mi LDtemplate RTltlt21 RAltlt16
    (DS0xFFFC)
  • if (VM.TraceAssembler) asm(mIP, mi, "ld", RT,
    signedHex(DS), RA)
  • mIP
  • mc.addInstruction(mi)

10
Porting Baseline Compiler
  • New methods in VM_Assembler
  • final void emitLint (int RT, int D, int RA)
  • //-if RVM_FOR_POWERPC32
  • emitLWZ(RT, D, RA)
  • //-endif
  • //-if RVM_FOR_POWERPC64
  • emitLWA(RT, D, RA)
  • //-endif

11
Porting Baseline Compiler
  • 32/64-bit clean VM_Compiler
  • case 0x60 / --- iadd --- /
  • if (VM.TraceAssembler) asm.noteBytecode("iadd")
  • /
  • asm.emitLWZ (T0, 0, SP)
  • asm.emitLWZ (T1, 4, SP)
  • asm.emitADDC (T2, T1, T0)
  • asm.emitSTWU (T2, 4, SP)
  • /
  • asm.emitLint (T0, 0, SP)
  • asm.emitLint (T1, BYTES_IN_WORD, SP)
  • asm.emitADDC (T2, T1, T0)
  • asm.emitSTWU (T2, BYTES_IN_WORD, SP)
  • break

12
Porting Core Runtime
  • Integer/address disambiguation
  • int beg VM.objectAsAddress(instructions)
  • private static int obsoleteMethodCount
  • vs
  • ADDRESS beg VM.objectAsAddress(instructions)
  • private static int obsoleteMethodCount
  • New system-wide constants
  • int tibIndex method.getOffsetltlt2
  • vs
  • int tibIndex method.getOffsetltltBYTES_IN_ADDRESS_
    LOG

13
Porting Core Runtime
  • New naming conventions
  • sysCall1
  • vs
  • sysCall_X_rI, sysCall_I_rI, sysCall_A_rI
  • sysCall_AI_rX, syscal_AIA_A
  • Method/code splitting
  • int sysCall1(int p1)
  • vs
  • int sysCall_I_rI(int p1)
  • ADDRESS sysCall_A_rA(ADDRESS p1)

14
Porting Core Runtime
  • Pure 64-bit implementation of magic in
    baseline-compiler-like style
  • if (methodName VM_MagicNames.sysCall_I_rI)
  • int size SIZE_INTEGER
  • int valueOffset
  • valueOffset generateSysCall1(asm, size,
    false)
  • valueOffset SIZE_INTEGER
  • asm.emitLint(3, valueOffset, SP) //
    load value
  • generateSysCall2(asm, size)
  • generateSysCallRet_I(asm, size)
  • return

15
Lessons Learned
  • Use appropriate data types (int vs int,
    ADDRESS, WORD)
  • Use system-wide constants and variables(4 vs
    BYTES_IN_INT, BYTES_IN_ADDRESS)
  • Choose appropriate naming conventions(getMemoryWo
    rd vs getIntAtAddress, getAddressAtAddress)

16
jess32 vs jess64
17
javac32 vs javac64
18
jack32 vs jack64
19
pseudojbb32 vs pseudojbb64
20
Conclusions
  • Open-source 64-bit VM with most complete
    functionality
  • Provides testbed for a number of new research
    opportunities
  • Useful insights for future VM developers to
    create robust and portable software

21
Future Work
  • Add optimizing compiler and adaptive subsystem
    for complete functionality
  • Implement new GC algorithms (within JMTk)
    benefiting from 64-bit address space to evaluate
    their performance on a 64-bit PowerPC architecture
Write a Comment
User Comments (0)
About PowerShow.com