org.jikesrvm.compilers.opt.lir2mir
Class BURS_MemOp_Helpers

java.lang.Object
  extended by org.jikesrvm.compilers.opt.ir.IRTools
      extended by org.jikesrvm.compilers.opt.ir.GenericPhysicalRegisterTools
          extended by org.jikesrvm.compilers.opt.ir.ia32.PhysicalRegisterTools
              extended by org.jikesrvm.ArchitectureSpecificOpt.PhysicalRegisterTools
                  extended by org.jikesrvm.compilers.opt.lir2mir.BURS_Common_Helpers
                      extended by org.jikesrvm.compilers.opt.lir2mir.BURS_MemOp_Helpers
Direct Known Subclasses:
BURS_Helpers

public abstract class BURS_MemOp_Helpers
extends BURS_Common_Helpers

Contains common BURS helper functions for platforms with memory operands.


Nested Class Summary
private static class BURS_MemOp_Helpers.AddrStackElement
           
private static class BURS_MemOp_Helpers.MOStackElement
           
 
Field Summary
private  BURS_MemOp_Helpers.AddrStackElement AddrStack
           
protected static byte B
           
protected static byte B_S
           
protected static byte DW
           
protected static byte DW_S
           
private  BURS_MemOp_Helpers.MOStackElement MOStack
           
protected static byte PARAGRAPH
           
protected static byte QW
           
protected static byte QW_S
           
protected static byte W
           
protected static byte W_S
           
 
Fields inherited from class org.jikesrvm.compilers.opt.lir2mir.BURS_Common_Helpers
burs, INFINITE, regpool
 
Constructor Summary
protected BURS_MemOp_Helpers(BURS burs)
           
 
Method Summary
protected  int ADDRESS_EQUAL(Instruction store, Instruction load, int trueCost)
           
protected  int ADDRESS_EQUAL(Instruction store, Instruction load, int trueCost, int falseCost)
           
protected  int ARRAY_ADDRESS_EQUAL(Instruction store, Instruction load, int trueCost)
           
protected  int ARRAY_ADDRESS_EQUAL(Instruction store, Instruction load, int trueCost, int falseCost)
           
protected  void augmentAddress(Operand op)
           
protected  void combineAddresses()
           
protected  MemoryOperand consumeAddress(byte size, LocationOperand loc, Operand guard)
           
protected  MemoryOperand consumeMO()
           
protected  MemoryOperand MO_AL(Instruction s, byte scale, byte size)
          Construct a memory operand for the effective address of the array load instruction
protected  MemoryOperand MO_AL(Instruction s, byte scale, byte size, int disp)
          Construct a memory operand for the effective address of the array load instruction
private  MemoryOperand MO_ARRAY(Operand base, Operand index, byte scale, byte size, Offset disp, LocationOperand loc, Operand guard)
          Construct memory operand for an array access
protected  MemoryOperand MO_AS(Instruction s, byte scale, byte size)
          Construct a memory operand for the effective address of the array store instruction
protected  MemoryOperand MO_AS(Instruction s, byte scale, byte size, int disp)
           
protected  MemoryOperand MO_B(Operand base, byte size, LocationOperand loc, Operand guard)
           
protected  MemoryOperand MO_BD(Operand base, Offset disp, byte size, LocationOperand loc, Operand guard)
           
protected  MemoryOperand MO_BI(Operand base, Operand index, byte size, LocationOperand loc, Operand guard)
           
protected  MemoryOperand MO_BID(Operand base, Operand index, Offset disp, byte size, LocationOperand loc, Operand guard)
           
protected  MemoryOperand MO_BIS(Operand base, Operand index, byte scale, byte size, LocationOperand loc, Operand guard)
           
protected  MemoryOperand MO_D(Offset disp, byte size, LocationOperand loc, Operand guard)
           
protected  MemoryOperand MO_L(Instruction s, byte size)
          Construct a memory operand for the effective address of the load instruction
protected  MemoryOperand MO_L(Instruction s, byte size, int disp)
          Construct a displaced memory operand for the effective address of the load instruction
protected  MemoryOperand MO_MC(Instruction s)
          Construct memory operand for a MATERIALIZE_FP_CONSTANT
protected  MemoryOperand MO_S(Instruction s, byte size)
          Construct a memory operand for the effective address of the store instruction
protected  MemoryOperand MO_S(Instruction s, byte size, int disp)
          Construct a displaced memory operand for the effective address of the store instruction
protected  MemoryOperand MO(Operand base, Operand offset, byte size, LocationOperand loc, Operand guard)
           
protected  MemoryOperand MO(Operand base, Operand offset, byte size, LocationOperand loc, Operand guard, int disp)
           
protected  MemoryOperand MO(Operand base, Operand offset, byte size, Offset disp, LocationOperand loc, Operand guard)
           
protected  void pushAddress(RegisterOperand base, RegisterOperand index, byte scale, Offset disp)
           
protected  void pushMO(MemoryOperand mo)
           
 
Methods inherited from class org.jikesrvm.compilers.opt.lir2mir.BURS_Common_Helpers
AC, AV, EMIT, EQ_GT_GE, EQ_LT_LE, EQ_NE, FITS, FITS, getIR, IC, isONE, isONE, isZERO, isZERO, IV, LC, MINUSONE, ONE, P, PL, PLL, PLLL, PLLLL, PLLLLLL, PLLLLLLL, PLLLRL, PLLLRLL, PLLLRLLL, PLLR, PLLRL, PLLRLL, PLLRLLL, PLLRLLR, PLR, PLRL, PLRLL, PLRLLRL, PLRR, PR, PRL, PRLL, PRLLL, PRLLLL, PRLLR, PRLLRLLL, PRLR, PRLRL, PRR, PRRL, PRRR, R, V, VL, VLL, VLLL, VLLLL, VLLLLLLLR, VLLLLLLR, VLLLLLR, VLLLLR, VLLLR, VLLLRLLLR, VLLLRLLR, VLLLRLR, VLLLRR, VLLR, VLLRLLLR, VLLRLLR, VLLRLLRR, VLLRLR, VLLRR, VLR, VLRL, VLRLL, VLRLLRR, VLRLR, VLRR, VLRRR, VR, VRL, VRLL, VRLLLLR, VRLLLR, VRLLR, VRLLRLLLR, VRLLRLLR, VRLLRR, VRLR, VRLRLR, VRLRR, VRR, VRRL, VRRLR, VRRR, ZERO
 
Methods inherited from class org.jikesrvm.compilers.opt.ir.ia32.PhysicalRegisterTools
makeMoveInstruction
 
Methods inherited from class org.jikesrvm.compilers.opt.ir.GenericPhysicalRegisterTools
A, I
 
Methods inherited from class org.jikesrvm.compilers.opt.ir.IRTools
A, AC, AC, CPOS, CR, D, DC, defDoublesAsUse, definedIn, F, FC, getCondMoveOp, getDefaultOperand, getLoadOp, getLoadOp, getMoveOp, getStoreOp, getStoreOp, I, IC, insertInstructionsAfter, L, LC, makeBlockOnEdge, mayBeVolatileFieldLoad, moveInstruction, moveIntoRegister, moveIntoRegister, nonPEIGC, TG, usedIn, useDoublesAsDef
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

B

protected static final byte B
See Also:
Constant Field Values

W

protected static final byte W
See Also:
Constant Field Values

DW

protected static final byte DW
See Also:
Constant Field Values

QW

protected static final byte QW
See Also:
Constant Field Values

PARAGRAPH

protected static final byte PARAGRAPH
See Also:
Constant Field Values

B_S

protected static final byte B_S
See Also:
Constant Field Values

W_S

protected static final byte W_S
See Also:
Constant Field Values

DW_S

protected static final byte DW_S
See Also:
Constant Field Values

QW_S

protected static final byte QW_S
See Also:
Constant Field Values

AddrStack

private BURS_MemOp_Helpers.AddrStackElement AddrStack

MOStack

private BURS_MemOp_Helpers.MOStackElement MOStack
Constructor Detail

BURS_MemOp_Helpers

protected BURS_MemOp_Helpers(BURS burs)
Method Detail

ADDRESS_EQUAL

protected final int ADDRESS_EQUAL(Instruction store,
                                  Instruction load,
                                  int trueCost)

ADDRESS_EQUAL

protected final int ADDRESS_EQUAL(Instruction store,
                                  Instruction load,
                                  int trueCost,
                                  int falseCost)

ARRAY_ADDRESS_EQUAL

protected final int ARRAY_ADDRESS_EQUAL(Instruction store,
                                        Instruction load,
                                        int trueCost)

ARRAY_ADDRESS_EQUAL

protected final int ARRAY_ADDRESS_EQUAL(Instruction store,
                                        Instruction load,
                                        int trueCost,
                                        int falseCost)

pushAddress

protected final void pushAddress(RegisterOperand base,
                                 RegisterOperand index,
                                 byte scale,
                                 Offset disp)

augmentAddress

protected final void augmentAddress(Operand op)

combineAddresses

protected final void combineAddresses()

consumeAddress

protected final MemoryOperand consumeAddress(byte size,
                                             LocationOperand loc,
                                             Operand guard)

pushMO

protected final void pushMO(MemoryOperand mo)

consumeMO

protected final MemoryOperand consumeMO()

MO_L

protected final MemoryOperand MO_L(Instruction s,
                                   byte size)
Construct a memory operand for the effective address of the load instruction


MO_L

protected final MemoryOperand MO_L(Instruction s,
                                   byte size,
                                   int disp)
Construct a displaced memory operand for the effective address of the load instruction


MO_S

protected final MemoryOperand MO_S(Instruction s,
                                   byte size)
Construct a memory operand for the effective address of the store instruction


MO_S

protected final MemoryOperand MO_S(Instruction s,
                                   byte size,
                                   int disp)
Construct a displaced memory operand for the effective address of the store instruction


MO

protected final MemoryOperand MO(Operand base,
                                 Operand offset,
                                 byte size,
                                 LocationOperand loc,
                                 Operand guard)

MO

protected final MemoryOperand MO(Operand base,
                                 Operand offset,
                                 byte size,
                                 LocationOperand loc,
                                 Operand guard,
                                 int disp)

MO

protected final MemoryOperand MO(Operand base,
                                 Operand offset,
                                 byte size,
                                 Offset disp,
                                 LocationOperand loc,
                                 Operand guard)

MO_B

protected final MemoryOperand MO_B(Operand base,
                                   byte size,
                                   LocationOperand loc,
                                   Operand guard)

MO_BI

protected final MemoryOperand MO_BI(Operand base,
                                    Operand index,
                                    byte size,
                                    LocationOperand loc,
                                    Operand guard)

MO_BD

protected final MemoryOperand MO_BD(Operand base,
                                    Offset disp,
                                    byte size,
                                    LocationOperand loc,
                                    Operand guard)

MO_BID

protected final MemoryOperand MO_BID(Operand base,
                                     Operand index,
                                     Offset disp,
                                     byte size,
                                     LocationOperand loc,
                                     Operand guard)

MO_BIS

protected final MemoryOperand MO_BIS(Operand base,
                                     Operand index,
                                     byte scale,
                                     byte size,
                                     LocationOperand loc,
                                     Operand guard)

MO_D

protected final MemoryOperand MO_D(Offset disp,
                                   byte size,
                                   LocationOperand loc,
                                   Operand guard)

MO_AL

protected final MemoryOperand MO_AL(Instruction s,
                                    byte scale,
                                    byte size)
Construct a memory operand for the effective address of the array load instruction


MO_AL

protected final MemoryOperand MO_AL(Instruction s,
                                    byte scale,
                                    byte size,
                                    int disp)
Construct a memory operand for the effective address of the array load instruction


MO_AS

protected final MemoryOperand MO_AS(Instruction s,
                                    byte scale,
                                    byte size)
Construct a memory operand for the effective address of the array store instruction


MO_AS

protected final MemoryOperand MO_AS(Instruction s,
                                    byte scale,
                                    byte size,
                                    int disp)

MO_ARRAY

private MemoryOperand MO_ARRAY(Operand base,
                               Operand index,
                               byte scale,
                               byte size,
                               Offset disp,
                               LocationOperand loc,
                               Operand guard)
Construct memory operand for an array access


MO_MC

protected final MemoryOperand MO_MC(Instruction s)
Construct memory operand for a MATERIALIZE_FP_CONSTANT