Download Dynamic DX-ARC-SWB User guide
Transcript
150 CHAPTER 8. THE DESIGN OF OCODE Statement GETBYTE MULT FMULT DIV FDIV REM PLUS FPLUS MINUS FMINUS EQ FEQ NE FNE LS FLS GR FGR LE FLE GE FGE LSHIFT RSHIFT LOGAND LOGOR EQV NEQV Meaning S := S-1; S := S-1; S := S-1; S := S-1; S := S-1; S := S-1; S := S-1; S := S-1; S := S-1; S := S-1; S := S-1; S := S-1; S := S-1; S := S-1; S := S-1; S := S-1; S := S-1; S := S-1; S := S-1; S := S-1; S := S-1; S := S-1; S := S-1; S := S-1; S := S-1; S := S-1; S := S-1; S := S-1; P!(S-1) P!(S-1) P!(S-1) P!(S-1) P!(S-1) P!(S-1) P!(S-1) P!(S-1) P!(S-1) P!(S-1) P!(S-1) P!(S-1) P!(S-1) P!(S-1) P!(S-1) P!(S-1) P!(S-1) P!(S-1) P!(S-1) P!(S-1) P!(S-1) P!(S-1) P!(S-1) P!(S-1) P!(S-1) P!(S-1) P!(S-1) P!(S-1) := := := := := := := := := := := := := := := := := := := := := := := := := := := := P!(S-1) P!(S-1) P!(S-1) P!(S-1) P!(S-1) P!(S-1) P!(S-1) P!(S-1) P!(S-1) P!(S-1) P!(S-1) P!(S-1) P!(S-1) P!(S-1) P!(S-1) P!(S-1) P!(S-1) P!(S-1) P!(S-1) P!(S-1) P!(S-1) P!(S-1) P!(S-1) P!(S-1) P!(S-1) P!(S-1) P!(S-1) P!(S-1) % P!S * P!S #* P!S / P!S #/ P!S REM P!S + P!S #+ P!S - P!S #- P!S = P!S #= P!S ∼= P!S #∼= P!S < P!S #< P!S > P!S #> P!S <= P!S #<= P!S >= P!S #>= P!S << P!S >> P!S & P!S | P!S EQV P!S NEQV P!S Vector subscription (E1 !E2 is implemented using PLUS and RV. 8.6 Functions and Routines The design of the OCODE statements for the implementation of function and routine calls have been designed with care to allow code generators as much freedom as possible. The mechanism allows some arguments to be passed in registers if this is worthwhile, and the distribution of work between the code for a call and the code at the entry point is up to the implementer. In a typical program there are about five calls for each function or routine and so there is some incentive to keep the size of the call small by transferring some of the work to the save sequence. The compilation of a function or routine definition generates an OCODE sequence of the following form: