From: SMTP%"ARNE@ko.hhs.dk" 31-DEC-1994 12:56:30.04 To: EVERHART CC: Subj: Re: Port VAX Macro to AXP From: Arne Vajhoej X-Newsgroups: comp.os.vms Subject: Re: Port VAX Macro to AXP Message-ID: <01HLAMPZRQCY8WXSGB@kopc.hhs.dk> Date: Sat, 31 Dec 1994 13:34:51 +0100 Organization: Info-Vax<==>Comp.Os.Vms Gateway X-Gateway-Source-Info: Mailing List Lines: 88 To: Info-VAX@Mvb.Saic.Com > Several years back, the Macro subroutine F_FILE_ATTR.MAR was posted to > INFOVAX as a convenient solution for people who wanted to use the features > of the DCL lexical function F$FILE_ATTRIBUTES from within their FORTRAN or > C programs. It has done the job for me so far, but now I need to port my > application to OpenVMS AXP. > > A quick attempt with the assembler on the Alpha indicates problems > (diagnostics are listed below). I don't know enough about the assembly > language of either the VAX or AXP processors to be sure that I can solve the > problems. So, before I put time into the project, I'll ask: It is 1 warning and 2 informationals ! The code is actual working ! > 1. If you have ported F_FILE_ATTR.MAR for use on an ALPHA, would you > please post it to INFO_VAX or mail it to me? It is simple to remove the "errors". See below. > I've included the original F_FILE_ATTR.MAR as a VMS_SHARE structure at the > end of this posting for anyone who may be interested in looking at the code. > (All 3 files in the VMS_SHARE structure are included in this one message which > I realize partially defeats the purpose of VMS_SHARE, but does make it easy for > you to ignore this posting. :-) ) > L060: CASEW R9,#F_ALQ,#14 ; Branch to appropriate code. > ^ > %AMAC-W-TOOFEWCAS, too few CASE destinations found > at line number 485 in file MYDISK:[DIRECTORY]F_FILE_ATTR.MAR;1 From the code fragment: L060: CASEW R9,#F_ALQ,#14 ; Branch to appropriate code. ICODES: .WORD ALQ-ICODES ; The following codes all return .WORD BKS-ICODES ; integer values. .WORD BLS-ICODES .WORD DEQ-ICODES .WORD EOF-ICODES .WORD FSZ-ICODES .WORD GRP-ICODES .WORD MBM-ICODES .WORD MRN-ICODES .WORD MRS-ICODES .WORD NOA-ICODES .WORD NOK-ICODES .WORD PVN-ICODES .WORD RVN-ICODES BRW FAILURE ; Bad code. Actually there is a programming bug here ! The VMS VAX assembler did not find it, but the VMS AXP compiler did ! Change from: L060: CASEW R9,#F_ALQ,#14 ; Branch to appropriate code. to: L060: CASEW R9,#F_ALQ,#13 ; Branch to appropriate code. > MOVQ @4(AP),INP_LOG_NAM_D ; Move input logical descriptor. > ^ > %AMAC-I-MEMREFNOT, memory reference not naturally aligned in routine > F_FILE_ATTRIBUTES > at line number 440 in file MYDISK:[DIRECTORY]F_FILE_ATTR.MAR;1 > L080: MOVQ (R6),OUTBUF_DESC ; Output is a string. Get > ^ > %AMAC-I-QUADMEMREF, quadword memory references may be unaligned in routine > F_FILE_ATTRIBUTES > at line number 514 in file MYDISK:[DIRECTORY]F_FILE_ATTR.MAR;1 You can ignore those two informationals or substitute each MOVQ with two MOVL's ! The compilers is telling you, that it can not detremine whether the quadwords being moved is proper aligned (quadword aligned) and if they are not, then there may be a significant performance decrease. This is not relevant for this routine ! Arne Arne Vajhøj local DECNET: KO::ARNE Computer Department PSI: PSI%238310013040::ARNE Southern Denmark Business School Internet: ARNE@KO.HHS.DK WWW URL: http://www.hhs.dk/~arne/arne.html