Revision: 3343 Author: eliot Date: 2015-05-14 19:30:41 -0700 (Thu, 14 May 2015) Log Message: ----------- Add the new processor-specific cogits for the spursista variant.
Added Paths: ----------- branches/Cog/spursistasrc/vm/cogitARMv5.c branches/Cog/spursistasrc/vm/cogitIA32.c
Property Changed: ---------------- branches/Cog/platforms/Cross/vm/sqSCCSVersion.h
Property changes on: branches/Cog/platforms/Cross/vm/sqSCCSVersion.h ___________________________________________________________________ Modified: checkindate - Thu May 14 19:15:55 PDT 2015 + Thu May 14 19:29:26 PDT 2015
Added: branches/Cog/spursistasrc/vm/cogitARMv5.c =================================================================== --- branches/Cog/spursistasrc/vm/cogitARMv5.c (rev 0) +++ branches/Cog/spursistasrc/vm/cogitARMv5.c 2015-05-15 02:30:41 UTC (rev 3343) @@ -0,0 +1,25962 @@ +/* Automatically generated by + CCodeGenerator VMMaker.oscog-eem.1303 uuid: d796217a-dcf4-47eb-9a63-579a7e69a7fa + from + SistaStackToRegisterMappingCogit VMMaker.oscog-eem.1303 uuid: d796217a-dcf4-47eb-9a63-579a7e69a7fa + */ +static char __buildInfo[] = "SistaStackToRegisterMappingCogit VMMaker.oscog-eem.1303 uuid: d796217a-dcf4-47eb-9a63-579a7e69a7fa " __DATE__ ; +char *__cogitBuildInfo = __buildInfo; + + + +#include <stddef.h> +#include "sq.h" +#include "sqCogStackAlignment.h" +#include "dispdbg.h" +#include "cogmethod.h" +#if COGMTVM +#include "cointerpmt.h" +#else +#include "cointerp.h" +#endif +#include "cogit.h" + +typedef struct _AbstractInstruction { + unsigned char opcode; + unsigned char machineCodeSize; + unsigned char maxSize; + unsigned char conditionOrNil; + unsigned long operands [3]; + unsigned long address; + struct _AbstractInstruction *dependent; + unsigned long machineCode [5]; + } AbstractInstruction; + +#define CogARMCompiler AbstractInstruction + + +typedef struct { + AbstractInstruction *fakeHeader; + AbstractInstruction *fillInstruction; + sqInt numArgs; + sqInt numCopied; + sqInt numInitialNils; + sqInt startpc; + AbstractInstruction *entryLabel; + AbstractInstruction *stackCheckLabel; + sqInt span; + } BlockStart; + +#define CogBlockStart BlockStart + + +typedef struct _BytecodeDescriptor { + sqInt (*generator )(void); + sqInt (*spanFunction )(struct _BytecodeDescriptor *,sqInt,sqInt,sqInt); + sqInt (*needsFrameFunction )(sqInt); + signed char stackDelta; + unsigned char opcode; + unsigned char numBytes; + unsigned isBranchTrue : 1; + unsigned isBranchFalse : 1; + unsigned isReturn : 1; + unsigned isBlockCreation : 1; + unsigned isMapped : 1; + unsigned isMappedInBlock : 1; + unsigned isExtension : 1; + unsigned hasIRC : 1; + } BytecodeDescriptor; + +#define CogBytecodeDescriptor BytecodeDescriptor + + +typedef struct { + sqInt annotation; + AbstractInstruction *instruction; + } InstructionAnnotation; + +#define CogInstructionAnnotation InstructionAnnotation + + +typedef struct { + sqInt (*primitiveGenerator )(void); + sqInt primNumArgs; + sqInt (*enabled )(sqInt); + } PrimitiveDescriptor; + +#define CogPrimitiveDescriptor PrimitiveDescriptor + + +typedef struct { + AbstractInstruction *targetInstruction; + sqInt instructionIndex; + sqInt simStackPtr; + } BytecodeFixup; + +#define CogSSBytecodeFixup BytecodeFixup + + +typedef struct { + char type; + char spilled; + char annotateUse; + sqInt registerr; + sqInt offset; + sqInt constant; + sqInt bcptr; + } CogSimStackEntry; + + +typedef struct { + sqInt isReceiverResultRegLive; + CogSimStackEntry *ssEntry; + } CogSSOptStatus; + + + +/*** Constants ***/ +#define AddCqR 95 +#define AddCwR 102 +#define AddOpcode 4 +#define AddRdRd 110 +#define AddRR 88 +#define AL 14 +#define AlignmentNops 2 +#define AltBlockCreationBytecodeSize 3 +#define AltFirstSpecialSelector 96 +#define AndCqR 97 +#define AndCqRR 108 +#define AndCwR 104 +#define AndOpcode 0 +#define AndRR 90 +#define AnnotationShift 5 +#define Arg0Reg -7 +#define Arg1Reg -8 +#define ArithmeticShiftRightCqR 81 +#define ArithmeticShiftRightRR 82 +#define BadRegisterSet 1 +#define BICCqR 122 +#define BicOpcode 14 +#define BlockCreationBytecodeSize 4 +#define BytecodeSetHasDirectedSuperSend 1 +#define CArg0Reg 0 +#define CArg1Reg 1 +#define CArg2Reg 2 +#define CArg3Reg 3 +#define Call 9 +#define CallFull 10 +#define CC 3 +#define ClassArrayCompactIndex 51 +#define ClassBlockClosureCompactIndex 37 +#define ClassFloatCompactIndex 34 +#define ClassMethodContextCompactIndex 36 +#define ClassReg -5 +#define ClosureFirstCopiedValueIndex 3 +#define ClosureIndex 4 +#define ClosureNumArgsIndex 2 +#define ClosureOuterContextIndex 0 +#define ClosureStartPCIndex 1 +#define CMBlock 3 +#define CMClosedPIC 4 +#define CMFree 1 +#define CMMaxUsageCount 7 +#define CMMethod 2 +#define CMOpenPIC 5 +#define CMPSMULL 123 +#define CmpCqR 94 +#define CmpCwR 101 +#define CmpOpcode 10 +#define CmpRdRd 109 +#define CmpRR 87 +#define ConcreteIPReg 12 +#define ConcreteVarBaseReg 10 +#define ConstZero 1 +#define ConvertRRd 116 +#define CounterBytes 4 +#define CS 2 +#define Debug DEBUGVM +#define DisplacementMask 0x1F +#define DisplacementX2N 0 +#define DivRdRd 113 +#define DPFPReg0 -9 +#define DPFPReg1 -10 +#define DPFPReg2 -11 +#define EncounteredUnknownBytecode -6 +#define EQ 0 +#define Fill16 5 +#define Fill32 6 +#define FillFromWord 7 +#define FirstAnnotation 64 +#define FirstJump 14 +#define FirstShortJump 18 +#define FirstSpecialSelector 176 +#define FoxCallerSavedIP 4 +#define FoxMethod -4 +#define FoxMFReceiver -12 +#define FoxSavedFP 0 +#define FoxThisContext -8 +#define FPReg -1 +#define GCModeBecome 8 +#define GCModeFull 1 +#define GCModeNewSpace 2 +#define GE 10 +#define GPRegMax -3 +#define GPRegMin -8 +#define GT 12 +#define HasBytecodePC 4 +#define HeaderIndex 0 +#define HI 8 +#define InstanceSpecificationIndex 2 +#define InstructionPointerIndex 1 +#define InsufficientCodeSpace -2 +#define IsAbsPCReference 3 +#define IsAnnotationExtension 1 +#define IsDirectedSuperSend 9 +#define IsDisplacementX2N 0 +#define IsNSDynamicSuperSend null +#define IsNSSelfSend null +#define IsNSSendCall null +#define IsObjectReference 2 +#define IsRelativeCall 5 +#define IsSendCall 7 +#define IsSuperSend 8 +#define Jump 18 +#define JumpAbove 33 +#define JumpAboveOrEqual 32 +#define JumpBelow 31 +#define JumpBelowOrEqual 34 +#define JumpCarry 25 +#define JumpFPEqual 35 +#define JumpFPGreater 39 +#define JumpFPGreaterOrEqual 40 +#define JumpFPLess 37 +#define JumpFPLessOrEqual 38 +#define JumpFPNotEqual 36 +#define JumpFPOrdered 41 +#define JumpFPUnordered 42 +#define JumpFull 14 +#define JumpGreater 29 +#define JumpGreaterOrEqual 28 +#define JumpLess 27 +#define JumpLessOrEqual 30 +#define JumpLong 15 +#define JumpLongNonZero 17 +#define JumpLongZero 16 +#define JumpNegative 21 +#define JumpNoCarry 26 +#define JumpNonNegative 22 +#define JumpNonZero 20 +#define JumpNoOverflow 24 +#define JumpOverflow 23 +#define JumpR 12 +#define JumpZero 19 +#define Label 1 +#define LargeContextSlots 62 +#define LastJump 42 +#define LE 13 +#define LinkReg -17 +#define LoadEffectiveAddressMwrR 78 +#define LogicalShiftLeftCqR 85 +#define LogicalShiftLeftRR 86 +#define LogicalShiftRightCqR 83 +#define LogicalShiftRightRR 84 +#define LR 14 +#define LS 9 +#define LT 11 +#define MapEnd 0 +#define MaxCompiledPrimitiveIndex 222 +#define MaxCounterValue 0xFFFF +#define MaxMethodSize 65535 +#define MaxNegativeErrorCode -8 +#define MaxNumArgs 15 +#define MaxStackAllocSize 1572864 +#define MaxStackCheckOffset 0xFFF +#define MaxX2NDisplacement 992 +#define MethodCacheClass 2 +#define MethodCacheMask 0xFFC +#define MethodCacheMethod 3 +#define MethodCacheSelector 1 +#define MethodIndex 3 +#define MethodTooBig -4 +#define MFMethodFlagHasContextFlag 1 +#define MFMethodFlagIsBlockFlag 2 +#define MI 4 +#define MoveAwR 44 +#define MoveCqR 66 +#define MoveCwR 67 +#define MoveM16rR 54 +#define MoveM64rRd 71 +#define MoveMbrR 62 +#define MoveMwrR 48 +#define MoveNotOpcode 15 +#define MoveOpcode 13 +#define MoveRAw 45 +#define MoveRdM64r 72 +#define MoveRdRd 70 +#define MoveRMbr 63 +#define MoveRMwr 49 +#define MoveRR 43 +#define MoveRXbrR 65 +#define MoveRXwrR 51 +#define MoveXbrRR 64 +#define MoveXwrRR 50 +#define MSR 118 +#define MULTIPLEBYTECODESETS 1 +#define MulRdRd 112 +#define NE 1 +#define NegateR 80 +#define NewspeakVM 0 +#define Nop 8 +#define NotFullyInitialized -1 +#define NumObjRefsInRuntime 0 +#define NumOopsPerNSC 6 +#define NumSendTrampolines 4 +#define NumTrampolines 57 +#define OrCqR 98 +#define OrCwR 105 +#define OrOpcode 12 +#define OrRR 91 +#define PC 15 +#define PCReg -19 +#define PL 5 +#define PopR 73 +#define PrefetchAw 77 +#define PrimCallCollectsProfileSamples 8 +#define PrimCallDoNotJIT 32 +#define PrimCallMayCallBack 4 +#define PrimCallNeedsNewMethod 1 +#define PrimCallNeedsPrimitiveFunction 2 +#define PrimErrNoMemory 9 +#define PrimErrWritePastObject 17 +#define PushCq 75 +#define PushCw 76 +#define PushR 74 +#define R0 0 +#define R11 11 +#define R4 4 +#define R5 5 +#define R6 6 +#define R7 7 +#define R8 8 +#define ReceiverIndex 5 +#define ReceiverResultReg -3 +#define RetN 11 +#define RISCTempReg -18 +#define RsbOpcode 3 +#define SelectorCannotInterpret 34 +#define SelectorDoesNotUnderstand 20 +#define SenderIndex 0 +#define SendNumArgsReg -6 +#define ShouldNotJIT -8 +#define SistaVM 1 +#define SMULL 117 +#define SmallContextSlots 22 +#define SP 13 +#define SPReg -2 +#define SqrtRd 115 +#define SSBaseOffset 1 +#define SSConstant 2 +#define SSRegister 3 +#define SSSpill 4 +#define StackPointerIndex 2 +#define Stop 13 +#define SubCqR 96 +#define SubCwR 103 +#define SubOpcode 2 +#define SubRdRd 111 +#define SubRR 89 +#define TempReg -4 +#define TstCqR 114 +#define UnfailingPrimitive 2 +#define UnimplementedPrimitive -7 +#define ValueIndex 1 +#define VarBaseReg -20 +#define VC 7 +#define VS 6 +#define XorCqR 99 +#define XorCwR 106 +#define XorOpcode 1 +#define XorRR 92 +#define YoungSelectorInPIC -5 + + +/*** Function Prototypes ***/ + + +#if !PRODUCTION && defined(__GNUC__) && !defined(NoDbgRegParms) +# define NoDbgRegParms __attribute__ ((regparm (0))) +#endif + +#if !defined(NoDbgRegParms) +# define NoDbgRegParms /*empty*/ +#endif + + + +#if defined(__GNUC__) && !defined(NeverInline) +# define NeverInline __attribute__ ((noinline)) +#endif + +#if !defined(NeverInline) +# define NeverInline /*empty*/ +#endif + +static AbstractInstruction * addDependent(AbstractInstruction * self_in_addDependent, AbstractInstruction *anInstruction) NoDbgRegParms; +static sqInt availableRegisterOrNilFor(AbstractInstruction * self_in_availableRegisterOrNilFor, sqInt liveRegsMask) NoDbgRegParms; +static AbstractInstruction * generateICacheFlush(AbstractInstruction * self_in_generateICacheFlush) NoDbgRegParms; +static AbstractInstruction * genWriteCResultIntoReg(AbstractInstruction * self_in_genWriteCResultIntoReg, sqInt abstractRegister) NoDbgRegParms; +static AbstractInstruction * getJmpTarget(AbstractInstruction * self_in_getJmpTarget) NoDbgRegParms; +static sqInt isAFixup(AbstractInstruction * self_in_isAFixup, void *fixupOrAddress) NoDbgRegParms; +static sqInt isAnInstruction(AbstractInstruction * self_in_isAnInstruction, AbstractInstruction *addressOrInstruction) NoDbgRegParms; +static sqInt isJump(AbstractInstruction * self_in_isJump) NoDbgRegParms; +static sqInt isLongJump(AbstractInstruction * self_in_isLongJump) NoDbgRegParms; +static AbstractInstruction * jmpTarget(AbstractInstruction * self_in_jmpTarget, AbstractInstruction *anAbstractInstruction) NoDbgRegParms; +static unsigned long labelOffset(AbstractInstruction * self_in_labelOffset) NoDbgRegParms; +static sqInt numCheckFeaturesOpcodes(AbstractInstruction * self_in_numCheckFeaturesOpcodes) NoDbgRegParms; +static AbstractInstruction * relocateJumpLongBeforeFollowingAddressby(AbstractInstruction * self_in_relocateJumpLongBeforeFollowingAddressby, sqInt pc, sqInt delta) NoDbgRegParms; +static AbstractInstruction * resolveJumpTarget(AbstractInstruction * self_in_resolveJumpTarget) NoDbgRegParms; +static sqInt setLabelOffset(AbstractInstruction * self_in_setLabelOffset, sqInt aValue) NoDbgRegParms; +static AbstractInstruction * updateLabel(AbstractInstruction * self_in_updateLabel, AbstractInstruction *labelInstruction) NoDbgRegParms; +static sqInt abstractRegisterForConcreteRegister(AbstractInstruction * self_in_abstractRegisterForConcreteRegister, sqInt reg) NoDbgRegParms; +static sqInt addsrnimmror(AbstractInstruction * self_in_addsrnimmror, sqInt destReg, sqInt srcReg, sqInt immediate, sqInt rot) NoDbgRegParms; +static sqInt addrnimmror(AbstractInstruction * self_in_addrnimmror, sqInt destReg, sqInt srcReg, sqInt immediate, sqInt rot) NoDbgRegParms; +static sqInt addrnrm(AbstractInstruction * self_in_addrnrm, sqInt destReg, sqInt srcReg, sqInt addReg) NoDbgRegParms; +static sqInt andsrnimmror(AbstractInstruction * self_in_andsrnimmror, sqInt destReg, sqInt srcReg, sqInt immediate, sqInt rot) NoDbgRegParms; +static sqInt andrnimmror(AbstractInstruction * self_in_andrnimmror, sqInt destReg, sqInt srcReg, sqInt immediate, sqInt rot) NoDbgRegParms; +static sqInt bicsrnimmror(AbstractInstruction * self_in_bicsrnimmror, sqInt destReg, sqInt srcReg, sqInt immediate, sqInt rot) NoDbgRegParms; +static sqInt bl(AbstractInstruction * self_in_bl, sqInt offset) NoDbgRegParms; +static sqInt b(AbstractInstruction * self_in_b, sqInt offset) NoDbgRegParms; +static sqInt callerSavedRegisterMask(AbstractInstruction * self_in_callerSavedRegisterMask) NoDbgRegParms; +static sqInt callFullTargetFromReturnAddress(AbstractInstruction * self_in_callFullTargetFromReturnAddress, sqInt callSiteReturnAddress) NoDbgRegParms; +static sqInt callInstructionByteSize(AbstractInstruction * self_in_callInstructionByteSize) NoDbgRegParms; +static sqInt callTargetFromReturnAddress(AbstractInstruction * self_in_callTargetFromReturnAddress, sqInt callSiteReturnAddress) NoDbgRegParms; +static sqInt computeMaximumSize(AbstractInstruction * self_in_computeMaximumSize) NoDbgRegParms; +static sqInt concreteCalleeSavedRegisterMask(AbstractInstruction * self_in_concreteCalleeSavedRegisterMask) NoDbgRegParms; +static sqInt concreteCallerSavedRegisterMask(AbstractInstruction * self_in_concreteCallerSavedRegisterMask) NoDbgRegParms; +static sqInt concreteRegister(AbstractInstruction * self_in_concreteRegister, sqInt registerIndex) NoDbgRegParms; +static AbstractInstruction * concretizeAddRdRd(AbstractInstruction * self_in_concretizeAddRdRd) NoDbgRegParms; +static sqInt concretizeAt(AbstractInstruction * self_in_concretizeAt, sqInt actualAddress) NoDbgRegParms; +static usqInt concretizeCMPSMULL(AbstractInstruction * self_in_concretizeCMPSMULL) NoDbgRegParms; +static AbstractInstruction * concretizeCmpRdRd(AbstractInstruction * self_in_concretizeCmpRdRd) NoDbgRegParms; +static void concretizeConditionalInstruction(AbstractInstruction * self_in_concretizeConditionalInstruction) NoDbgRegParms; +static AbstractInstruction * concretizeConvertRRd(AbstractInstruction * self_in_concretizeConvertRRd) NoDbgRegParms; +static AbstractInstruction * concretizeDivRdRd(AbstractInstruction * self_in_concretizeDivRdRd) NoDbgRegParms; +static AbstractInstruction * concretizeFill16(AbstractInstruction * self_in_concretizeFill16) NoDbgRegParms; +static usqInt concretizeFill32(AbstractInstruction * self_in_concretizeFill32) NoDbgRegParms; +static AbstractInstruction * concretizeFillFromWord(AbstractInstruction * self_in_concretizeFillFromWord) NoDbgRegParms; +static AbstractInstruction * concretizeMoveM64rRd(AbstractInstruction * self_in_concretizeMoveM64rRd) NoDbgRegParms; +static AbstractInstruction * concretizeMoveRdM64r(AbstractInstruction * self_in_concretizeMoveRdM64r) NoDbgRegParms; +static usqInt concretizeMSR(AbstractInstruction * self_in_concretizeMSR) NoDbgRegParms; +static AbstractInstruction * concretizeMulRdRd(AbstractInstruction * self_in_concretizeMulRdRd) NoDbgRegParms; +static usqInt concretizeSMULL(AbstractInstruction * self_in_concretizeSMULL) NoDbgRegParms; +static AbstractInstruction * concretizeSqrtRd(AbstractInstruction * self_in_concretizeSqrtRd) NoDbgRegParms; +static AbstractInstruction * concretizeSubRdRd(AbstractInstruction * self_in_concretizeSubRdRd) NoDbgRegParms; +static sqInt cResultRegister(AbstractInstruction * self_in_cResultRegister) NoDbgRegParms; +static sqInt dataOpTyperdrnrmlsr(AbstractInstruction * self_in_dataOpTyperdrnrmlsr, sqInt armOpcode, sqInt destReg, sqInt srcReg, sqInt addReg, sqInt shft) NoDbgRegParms; +static void dispatchConcretize(AbstractInstruction * self_in_dispatchConcretize) NoDbgRegParms; +static sqInt extract32BitOperandFrom4InstructionsPreceeding(AbstractInstruction * self_in_extract32BitOperandFrom4InstructionsPreceeding, sqInt addr) NoDbgRegParms; +static sqInt fullCallsAreRelative(AbstractInstruction * self_in_fullCallsAreRelative) NoDbgRegParms; +static sqInt genAlignCStackSavingRegistersnumArgswordAlignment(AbstractInstruction * self_in_genAlignCStackSavingRegistersnumArgswordAlignment, sqInt saveRegs, sqInt numArgs, sqInt alignment) NoDbgRegParms; +static AbstractInstruction * genDivRRQuoRem(AbstractInstruction * self_in_genDivRRQuoRem, sqInt abstractRegDivisor, sqInt abstractRegDividend, sqInt abstractRegQuotient, sqInt abstractRegRemainder) NoDbgRegParms; +static AbstractInstruction * genGetLeafCallStackPointerFunction(AbstractInstruction * self_in_genGetLeafCallStackPointerFunction) NoDbgRegParms; +static sqInt genLoadCStackPointer(AbstractInstruction * self_in_genLoadCStackPointer) NoDbgRegParms; +static sqInt genLoadCStackPointers(AbstractInstruction * self_in_genLoadCStackPointers) NoDbgRegParms; +static sqInt genLoadStackPointers(AbstractInstruction * self_in_genLoadStackPointers) NoDbgRegParms; +static AbstractInstruction * genMulRR(AbstractInstruction * self_in_genMulRR, sqInt regSource, sqInt regDest) NoDbgRegParms; +static sqInt genPassConstasArgument(AbstractInstruction * self_in_genPassConstasArgument, sqInt constant, sqInt zeroRelativeArgIndex) NoDbgRegParms; +static sqInt genPassRegasArgument(AbstractInstruction * self_in_genPassRegasArgument, sqInt abstractRegister, sqInt zeroRelativeArgIndex) NoDbgRegParms; +static AbstractInstruction * genPushRegisterArgsForAbortMissNumArgs(AbstractInstruction * self_in_genPushRegisterArgsForAbortMissNumArgs, sqInt numArgs) NoDbgRegParms; +static AbstractInstruction * genPushRegisterArgsForNumArgs(AbstractInstruction * self_in_genPushRegisterArgsForNumArgs, sqInt numArgs) NoDbgRegParms; +static sqInt genRemoveNArgsFromStack(AbstractInstruction * self_in_genRemoveNArgsFromStack, sqInt n) NoDbgRegParms; +static AbstractInstruction * genRestoreRegs(AbstractInstruction * self_in_genRestoreRegs) NoDbgRegParms; +static AbstractInstruction * genRestoreRegsExcept(AbstractInstruction * self_in_genRestoreRegsExcept, sqInt abstractReg) NoDbgRegParms; +static AbstractInstruction * genSaveRegisters(AbstractInstruction * self_in_genSaveRegisters) NoDbgRegParms; +static sqInt genSaveStackPointers(AbstractInstruction * self_in_genSaveStackPointers) NoDbgRegParms; +static AbstractInstruction * genSubstituteReturnAddress(AbstractInstruction * self_in_genSubstituteReturnAddress, sqInt retpc) NoDbgRegParms; +static sqInt hasLinkRegister(AbstractInstruction * self_in_hasLinkRegister) NoDbgRegParms; +static sqInt hasPCDependentInstruction(AbstractInstruction * self_in_hasPCDependentInstruction) NoDbgRegParms; +static sqInt hasPCRegister(AbstractInstruction * self_in_hasPCRegister) NoDbgRegParms; +static sqInt inlineCacheTagAt(AbstractInstruction * self_in_inlineCacheTagAt, sqInt callSiteReturnAddress) NoDbgRegParms; +static sqInt instructionBeforeAddress(AbstractInstruction * self_in_instructionBeforeAddress, sqInt followingAddress) NoDbgRegParms; +static sqInt instructionIsBLX(AbstractInstruction * self_in_instructionIsBLX, sqInt instr) NoDbgRegParms; +static sqInt instructionIsBL(AbstractInstruction * self_in_instructionIsBL, sqInt instr) NoDbgRegParms; +static sqInt instructionIsBX(AbstractInstruction * self_in_instructionIsBX, sqInt instr) NoDbgRegParms; +static sqInt instructionIsB(AbstractInstruction * self_in_instructionIsB, sqInt instr) NoDbgRegParms; +static sqInt instructionIsOR(AbstractInstruction * self_in_instructionIsOR, sqInt instr) NoDbgRegParms; +static sqInt instructionIsPush(AbstractInstruction * self_in_instructionIsPush, sqInt instr) NoDbgRegParms; +static sqInt instructionSizeAt(AbstractInstruction * self_in_instructionSizeAt, sqInt pc) NoDbgRegParms; +static sqInt isAddressRelativeToVarBase(AbstractInstruction * self_in_isAddressRelativeToVarBase, usqInt varAddress) NoDbgRegParms; +static sqInt isCallPreceedingReturnPC(AbstractInstruction * self_in_isCallPreceedingReturnPC, sqInt mcpc) NoDbgRegParms; +static sqInt isInImmediateJumpRange(AbstractInstruction * self_in_isInImmediateJumpRange, unsigned long operand) NoDbgRegParms; +static sqInt isJumpAt(AbstractInstruction * self_in_isJumpAt, sqInt pc) NoDbgRegParms; +static sqInt isPCDependent(AbstractInstruction * self_in_isPCDependent) NoDbgRegParms; +static sqInt isPCRelativeValueLoad(AbstractInstruction * self_in_isPCRelativeValueLoad, unsigned int instr) NoDbgRegParms; +static sqInt jumpLongByteSize(AbstractInstruction * self_in_jumpLongByteSize) NoDbgRegParms; +static sqInt jumpLongConditionalByteSize(AbstractInstruction * self_in_jumpLongConditionalByteSize) NoDbgRegParms; +static sqInt jumpLongTargetBeforeFollowingAddress(AbstractInstruction * self_in_jumpLongTargetBeforeFollowingAddress, sqInt mcpc) NoDbgRegParms; +static usqInt jumpTargetPCAt(AbstractInstruction * self_in_jumpTargetPCAt, sqInt pc) NoDbgRegParms; +static sqInt ldrbrnplusimm(AbstractInstruction * self_in_ldrbrnplusimm, sqInt destReg, sqInt baseReg, sqInt u, sqInt immediate12bitValue) NoDbgRegParms; +static sqInt ldrbrnrm(AbstractInstruction * self_in_ldrbrnrm, sqInt destReg, sqInt baseReg, sqInt offsetReg) NoDbgRegParms; +static sqInt ldrhrnplusimm(AbstractInstruction * self_in_ldrhrnplusimm, sqInt destReg, sqInt baseReg, sqInt u, sqInt immediate8bitValue) NoDbgRegParms; +static sqInt ldrhrnrm(AbstractInstruction * self_in_ldrhrnrm, sqInt destReg, sqInt baseReg, sqInt offsetReg) NoDbgRegParms; +static sqInt ldrrnplusImm(AbstractInstruction * self_in_ldrrnplusImm, sqInt destReg, sqInt baseReg, sqInt immediate12bitValue) NoDbgRegParms; +static sqInt ldrrnplusimm(AbstractInstruction * self_in_ldrrnplusimm, sqInt destReg, sqInt baseReg, sqInt u, sqInt immediate12bitValue) NoDbgRegParms; +static sqInt ldrrnrm(AbstractInstruction * self_in_ldrrnrm, sqInt destReg, sqInt baseReg, sqInt offsetReg) NoDbgRegParms; +static sqInt leafCallStackPointerDelta(AbstractInstruction * self_in_leafCallStackPointerDelta) NoDbgRegParms; +static sqInt literalBeforeFollowingAddress(AbstractInstruction * self_in_literalBeforeFollowingAddress, sqInt followingAddress) NoDbgRegParms; +static sqInt loadCwInto(AbstractInstruction * self_in_loadCwInto, sqInt destReg) NoDbgRegParms; +static sqInt loadLiteralByteSize(AbstractInstruction * self_in_loadLiteralByteSize) NoDbgRegParms; +static sqInt loadPICLiteralByteSize(AbstractInstruction * self_in_loadPICLiteralByteSize) NoDbgRegParms; +static sqInt machineCodeBytes(AbstractInstruction * self_in_machineCodeBytes) NoDbgRegParms; +static sqInt machineCodeWords(AbstractInstruction * self_in_machineCodeWords) NoDbgRegParms; +static AbstractInstruction * maybeEstablishVarBase(AbstractInstruction * self_in_maybeEstablishVarBase) NoDbgRegParms; +static sqInt memM16xrregbasepuwloffset(AbstractInstruction * self_in_memM16xrregbasepuwloffset, sqInt cond, sqInt destReg, sqInt baseReg, sqInt postpreoffset, sqInt updown, sqInt weirdstuff, sqInt loadstore, sqInt offset8) NoDbgRegParms; +static sqInt memM16xrregbasepuwlrm(AbstractInstruction * self_in_memM16xrregbasepuwlrm, sqInt cond, sqInt destReg, sqInt baseReg, sqInt postpreoffset, sqInt updown, sqInt weirdstuff, sqInt loadstore, sqInt offsetReg) NoDbgRegParms; +static sqInt memMxrregbasepubwlimm(AbstractInstruction * self_in_memMxrregbasepubwlimm, sqInt cond, sqInt destReg, sqInt baseReg, sqInt postpreoffset, sqInt updown, sqInt byteword, sqInt weirdstuff, sqInt loadstore, sqInt offset) NoDbgRegParms; +static sqInt memMxrregbasepubwlrmLsl2(AbstractInstruction * self_in_memMxrregbasepubwlrmLsl2, sqInt cond, sqInt destReg, sqInt baseReg, sqInt postpreoffset, sqInt updown, sqInt byteword, sqInt weirdstuff, sqInt loadstore, sqInt offsetReg) NoDbgRegParms; +static sqInt memMxrregbasepubwlrm(AbstractInstruction * self_in_memMxrregbasepubwlrm, sqInt cond, sqInt destReg, sqInt baseReg, sqInt postpreoffset, sqInt updown, sqInt byteword, sqInt weirdstuff, sqInt loadstore, sqInt offsetReg) NoDbgRegParms; +static sqInt memMxrregbaseublimm(AbstractInstruction * self_in_memMxrregbaseublimm, sqInt cond, sqInt destReg, sqInt baseReg, sqInt updown, sqInt byteword, sqInt loadstore, sqInt immediate12bitValue) NoDbgRegParms; +static sqInt movsrn(AbstractInstruction * self_in_movsrn, sqInt destReg, sqInt srcReg) NoDbgRegParms; +static sqInt movimmror(AbstractInstruction * self_in_movimmror, sqInt destReg, sqInt immediate8bitValue, sqInt rot) NoDbgRegParms; +static sqInt movrn(AbstractInstruction * self_in_movrn, sqInt destReg, sqInt srcReg) NoDbgRegParms; +static sqInt msr(AbstractInstruction * self_in_msr, sqInt flags) NoDbgRegParms; +static sqInt mvnimmror(AbstractInstruction * self_in_mvnimmror, sqInt destReg, sqInt immediate8bitValue, sqInt rot) NoDbgRegParms; +static AbstractInstruction * nopsFromto(AbstractInstruction * self_in_nopsFromto, sqInt startAddr, sqInt endAddr) NoDbgRegParms; +static sqInt numICacheFlushOpcodes(AbstractInstruction * self_in_numICacheFlushOpcodes) NoDbgRegParms; +static sqInt orrimmror(AbstractInstruction * self_in_orrimmror, sqInt destReg, sqInt immediate8bitValue, sqInt rot) NoDbgRegParms; +static AbstractInstruction * padIfPossibleWithNopsFromto(AbstractInstruction * self_in_padIfPossibleWithNopsFromto, sqInt startAddr, sqInt endAddr) NoDbgRegParms; +static sqInt popR(AbstractInstruction * self_in_popR, sqInt dstReg) NoDbgRegParms; +static sqInt pushLinkRegisterByteSize(AbstractInstruction * self_in_pushLinkRegisterByteSize) NoDbgRegParms; +static sqInt pushR(AbstractInstruction * self_in_pushR, sqInt srcReg) NoDbgRegParms; +static AbstractInstruction * relocateCallBeforeReturnPCby(AbstractInstruction * self_in_relocateCallBeforeReturnPCby, sqInt retpc, sqInt delta) NoDbgRegParms; +static AbstractInstruction * relocateMethodReferenceBeforeAddressby(AbstractInstruction * self_in_relocateMethodReferenceBeforeAddressby, sqInt pc, sqInt delta) NoDbgRegParms; +static sqInt rewriteCallAttarget(AbstractInstruction * self_in_rewriteCallAttarget, usqInt callSiteReturnAddress, usqInt callTargetAddress) NoDbgRegParms; +static sqInt rewriteCallFullAttarget(AbstractInstruction * self_in_rewriteCallFullAttarget, sqInt callSiteReturnAddress, sqInt callTargetAddress) NoDbgRegParms; +static sqInt rewriteFullTransferAttargetexpectedInstruction(AbstractInstruction * self_in_rewriteFullTransferAttargetexpectedInstruction, usqInt callSiteReturnAddress, usqInt callTargetAddress, sqInt expectedInstruction) NoDbgRegParms; +static sqInt rewriteInlineCacheAttagtarget(AbstractInstruction * self_in_rewriteInlineCacheAttagtarget, usqInt callSiteReturnAddress, sqInt cacheTag, usqInt callTargetAddress) NoDbgRegParms; +static AbstractInstruction * rewriteInlineCacheTagat(AbstractInstruction * self_in_rewriteInlineCacheTagat, sqInt cacheTag, sqInt callSiteReturnAddress) NoDbgRegParms; +static sqInt rewriteJumpFullAttarget(AbstractInstruction * self_in_rewriteJumpFullAttarget, sqInt callSiteReturnAddress, sqInt callTargetAddress) NoDbgRegParms; +static sqInt setsConditionCodesFor(AbstractInstruction * self_in_setsConditionCodesFor, sqInt aConditionalJumpOpcode) NoDbgRegParms; +static sqInt shiftSetsConditionCodesFor(AbstractInstruction * self_in_shiftSetsConditionCodesFor, sqInt aConditionalJumpOpcode) NoDbgRegParms; +static usqInt sizePCDependentInstructionAt(AbstractInstruction * self_in_sizePCDependentInstructionAt, sqInt eventualAbsoluteAddress) NoDbgRegParms; +static sqInt stackPageInterruptHeadroomBytes(AbstractInstruction * self_in_stackPageInterruptHeadroomBytes) NoDbgRegParms; +static AbstractInstruction * storeLiteralbeforeFollowingAddress(AbstractInstruction * self_in_storeLiteralbeforeFollowingAddress, sqInt literal, sqInt followingAddress) NoDbgRegParms; +static sqInt strbrnplusimm(AbstractInstruction * self_in_strbrnplusimm, sqInt destReg, sqInt baseReg, sqInt u, sqInt immediate12bitValue) NoDbgRegParms; +static sqInt strbrnrm(AbstractInstruction * self_in_strbrnrm, sqInt srcReg, sqInt baseReg, sqInt offsetReg) NoDbgRegParms; +static sqInt strrnplusImm(AbstractInstruction * self_in_strrnplusImm, sqInt srcReg, sqInt baseReg, sqInt immediate12bitValue) NoDbgRegParms; +static sqInt strrnplusimm(AbstractInstruction * self_in_strrnplusimm, sqInt destReg, sqInt baseReg, sqInt u, sqInt immediate12bitValue) NoDbgRegParms; +static sqInt strrnrm(AbstractInstruction * self_in_strrnrm, sqInt srcReg, sqInt baseReg, sqInt offsetReg) NoDbgRegParms; +static sqInt subsrnimmror(AbstractInstruction * self_in_subsrnimmror, sqInt destReg, sqInt srcReg, sqInt immediate, sqInt rot) NoDbgRegParms; +static sqInt subrnimmror(AbstractInstruction * self_in_subrnimmror, sqInt destReg, sqInt srcReg, sqInt immediate, sqInt rot) NoDbgRegParms; +static sqInt tstrnimmror(AbstractInstruction * self_in_tstrnimmror, sqInt ignored, sqInt srcReg, sqInt immediate, sqInt rot) NoDbgRegParms; +static CogMethod * cmHomeMethod(CogBlockMethod * self_in_cmHomeMethod) NoDbgRegParms; +static sqInt isBranch(BytecodeDescriptor * self_in_isBranch) NoDbgRegParms; +static AbstractInstruction * gAddCqR(sqInt quickConstant, sqInt reg) NoDbgRegParms; +static AbstractInstruction * gAndCqR(sqInt quickConstant, sqInt reg) NoDbgRegParms; +static AbstractInstruction * gArithmeticShiftRightRR(sqInt reg1, sqInt reg2) NoDbgRegParms; +sqInt abortOffset(void); +static void addCleanBlockStarts(void); +void addCogMethodsToHeapMap(void); +static sqInt addressIsInCodeZone(sqInt address) NoDbgRegParms; +static sqInt addressIsInFixups(AbstractInstruction *address) NoDbgRegParms; +static sqInt addressIsInInstructions(AbstractInstruction *address) NoDbgRegParms; +static sqInt addressOfEndOfCaseinCPIC(sqInt n, CogMethod *cPIC) NoDbgRegParms; +static sqInt alignUptoRoutineBoundary(sqInt anAddress) NoDbgRegParms; +static sqInt allMachineCodeObjectReferencesValid(void); +static sqInt allMethodsHaveCorrectHeader(void); +static AbstractInstruction * annotateAbsolutePCRef(AbstractInstruction *abstractInstruction) NoDbgRegParms; +static AbstractInstruction * annotateBytecode(AbstractInstruction *abstractInstruction) NoDbgRegParms; +static AbstractInstruction * annotateobjRef(AbstractInstruction *abstractInstruction, sqInt anOop) NoDbgRegParms; +static AbstractInstruction * annotatewith(AbstractInstruction *abstractInstruction, sqInt annotationFlag) NoDbgRegParms; +static sqInt annotationForMcpcin(sqInt mcpc, CogMethod *cogHomeMethod) NoDbgRegParms; +static void assertSaneJumpTarget(AbstractInstruction *jumpTarget) NoDbgRegParms; +static sqInt blockCreationBytecodeSizeForHeader(sqInt methodHeader) NoDbgRegParms; +static sqInt blockDispatchTargetsForperformarg(CogMethod *cogMethod, usqInt (*binaryFunction)(sqInt mcpc, sqInt arg), sqInt arg) NoDbgRegParms; +sqInt bytecodePCForstartBcpcin(sqInt mcpc, sqInt startbcpc, CogBlockMethod *cogMethod); +static AbstractInstruction * CallRT(sqInt callTarget) NoDbgRegParms; +static AbstractInstruction * CallRTregistersToBeSavedMask(sqInt callTarget, sqInt registersToBeSaved) NoDbgRegParms; +static AbstractInstruction * gCall(sqInt callTarget) NoDbgRegParms; +static AbstractInstruction * gCmpCqR(sqInt quickConstant, sqInt reg) NoDbgRegParms; +static AbstractInstruction * gCmpCwR(sqInt wordConstant, sqInt reg) NoDbgRegParms; +static AbstractInstruction * gCmpRR(sqInt reg1, sqInt reg2) NoDbgRegParms; +void callCogCodePopReceiver(void); +void callCogCodePopReceiverAndClassRegs(void); +sqInt ceCPICMissreceiver(CogMethod *cPIC, sqInt receiver); +sqInt ceSICMiss(sqInt receiver); +void checkAssertsEnabledInCogit(void); +static sqInt checkIfValidOopRefAndTargetpccogMethod(sqInt annotation, char *mcpc, sqInt cogMethod) NoDbgRegParms; +static sqInt checkIfValidOopRefpccogMethod(sqInt annotation, char *mcpc, sqInt cogMethod) NoDbgRegParms; +sqInt checkIntegrityOfObjectReferencesInCode(sqInt gcModes); +static sqInt checkMaybeObjRefAt(sqInt mcpc) NoDbgRegParms; +static sqInt checkValidObjectReferencesInClosedPIC(CogMethod *cPIC) NoDbgRegParms; +char * codeEntryFor(char *address); +char * codeEntryNameFor(char *address); +sqInt cogCodeBase(void); +sqInt cogCodeConstituents(void); +static sqInt cogExtendPICCaseNMethodtagisMNUCase(CogMethod *cPIC, sqInt caseNMethod, sqInt caseNTag, sqInt isMNUCase) NoDbgRegParms; +void cogitPostGCAction(sqInt gcMode); +sqInt cogMethodDoesntLookKosher(CogMethod *cogMethod); +CogMethod * cogMNUPICSelectorreceivermethodOperandnumArgs(sqInt selector, sqInt rcvr, sqInt methodOperand, sqInt numArgs); +static CogMethod * cogOpenPICSelectornumArgs(sqInt selector, sqInt numArgs) NoDbgRegParms; +static CogMethod * cogPICSelectornumArgsCase0MethodCase1MethodtagisMNUCase(sqInt selector, sqInt numArgs, CogMethod *case0CogMethod, sqInt case1MethodOrNil, sqInt case1Tag, sqInt isMNUCase) NoDbgRegParms; +CogMethod * cogselector(sqInt aMethodObj, sqInt aSelectorOop); +void compactCogCompiledCode(void); +static AbstractInstruction * compileAbort(void); +static sqInt compileBlockDispatchFromto(sqInt lowBlockStartIndex, sqInt highBlockStartIndex) NoDbgRegParms; +static void compileBlockEntry(BlockStart *blockStart) NoDbgRegParms; +static void compileCallFornumArgsargargargargresultRegsaveRegs(void *aRoutine, sqInt numArgs, sqInt regOrConst0, sqInt regOrConst1, sqInt regOrConst2, sqInt regOrConst3, sqInt resultRegOrNil, sqInt saveRegs) NoDbgRegParms; +static sqInt compileClosedPICPrototype(void); +static AbstractInstruction * compileCPICEntry(void); +static sqInt compileCPICCase0Case1MethodtagisMNUCasenumArgs(CogMethod *cPIC, CogMethod *case0CogMethod, sqInt case1Method, sqInt case1Tag, sqInt isMNUCase, sqInt numArgs) NoDbgRegParms; +static void compileEntry(void); +static sqInt compileMethodBody(void); +static sqInt compileMNUCPICmethodOperandnumArgs(CogMethod *cPIC, sqInt methodOperand, sqInt numArgs) NoDbgRegParms; +static sqInt compilePICAbort(sqInt numArgs) NoDbgRegParms; +static sqInt compilePrimitive(void); +static void compileTrampolineFornumArgsargargargargsaveRegspushLinkRegresultReg(void *aRoutine, sqInt numArgs, sqInt regOrConst0, sqInt regOrConst1, sqInt regOrConst2, sqInt regOrConst3, sqInt saveRegs, sqInt pushLinkReg, sqInt resultRegOrNil) NoDbgRegParms; +static void computeEntryOffsets(void); +static void computeMaximumSizes(void); +static sqInt cPICHasForwardedClass(CogMethod *cPIC) NoDbgRegParms; +static sqInt cPICHasFreedTargets(CogMethod *cPIC) NoDbgRegParms; +static sqInt cPICHasTarget(CogMethod *cPIC, CogMethod *targetMethod) NoDbgRegParms; +static AbstractInstruction * gDivRRQuoRem(sqInt rDivisor, sqInt rDividend, sqInt rQuotient, sqInt rRemainder) NoDbgRegParms; +static sqInt endPCOf(sqInt aMethod) NoDbgRegParms; +void enterCogCodePopReceiver(void); +static sqInt extABytecode(void); +static sqInt extBBytecode(void); +static sqInt fillInBlockHeadersAt(sqInt startAddress) NoDbgRegParms; +static usqInt findBlockMethodWithEntrystartBcpc(sqInt blockEntryMcpc, sqInt startBcpc) NoDbgRegParms; +static sqInt findMapLocationForMcpcinMethod(sqInt targetMcpc, CogMethod *cogMethod) NoDbgRegParms; +CogBlockMethod * findMethodForStartBcpcinHomeMethod(sqInt startbcpc, CogMethod *cogMethod); +static sqInt findIsBackwardBranchMcpcBcpcMatchingMcpc(BytecodeDescriptor *descriptor, sqInt isBackwardBranch, char *mcpc, sqInt bcpc, void *targetMcpc) NoDbgRegParms; +void followForwardedLiteralsIn(CogMethod *cogMethod); +void followForwardedMethods(void); +static sqInt followMaybeObjRefAt(sqInt mcpc) NoDbgRegParms; +static sqInt followMethodReferencesInClosedPIC(CogMethod *cPIC) NoDbgRegParms; +static void freePICsWithFreedTargets(void); +void freeUnmarkedMachineCode(void); +static sqInt genCheckForInterruptsTrampoline(void); +static void (*genEnilopmartForandandforCallcalled(sqInt regArg1, sqInt regArg2, sqInt regArg3, sqInt forCall, char *trampolineName))(void) NoDbgRegParms; +static void genEnilopmartReturn(sqInt forCall) NoDbgRegParms; +static void generateCaptureCStackPointers(sqInt captureFramePointer) NoDbgRegParms; +static void generateClosedPICPrototype(void); +static CogMethod * generateCogMethod(sqInt selector) NoDbgRegParms; +static sqInt generateInstructionsAt(sqInt eventualAbsoluteAddress) NoDbgRegParms; +static sqInt generateMapAtstart(sqInt addressOrNull, sqInt startAddress) NoDbgRegParms; +static void generateOpenPICPrototype(void); +static void generateRunTimeTrampolines(void); +static void generateStackPointerCapture(void); +static void generateTrampolines(void); +static void generateVMOwnerLockFunctions(void); +static sqInt genGetLeafCallStackPointer(void); +static sqInt genInnerPICAbortTrampoline(char *name) NoDbgRegParms; +static sqInt genLoadCStackPointersForPrimCall(void); +static sqInt genNonLocalReturnTrampoline(void); +static sqInt genReturnTrampolineForcalledarg(void *aRoutine, char *aString, sqInt regOrConst0) NoDbgRegParms; +static sqInt genSafeTrampolineForcalled(void *aRoutine, char *aString) NoDbgRegParms; +static sqInt genSafeTrampolineForcalledarg(void *aRoutine, char *aString, sqInt regOrConst0) NoDbgRegParms; +static sqInt genSafeTrampolineForcalledargarg(void *aRoutine, char *aString, sqInt regOrConst0, sqInt regOrConst1) NoDbgRegParms; +static sqInt genSmalltalkToCStackSwitch(sqInt pushLinkReg) NoDbgRegParms; +static sqInt genTrampolineForcalled(void *aRoutine, char *aString) NoDbgRegParms; +static sqInt genTrampolineForcalledargargargresult(void *aRoutine, char *aString, sqInt regOrConst0, sqInt regOrConst1, sqInt regOrConst2, sqInt resultReg) NoDbgRegParms; +static sqInt genTrampolineForcalledargargresult(void *aRoutine, char *aString, sqInt regOrConst0, sqInt regOrConst1, sqInt resultReg) NoDbgRegParms; +static sqInt genTrampolineForcalledargresult(void *aRoutine, char *aString, sqInt regOrConst0, sqInt resultReg) NoDbgRegParms; +static sqInt genTrampolineForcallednumArgsargargargargsaveRegspushLinkRegresultRegappendOpcodes(void *aRoutine, char *trampolineName, sqInt numArgs, sqInt regOrConst0, sqInt regOrConst1, sqInt regOrConst2, sqInt regOrConst3, sqInt saveRegs, sqInt pushLinkReg, sqInt resultRegOrNil, sqInt appendBoolean) NoDbgRegParms; +static AbstractInstruction * gen(sqInt opcode) NoDbgRegParms; +static AbstractInstruction * genoperand(sqInt opcode, sqInt operand) NoDbgRegParms; +static AbstractInstruction * genoperandoperand(sqInt opcode, sqInt operandOne, sqInt operandTwo) NoDbgRegParms; +static AbstractInstruction * genoperandoperandoperand(sqInt opcode, sqInt operandOne, sqInt operandTwo, sqInt operandThree) NoDbgRegParms; +static sqInt getLiteral(sqInt litIndex) NoDbgRegParms; +static sqInt incrementUsageOfTargetIfLinkedSendmcpcignored(sqInt annotation, char *mcpc, sqInt superfluity) NoDbgRegParms; +static sqInt initialClosedPICUsageCount(void); +static void initializeBackend(void); +static sqInt initialMethodUsageCount(void); +static sqInt initialOpenPICUsageCount(void); +static sqInt inverseBranchFor(sqInt opcode) NoDbgRegParms; +static sqInt isBackwardBranchatextsin(BytecodeDescriptor *descriptor, sqInt pc, sqInt nExts, sqInt aMethodObj) NoDbgRegParms; +static sqInt isPCMappedAnnotation(sqInt annotation) NoDbgRegParms; +sqInt isPCWithinMethodZone(void *address); +sqInt isSendReturnPC(sqInt retpc); +static AbstractInstruction * gJumpFPEqual(void *jumpTarget) NoDbgRegParms; +static AbstractInstruction * gJumpFPGreaterOrEqual(void *jumpTarget) NoDbgRegParms; +static AbstractInstruction * gJumpFPGreater(void *jumpTarget) NoDbgRegParms; +static AbstractInstruction * gJumpFPLessOrEqual(void *jumpTarget) NoDbgRegParms; +static AbstractInstruction * gJumpFPLess(void *jumpTarget) NoDbgRegParms; +static AbstractInstruction * gJumpFPNotEqual(void *jumpTarget) NoDbgRegParms; +static AbstractInstruction * gJumpZero(void *jumpTarget) NoDbgRegParms; +static AbstractInstruction * gLabel(void); +static AbstractInstruction * gLogicalShiftLeftCqR(sqInt quickConstant, sqInt reg) NoDbgRegParms; +static AbstractInstruction * lastOpcode(void); +void linkSendAtintooffsetreceiver(sqInt callSiteReturnAddress, CogMethod *sendingMethod, CogMethod *targetMethod, sqInt theEntryOffset, sqInt receiver); +static void loadSubsequentBytesForDescriptorat(BytecodeDescriptor *descriptor, sqInt pc) NoDbgRegParms; +static AbstractInstruction * gMoveAwR(sqInt address, sqInt reg) NoDbgRegParms; +static AbstractInstruction * gMoveCwR(sqInt wordConstant, sqInt reg) NoDbgRegParms; +static AbstractInstruction * gMoveMwrR(sqInt offset, sqInt baseReg, sqInt destReg) NoDbgRegParms; +static AbstractInstruction * gMoveRMwr(sqInt sourceReg, sqInt offset, sqInt baseReg) NoDbgRegParms; +static AbstractInstruction * gMoveRR(sqInt reg1, sqInt reg2) NoDbgRegParms; +static AbstractInstruction * gMulRR(sqInt reg1, sqInt reg2) NoDbgRegParms; +static sqInt mapEndFor(CogMethod *cogMethod) NoDbgRegParms; +static sqInt mapForperformUntilarg(CogMethod *cogMethod, int (*functionSymbol)(sqInt annotation, char *mcpc, sqInt arg), sqInt arg) NoDbgRegParms; +static sqInt mapObjectReferencesInClosedPIC(CogMethod *cPIC) NoDbgRegParms; +static void mapObjectReferencesInGeneratedRuntime(void); +static void mapObjectReferencesInMachineCodeForBecome(void); +static void mapObjectReferencesInMachineCodeForFullGC(void); +static void mapObjectReferencesInMachineCodeForYoungGC(void); +void mapObjectReferencesInMachineCode(sqInt gcMode); +void markAndTraceMachineCodeOfMarkedMethods(void); +static void markAndTraceObjectReferencesInGeneratedRuntime(void); +static sqInt markLiteralspcmethod(sqInt annotation, char *mcpc, sqInt cogMethod) NoDbgRegParms; +void markMethodAndReferents(CogBlockMethod *aCogMethod); +usqInt maxCogMethodAddress(void); +static sqInt maybeAllocAndInitIRCs(void); +static sqInt maybeFreeCogMethodDoesntLookKosher(CogMethod *cogMethod) NoDbgRegParms; +static sqInt maybeGenerateCheckFeatures(void); +static sqInt maybeGenerateICacheFlush(void); +static sqInt mclassIsSmallInteger(sqInt ignoredPrimIndex) NoDbgRegParms; +usqInt mcPCForBackwardBranchstartBcpcin(sqInt bcpc, sqInt startbcpc, CogBlockMethod *cogMethod); +static sqInt methodhasSameCodeAscheckPenultimate(sqInt methodA, sqInt methodB, sqInt comparePenultimateLiteral) NoDbgRegParms; +sqInt minCogMethodAddress(void); +sqInt mnuOffset(void); +static AbstractInstruction * gNegateR(sqInt reg) NoDbgRegParms; +static sqInt needsFrameIfInBlock(sqInt stackDelta) NoDbgRegParms; +static sqInt needsFrameNever(sqInt stackDelta) NoDbgRegParms; +static sqInt noAssertMethodClassAssociationOf(sqInt methodPointer) NoDbgRegParms; +static sqInt noCogMethodsMaximallyMarked(void); +static sqInt noTargetsFreeInClosedPIC(CogMethod *cPIC) NoDbgRegParms; +static sqInt outputInstructionsAt(sqInt startAddress) NoDbgRegParms; +static sqInt outputInstructionsForGeneratedRuntimeAt(sqInt startAddress) NoDbgRegParms; +static AbstractInstruction * gPopR(sqInt reg) NoDbgRegParms; +static AbstractInstruction * gPushCw(sqInt wordConstant) NoDbgRegParms; +sqInt patchToOpenPICFornumArgsreceiver(sqInt selector, sqInt numArgs, sqInt receiver); +sqInt pcisWithinMethod(char *address, CogMethod *cogMethod); +static sqInt picAbortDiscriminatorValue(void); +static PrimitiveDescriptor * primitiveGeneratorOrNil(void); +void printCogMethodFor(void *address); +void printTrampolineTable(void); +static sqInt processorHasDivQuoRemAndMClassIsSmallInteger(sqInt ignoredPrimIndex) NoDbgRegParms; +static sqInt processorHasDivQuoRem(sqInt ignoredPrimIndex) NoDbgRegParms; +static sqInt processorHasDoublePrecisionFloatingPointSupport(sqInt ignoredPrimIndex) NoDbgRegParms; +static sqInt processorHasMultiplyAndMClassIsSmallInteger(sqInt ignoredPrimIndex) NoDbgRegParms; +static sqInt processorHasMultiply(sqInt ignoredPrimIndex) NoDbgRegParms; +static AbstractInstruction * gRetN(sqInt offset) NoDbgRegParms; +static void recordGeneratedRunTimeaddress(char *aString, sqInt address) NoDbgRegParms; +sqInt recordPrimTraceFunc(void); +static void recordRunTimeObjectReferences(void); +static sqInt registerMaskFor(sqInt reg) NoDbgRegParms; +static sqInt registerMaskForand(sqInt reg1, sqInt reg2) NoDbgRegParms; +static void relocateCallsAndSelfReferencesInMethod(CogMethod *cogMethod) NoDbgRegParms; +static void relocateCallsInClosedPIC(CogMethod *cPIC) NoDbgRegParms; +static sqInt relocateIfCallOrMethodReferencemcpcdelta(sqInt annotation, char *mcpc, sqInt delta) NoDbgRegParms; +static sqInt relocateMethodsPreCompaction(void); +static sqInt remapIfObjectRefpchasYoung(sqInt annotation, char *mcpc, sqInt hasYoungPtr) NoDbgRegParms; +static AbstractInstruction * gSubCwR(sqInt wordConstant, sqInt reg) NoDbgRegParms; +static sqInt scanForCleanBlocks(void); +void setBreakMethod(sqInt anObj); +void setPostCompileHook(void (*aFunction)(CogMethod *, void *)); +void setSelectorOfto(CogMethod *cogMethod, sqInt aSelectorOop); +static sqInt spanForCleanBlockStartingAt(sqInt startPC) NoDbgRegParms; +sqInt traceLinkedSendOffset(void); +static char * trampolineNamenumArgs(char *routinePrefix, sqInt numArgs) NoDbgRegParms; +static sqInt unimplementedPrimitive(void); +static sqInt unknownBytecode(void); +void unlinkAllSends(void); +static sqInt unlinkIfFreeOrLinkedSendpcof(sqInt annotation, char *mcpc, sqInt theSelector) NoDbgRegParms; +static sqInt unlinkIfInvalidClassSendpcignored(sqInt annotation, char *mcpc, sqInt superfluity) NoDbgRegParms; +static sqInt unlinkIfLinkedSendToFreepcignored(sqInt annotation, char *mcpc, sqInt superfluity) NoDbgRegParms; +static sqInt unlinkIfLinkedSendpcignored(sqInt annotation, char *mcpc, sqInt superfluity) NoDbgRegParms; +static sqInt unlinkIfLinkedSendpcto(sqInt annotation, char *mcpc, sqInt theCogMethod) NoDbgRegParms; +void unlinkSendsLinkedForInvalidClasses(void); +void unlinkSendsOfisMNUSelector(sqInt selector, sqInt isMNUSelector); +void unlinkSendsToFree(void); +void unlinkSendsToandFreeIf(sqInt targetMethodObject, sqInt freeIfTrue); +static sqInt updateMaybeObjRefAt(sqInt mcpc) NoDbgRegParms; +static AbstractInstruction * gXorCwR(sqInt wordConstant, sqInt reg) NoDbgRegParms; +static void zeroOpcodeIndex(void); +void addAllToYoungReferrers(void); +static void addToOpenPICList(CogMethod *anOpenPIC) NoDbgRegParms; +static void addToYoungReferrers(CogMethod *cogMethod) NoDbgRegParms; +static sqInt allocate(sqInt numBytes) NoDbgRegParms; +static void clearCogCompiledCode(void); +static void compactCompiledCode(void); +static void ensureInYoungReferrers(CogMethod *cogMethod) NoDbgRegParms; +void freeMethod(CogMethod *cogMethod); +static void freeOlderMethodsForCompaction(void); +static sqInt kosherYoungReferrers(void); +static void manageFromto(sqInt theStartAddress, sqInt theLimitAddress) NoDbgRegParms; +CogMethod * methodFor(void *address); +static sqInt numMethods(void); +sqInt numMethodsOfType(sqInt cogMethodType); +static sqInt occurrencesInYoungReferrers(CogMethod *cogMethod) NoDbgRegParms; +static CogMethod * openPICWithSelector(sqInt aSelector) NoDbgRegParms; +static void planCompaction(void); +void printCogMethods(void); +void printCogMethodsOfType(sqInt cmType); +void printCogMethodsWithMethod(sqInt methodOop); +void printCogMethodsWithPrimitive(sqInt primIdx); +void printCogMethodsWithSelector(sqInt selectorOop); +void printCogYoungReferrers(void); +void printOpenPICList(void); +static sqInt pruneYoungReferrers(void); +static sqInt relocateAndPruneYoungReferrers(void); +static sqInt removeFromOpenPICList(CogMethod *anOpenPIC) NoDbgRegParms; +static void voidYoungReferrersPostTenureAll(void); +char * whereIsMaybeCodeThing(sqInt anOop); +static sqInt checkValidObjectReference(sqInt anOop) NoDbgRegParms; +static AbstractInstruction * genCmpClassFloatCompactIndexR(sqInt reg) NoDbgRegParms; +static sqInt genInnerPrimitiveNewMethod(sqInt retNoffset) NoDbgRegParms; +static sqInt isUnannotatableConstant(CogSimStackEntry *simStackEntry) NoDbgRegParms; +static sqInt genAddSmallIntegerTagsTo(sqInt aRegister) NoDbgRegParms; +static void genCmpClassIndexR(sqInt classIndex, sqInt reg) NoDbgRegParms; +static void genConvertCharacterToSmallIntegerInReg(sqInt reg) NoDbgRegParms; +static sqInt genConvertIntegerToSmallIntegerInReg(sqInt reg) NoDbgRegParms; +static void genConvertSmallIntegerToCharacterInReg(sqInt reg) NoDbgRegParms; +static sqInt genConvertSmallIntegerToIntegerInReg(sqInt reg) NoDbgRegParms; +static sqInt genCreateClosureAtnumArgsnumCopiedcontextNumArgslargeinBlock(sqInt bcpc, sqInt numArgs, sqInt numCopied, sqInt ctxtNumArgs, sqInt isLargeCtxt, sqInt isInBlock) NoDbgRegParms; +static sqInt genFetchIndexRegisterfrominto(sqInt indexReg, sqInt tableObj, sqInt destReg) NoDbgRegParms; +static sqInt genGetActiveContextLargeinBlock(sqInt isLarge, sqInt isInBlock) NoDbgRegParms; +static AbstractInstruction * genGetClassTagOfintoscratchReg(sqInt instReg, sqInt destReg, sqInt scratchReg) NoDbgRegParms; +static sqInt genGetHashFieldNonImmOfasSmallIntegerInto(sqInt instReg, sqInt destReg) NoDbgRegParms; +static sqInt genGetHashFieldNonImmOfinto(sqInt instReg, sqInt destReg) NoDbgRegParms; +static AbstractInstruction * genGetInlineCacheClassTagFromintoforEntry(sqInt sourceReg, sqInt destReg, sqInt forEntry) NoDbgRegParms; +static sqInt genGetNumBytesOfinto(sqInt srcReg, sqInt destReg) NoDbgRegParms; +static sqInt genGetNumSlotsOfinto(sqInt srcReg, sqInt destReg) NoDbgRegParms; +static sqInt genGetOverflowSlotsOfinto(sqInt srcReg, sqInt destReg) NoDbgRegParms; +static sqInt genInnerPrimitiveAtPut(sqInt retNoffset) NoDbgRegParms; +static sqInt genInnerPrimitiveAt(sqInt retNoffset) NoDbgRegParms; +static sqInt genInnerPrimitiveIdentityHash(sqInt retNoffset) NoDbgRegParms; +static sqInt genInnerPrimitiveNewWithArg(sqInt retNoffset) NoDbgRegParms; +static sqInt genInnerPrimitiveNew(sqInt retNoffset) NoDbgRegParms; +static sqInt genInnerPrimitiveStringAtPut(sqInt retNoffset) NoDbgRegParms; +static sqInt genInnerPrimitiveStringAt(sqInt retNoffset) NoDbgRegParms; +static AbstractInstruction * genJumpNotSmallIntegerInScratchReg(sqInt aRegister) NoDbgRegParms; +static AbstractInstruction * genJumpSmallIntegerInScratchReg(sqInt aRegister) NoDbgRegParms; +static sqInt genNewArrayOfSizeinitialized(sqInt size, sqInt initialized) NoDbgRegParms; +static sqInt genNoPopCreateClosureAtnumArgsnumCopiedcontextNumArgslargeinBlock(sqInt bcpc, sqInt numArgs, sqInt numCopied, sqInt ctxtNumArgs, sqInt isLargeCtxt, sqInt isInBlock) NoDbgRegParms; +static sqInt genRemoveSmallIntegerTagsInScratchReg(sqInt scratchReg) NoDbgRegParms; +static sqInt genSetSmallIntegerTagsIn(sqInt scratchReg) NoDbgRegParms; +static sqInt genShiftAwaySmallIntegerTagsInScratchReg(sqInt scratchReg) NoDbgRegParms; +static sqInt inlineCacheTagForInstance(sqInt oop) NoDbgRegParms;
@@ Diff output truncated at 50000 characters. @@
vm-dev@lists.squeakfoundation.org