From: Stephen F. <sj...@us...> - 2001-12-14 16:07:20
|
Hi Matthias, I believe Julian added this functionality on Nov. 16. See the CVS commit history page to see what files to pick up. Or - you can pick up the HEAD of the CVS repository. SJF ------------------------------------------------------------------------ Stephen Fink IBM T.J. Watson Research Center sj...@us... (914)784-7776 Matthias Hauswirth <Matthias.Hauswirth@Colorado.EDU> To: jikesrvm-researchers Sent by: <jik...@ww...> jik...@ww...uthbury. cc: usf.ibm.com Subject: [Jikesrvm-researchers] IA32, OPT Compiler: Assembling MOV without base or index, just with displacement 12/14/2001 12:29 AM Please respond to jikesrvm-researchers Working on my MIR instrumentations I discovered a feature I need. I want to write to a constant memory address (an address, e.g. 0x61000000, I choose at boot image writing time). For this I want to insert a MIR instruction. I do the following: ----------------------------------------------------------------------- OPT_Instruction i = MIR_Move.create( OPT_Operators.IA32_MOV, OPT_MemoryOperand.D( 0x61000000, (byte)0x04, /*move a doubleword(32bits)*/ null, /*location*/ null /*guard*/ ), OPT_RVMIRTools.R(eax) // whatever value I want to store ); ----------------------------------------------------------------------- This leads to an exception when this chunk of MIR code gets assembled: ----------------------------------------------------------------------- OPT_Compiler failure during compilation of VM_GCUtil.boot ()V java.lang.NullPointerException at OPT_AssemblerBase.getBase(OPT_AssemblerBase.java:158) at OPT_Assembler.doMOV(OPT_Assembler.java:3475) at OPT_Assembler.doInst(OPT_Assembler.java:8733) at OPT_AssemblerBase.generateCode(OPT_AssemblerBase.java:489) at OPT_ConvertMIRtoMC$AssemblerDriver.perform(OPT_ConvertMIRtoMC.java:94) at OPT_CompilerPhase.performPhase(OPT_CompilerPhase.java:110) at OPT_OptimizationPlanAtomicElement.perform(OPT_OptimizationPlanAtomicElement.java:68) at OPT_OptimizationPlanCompositeElement.perform(OPT_OptimizationPlanCompositeElement.java:124) at OPT_CompilationPlan.execute(OPT_CompilationPlan.java:156) at OPT_Compiler.compile(OPT_Compiler.java:167) at VM_BootImageCompiler.compile(VM_BootImageCompiler.java:115) at VM_Method.compile(VM_Method.java:332) at VM_Class.getInitialInstructions(VM_Class.java:1500) at VM_Class.instantiate(VM_Class.java:1326) at BootImageWriter2.createBootImageObjects(BootImageWriter2.java:636) at BootImageWriter2.main(BootImageWriter2.java:308) ----------------------------------------------------------------------- Looking at the assembler support, it seems that this kind of memory operand (without a base or index register) cannot be assembled. Does anyone have a quick overview of what I have to do to add this functionality to the assembler? -Matthias _______________________________________________ Jikesrvm-researchers mailing list Jik...@ww... http://www-124.ibm.com/developerworks/oss/mailman/listinfo/jikesrvm-researchers |