The following C code works as expected on IA64, but ACCVIO's on X86.
I've tried compiling the C code with /POINTER=LONG but that made no difference.
Code: Select all
main()
{
int src = 1 ; /* Insert a 1 */
int pos = -1 ; /* 1 bit back */
int siz = 1 ; /* 1 bit */
char dst[4] ; /* destination */
/* point just past dst[1] */
char* dstptr = &dst[ 2 ] ;
/* Zero dst[1] for clarity */
dst[ 1 ] = 0 ;
/* Insert into last bit of dst[1] */
lib$insv( &src ,&pos ,&siz ,dstptr ) ;
}
Code: Select all
x> run testinsv
%SYSTEM-F-ACCVIO, access violation, reason mask=00, virtual address=800000000000
0000, PC=FFFF83000998242A, PS=0000001B
%TRACE-F-TRACEBACK, symbolic stack dump follows
image module routine line rel PC abs PC
LIBRTL $1$DGA7215:[LIBRTL_4.SRC]LIBINSV.MAR;1
#197 000000008013542A FFFF83000998242A
TESTINSV TESTINSV main 9 0000000000000035 0000000080000035
TESTINSV TESTINSV __main 1 00000000000000A3 00000000800000A3
0 FFFF8300081FC0A6 FFFF8300081FC0A6
DCL 0 000000008006778B 000000007ADFF78B
%TRACE-I-LINENUMBER, Leading '#' specifies a source file record number.
%TRACE-I-END, end of TRACE stack dump
The code works on X86 for bit-positions that are positive.
Perhaps on X86, LIB$INSV isn't coded to handle negative bit positions?
Thanks, Don