mirror of
https://github.com/SEPPDROID/Digital-Research-Source-Code.git
synced 2025-10-23 00:14:25 +00:00
Upload
Digital Research
This commit is contained in:
88
ASSEMBLY & COMPILE TOOLS/PLM VAX COMPILER/plmudi/shifts.mar
Normal file
88
ASSEMBLY & COMPILE TOOLS/PLM VAX COMPILER/plmudi/shifts.mar
Normal file
@@ -0,0 +1,88 @@
|
||||
.TITLE SHIFTS. PLM RUNTIME LIBRARY: ROL, ET AL.
|
||||
;-----------------------------------------------------------------------
|
||||
;
|
||||
; D I S C L A I M E R N O T I C E
|
||||
; ------------------- -----------
|
||||
;
|
||||
; This document and/or portions of the material and data furnished
|
||||
; herewith, was developed under sponsorship of the U. S. Government.
|
||||
; Neither the U.S. nor the U.S.D.O.E., nor the Leland Stanford Junior
|
||||
; University, nor their employees, nor their respective contractors,
|
||||
; subcontractors, or their employees, makes any warranty, express or
|
||||
; implied, or assumes any liability or responsibility for accuracy,
|
||||
; completeness or usefulness of any information, apparatus, product
|
||||
; or process disclosed, or represents that its use will not infringe
|
||||
; privately-owned rights. Mention of any product, its manufacturer,
|
||||
; or suppliers shall not, nor is it intended to, imply approval, dis-
|
||||
; approval, or fitness for any particular use. The U. S. and the
|
||||
; University at all times retain the right to use and disseminate same
|
||||
; for any purpose whatsoever. Such distribution shall be made by the
|
||||
; National Energy Software Center at the Argonne National Laboratory
|
||||
; and only subject to the distributee furnishing satisfactory proof
|
||||
; that he has a valid license from the Intel Corporation in effect.
|
||||
;
|
||||
;-----------------------------------------------------------------------
|
||||
.PSECT PLMRUN_CODE,RD,NOWRT,EXE,GBL,CON,LONG
|
||||
|
||||
;
|
||||
; B = ROL(PATTERN,COUNT)
|
||||
;
|
||||
|
||||
PATTERN=4 ; BYTE OR WORD.
|
||||
COUNT=8 ; BYTE
|
||||
|
||||
.ENTRY ROL.,^M<>
|
||||
MOVZBL PATTERN(AP),R0
|
||||
MULL2 #^X01010101,R0 ; REPLICATE BYTE 4 TIMES.
|
||||
ROTL COUNT(AP),R0,R0
|
||||
RET
|
||||
|
||||
;
|
||||
; B = ROR(PATTERN,COUNT)
|
||||
;
|
||||
|
||||
.ENTRY ROR.,^M<>
|
||||
MOVZBL PATTERN(AP),R0
|
||||
MULL2 #^X01010101,R0 ; REPLICATE BYTE 4 TIMES.
|
||||
MNEGB COUNT(AP),R1
|
||||
ROTL R1,R0,R0
|
||||
RET
|
||||
|
||||
;
|
||||
; W = SHL(PATTERN,COUNT)
|
||||
;
|
||||
|
||||
.ENTRY SHL.,^M<>
|
||||
MOVZWL PATTERN(AP),R0
|
||||
ASHL COUNT(AP),R0,R0
|
||||
RET
|
||||
|
||||
;
|
||||
; W = SHR(PATTERN,COUNT)
|
||||
;
|
||||
|
||||
.ENTRY SHR.,^M<>
|
||||
MOVZWL PATTERN(AP),R0
|
||||
MNEGB COUNT(AP),R1
|
||||
ASHL R1,R0,R0
|
||||
RET
|
||||
|
||||
;
|
||||
; I = SAL(PATTERN,COUNT)
|
||||
;
|
||||
|
||||
.ENTRY SAL.,^M<>
|
||||
CVTWL PATTERN(AP),R0
|
||||
ASHL COUNT(AP),R0,R0
|
||||
RET
|
||||
|
||||
;
|
||||
; I = SAR(PATTERN,COUNT)
|
||||
;
|
||||
|
||||
.ENTRY SAR.,^M<>
|
||||
CVTWL PATTERN(AP),R0
|
||||
MNEGB COUNT(AP),R1
|
||||
ASHL R1,R0,R0
|
||||
RET
|
||||
.END
|
Reference in New Issue
Block a user