[Info-vax] Porting old stuff from VAX to Itanium...

John Reagan xyzzy1959 at gmail.com
Sun Aug 26 12:16:49 EDT 2018


On Sunday, August 26, 2018 at 11:45:29 AM UTC-4, Marc Van Dyck wrote:

I'll answer each.

TL;DR.  All of these are benign and the 

> Dusted off some old code I want to re-use, and got the following errors
> when compiling and linking :
> 
> $ pascal /environment = int: /object = int: src:dspn$shr.pas
> 
>         tcpip_addr := dspn$data.node[node_index].tcpip_addr;
> ........^
> %PASCAL-W-UNAVOLACC, Volatile access appears unaligned, but must be 
> aligned at run-time to ensure atomicity and byte granularity
> at line number 835 in file SYS:[010.I64.SRC]DSPN$SHR.PAS;3
> %PASCAL-W-ENDDIAGS, PASCAL completed with 1 diagnostic
> 

Do you need your record layout to be the same as on the VAX?  Are you passing it around to other routines in other languages?   If you are using PACKED, you can just remove it and let the compiler naturally align the fields to get that 'tcpip_addr' field on an aligned boundary.  Look at SYS$HELP:PASCAL_RECORD_LAYOUT_GUIDE.MEM for more info.   For VAX code, you sometimes need to use /ALIGNMENT=VAX.  (For example, STARLET.PAS is built with /ALIGN=VAX since things like FABs/RABs/etc. are still byte-aligned from their VAX heritage).

Why are you using VOLATILE to begin with?  Somebody take the address of that variable and is writing into asychronously?


> $ macro /migrate /object = int: src:basedit.mar
> 
> $ link /share = exe:dspn$shr.exe src:dspn$shr.opt /options
> %ILINK-I-PSCATTIGN, psect attribute NOPIC is not supported for OpenVMS 
> ELF sections, attribute ignored

You have non-PIC code from the VAX?  There is no such thing on Alpha or Itanium (and x86).  All code generated by the compilers is PIC.  Just remove the NOPIC.

> %ILINK-W-COMPWARN, compilation warnings
>         module: DSPN$SHR
>         file: SYS:[010.I64.INT]DSPN$SHR.OBJ;3
> %ILINK-W-LNKGERR, linkage to routine STR$COPY_R_R8 is not compatible 
> with linkage of caller
>         calling module: BAS$EDIT
>                 file: SYS:[010.I64.INT]BASEDIT.OBJ;3
>         target  module: LIBRTL
>                 file: SYS$COMMON:[SYSLIB]LIBRTL.EXE;1
>         IA64 register R3 (Alpha R3) -- call=OUTPUT, target=SCRATCH
>         IA64 register R4 (Alpha R4) -- call=OUTPUT, target=SCRATCH
>         IA64 register R5 (Alpha R5) -- call=OUTPUT, target=SCRATCH
>         IA64 register R6 (Alpha R6) -- call=OUTPUT, target=SCRATCH
>         IA64 register R7 (Alpha R7) -- call=OUTPUT, target=SCRATCH
>         IA64 register R19 (Alpha R21) -- call=OUTPUT, target=SCRATCH
>         IA64 register R20 (Alpha R14) -- call=OUTPUT, target=SCRATCH
>         IA64 register R21 (Alpha R15) -- call=OUTPUT, target=SCRATCH
>         IA64 register R22 (Alpha R22) -- call=OUTPUT, target=SCRATCH
>         IA64 register R23 (Alpha R23) -- call=OUTPUT, target=SCRATCH
>         IA64 register R24 (Alpha R24) -- call=OUTPUT, target=SCRATCH
>         IA64 register R26 (Alpha R8) -- call=OUTPUT, target=SCRATCH
>         IA64 register R28 (Alpha R2) -- call=OUTPUT, target=SCRATCH
>         IA64 register R30 (Alpha R12) -- call=OUTPUT, target=SCRATCH
>         IA64 register R31 (Alpha R13) -- call=OUTPUT, target=SCRATCH
> %ILINK-W-LNKGERR, linkage to routine STR$COPY_DX_R8 is not compatible 
> with linkage of caller
>         calling module: BAS$EDIT
>                 file: SYS:[010.I64.INT]BASEDIT.OBJ;3
>         target  module: LIBRTL
>                 file: SYS$COMMON:[SYSLIB]LIBRTL.EXE;1
>         IA64 register R3 (Alpha R3) -- call=OUTPUT, target=SCRATCH
>         IA64 register R4 (Alpha R4) -- call=OUTPUT, target=SCRATCH
>         IA64 register R5 (Alpha R5) -- call=OUTPUT, target=SCRATCH
>         IA64 register R6 (Alpha R6) -- call=OUTPUT, target=SCRATCH
>         IA64 register R7 (Alpha R7) -- call=OUTPUT, target=SCRATCH
>         IA64 register R19 (Alpha R21) -- call=OUTPUT, target=SCRATCH
>         IA64 register R20 (Alpha R14) -- call=OUTPUT, target=SCRATCH
>         IA64 register R21 (Alpha R15) -- call=OUTPUT, target=SCRATCH
>         IA64 register R22 (Alpha R22) -- call=OUTPUT, target=SCRATCH
>         IA64 register R23 (Alpha R23) -- call=OUTPUT, target=SCRATCH
>         IA64 register R24 (Alpha R24) -- call=OUTPUT, target=SCRATCH
>         IA64 register R26 (Alpha R8) -- call=OUTPUT, target=SCRATCH
>         IA64 register R28 (Alpha R2) -- call=OUTPUT, target=SCRATCH
>         IA64 register R30 (Alpha R12) -- call=OUTPUT, target=SCRATCH
>         IA64 register R31 (Alpha R13) -- call=OUTPUT, target=SCRATCH
> 
> The resultant exe seems to run without issue... Should I worry ?

Do you wrote your own BAS$EDIT?  Um, OK...

On Itanium, the calling standard says just Itanium r4-r7 is preserved at routine calls.  Macro wants to preserve the illusion that you are on a VAX with R2-R11 as preserved registers while allowing CALLs or JSBs to have non-standard output registers.  In those cases, we invented some new directives (.CALL_LINKAGE and .USE_LINKAGE) to tell IMACRO about routines that aren't calling standard compliant.  STR$COPY_R_R8 is one of them.

If you just say $IA64LINKAGES in your program, there is a new macro in STARLET.MLB that expands into many, many .CALL_LINKAGEs, including

.CALL_LINKAGE RTN_NAME=STR$COPY_R_R8                    LANGUAGE=OTHER INPUT=<R0,R1,R2>         OUTPUT=<R0> -
                                                                       PRESERVE=<R9,R10,R11> -
                                                                       SCRATCH=<R4,R5,R6,R7>
  





More information about the Info-vax mailing list