Class InjectPayloadSleigh

    • Field Detail

      • name

        protected java.lang.String name
      • type

        protected int type
      • source

        protected java.lang.String source
    • Constructor Detail

      • InjectPayloadSleigh

        protected InjectPayloadSleigh​(java.lang.String sourceName)
        Constructor for use where restoreXml is overridden and provides name and type
        Parameters:
        sourceName -
      • InjectPayloadSleigh

        public InjectPayloadSleigh​(java.lang.String nm,
                                   int tp,
                                   java.lang.String sourceName)
        Provide basic form, restoreXml fills in the rest
        Parameters:
        nm - must provide formal name
        tp - must provide type
        sourceName -
    • Method Detail

      • getName

        public java.lang.String getName()
        Specified by:
        getName in interface InjectPayload
        Returns:
        formal name for this injection
      • getType

        public int getType()
        Specified by:
        getType in interface InjectPayload
        Returns:
        the type of this injection: CALLFIXUP_TYPE, CALLMECHANISM_TYPE, etc.
      • getSource

        public java.lang.String getSource()
        Specified by:
        getSource in interface InjectPayload
        Returns:
        a String describing the source of this payload
      • getParamShift

        public int getParamShift()
        Specified by:
        getParamShift in interface InjectPayload
        Returns:
        number of parameters from the original call which should be truncated
      • inject

        public void inject​(InjectContext context,
                           PcodeEmit emit)
        Description copied from interface: InjectPayload
        Given a context, send the p-code payload to the emitter
        Specified by:
        inject in interface InjectPayload
        Parameters:
        context - is the context for injection
        emit - is the object accumulating the final p-code
      • getPcode

        public PcodeOp[] getPcode​(Program program,
                                  InjectContext con)
        Description copied from interface: InjectPayload
        A convenience function wrapping the inject method, to produce the final set of PcodeOp objects in an array
        Specified by:
        getPcode in interface InjectPayload
        Parameters:
        program - is the Program for which injection is happening
        con - is the context for injection
        Returns:
        the array of PcodeOps
      • isFallThru

        public boolean isFallThru()
        Specified by:
        isFallThru in interface InjectPayload
        Returns:
        true if the injected p-code falls thru
      • orderParameters

        protected void orderParameters()
        All input and output parameters must have a unique index. Order them so that inputs come first, then outputs
      • setTemplate

        public void setTemplate​(ConstructTpl ctl)