! ! E MACHINE OPERAND FORMS ! ----------------------- ! ! Simple Forms ! ------------ ! ! Litval ! corresponding address none (but see note A) ! ! The operand is a literal ! ! Regval& Fregval (also Regaddr & Regvar) ! corresponding address forms:- none (but see note A) ! ! The operand is in a Register - the form Regaddr ! is used when the operand is known to be an ! address but for code generation there is no ! difference. Care must be taken with Regvar ! not to overwrite it except at assignment ! ! Dirval (also Constval,TempVal,Diraddr & Tempaddr) ! corresponding address forms:- AddrDir, AddrConst and AddrDir. ! ! The operand is at a known offset in an E-machine ! area. Constval implies Constant (read only) - ! TempVal implies local stack frame and single use ! so libraries can be taken like increment in situ. ! The forms Diraddr & Tempaddr are used when the ! location is known to contain an address but for ! code generation there are no differences. ! ! ! Indirect Forms ! -------------- ! ! IndDirVal, IndTempVal and IndRegVal ! corresponding address forms:- DirVal, TempVal & Regaddr ! ! There is a pointer to the item in an E-machine and ! (or register). Pointers are 32 bit items. ! ! Modified Forms ! -------------- ! ! IndRegModVal ! Corresponding address form:- RegModAddr ! ! The operand is somewhere in store; its address is ! computed by incrementing the register by a modifier ! - not always a literal. Used for array elements and ! items in mapped records. ! ! Ind DirModVal and IndTempModVal ! corresponding address forms:- DirModAddr and TempModAddr ! ! The operand is anywhere in store; its address is ! computed by loading a base pointer from an E-machine ! area (or temparray) and adding a modifier. Items in ! IMP and Pascal global stack frames are accessed thus; ! in these cases the modifier is a literal. Also dynamic ! arrays are via this mechanism. ! ! AddrDirModVal ! corresponding address form:- AddrDirMod ! ! The operand is part of an array with fixed bounds in ! an E-machine area. The first item (A(O)) is specified ! together with a modifier. The address of the item is ! the address of the base incremented by a modifier - ! optimisations are possible for constant modifiers. ! ! ! NOTES ! ----- ! ! A) Certain forms which do not logically have an address are given one ! by storing the value in a temporary; this is for Fortran but should ! not be part of the E-machine. Fortran should do this at a higher ! level. ! ! B) Where there is hardware assistance for a display it is desirable ! for display items to be distinguished from array access. Here ! IndDispModVal and DispModAddr are used. Logically the same ! as IndDirModVal (etc). !