Tinny,

My understanding is that the '-assume noaligned-objects' option makes the
compiler produce more code to avoid running into these alignment faults.
Using this flag is a viable work-around but ideally it would be good if it
wasn't needed.  Following is a quote from the cxx man page about the option.
Hopefully that answers your question.

-Kari

"-assume [no]aligned_objects
            The aligned_objects option causes the compiler to assume that a
            dereferenced object's alignment matches or exceeds the alignment
            indicated by the pointer to the object. This is the default. On
            Alpha systems, dereferencing a pointer to a longword- or
            quadword-aligned object is more efficient than dereferencing a
            pointer to a byte- or word-aligned object. Therefore, when the
            compiler assumes that a pointer object of an aligned pointer
type
            does point to an aligned object, it can generate better code for
            pointer dereferences of aligned pointer types.

            The noaligned_objects option flag causes the compiler to
generate
            longer code sequences to perform indirect load and store opera-
            tions in order to avoid hardware alignment faults for
arbitrarily
            aligned addresses.  Although this flag may generate less effi-
            cient code than the aligned_objects option, by avoiding hardware
            alignment faults, it speeds the execution of programs that
refer-
            ence unaligned data."

----- Original Message -----
From: "Tinny Ng" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Monday, July 30, 2001 3:28 PM
Subject: Re: Unaligned Access warnings in IDOM samples


> Kari,
>
> Ring some bells, but before going further, may be can you first explain to
me
> what does "-assume noaligned-objects" do?  I am not familiar to TRU64
Unix....
>
> Thanks!
>
> Tinny
>
> Kari Whitcomb wrote:
>
> > Hello all,
> >
> > I am trying to use Xerces-C v1.5.1 on TRU64 Unix.  It all compiles and
> > builds without error using cxx and all the samples run correctly with
the
> > exception of the IDOM samples.  With these two samples, IDOMCount and
> > IDOMPrint, I get hundreds of unaligned access errors.  The correct
output is
> > eventually printed but I am worried about all of the errors.  If I
compile
> > both Xerces itself and the samples using the '-assume noaligned-objects'
> > switch, the errors go away, but this will have performance side effects
> > which I would like to avoid.
> >
> > Before I go and try to debug in detail what is causing these errors, is
> > there someone more familiar with the code who might have an idea of
where to
> > start looking or what the possible causes/solutions might be?
> >
> > Thanks,
> > Kari Whitcomb
> >
> > PS Here are a few of the lines of errors generated when I run the
IDOMPrint
> > sample:
> > Unaligned access pid=31615 <IDOMPrint> va=0x140022aa4 pc=0x120004dac
> > ra=0x120004d98 inst=0xa5ef0000
> > Unaligned access pid=31615 <IDOMPrint> va=0x140022aa4 pc=0x120004e10
> > ra=0x120004e10 inst=0xa56d0000
> > Unaligned access pid=31615 <IDOMPrint> va=0x140022be4 pc=0x1200049ac
> > ra=0x120004e10 inst=0xa4630000
> > Unaligned access pid=31615 <IDOMPrint> va=0x140022be4 pc=0x1200049d8
> > ra=0x1200049c8 inst=0xa4210000
> >
> > ---------------------------------------------------------------------
> > To unsubscribe, e-mail: [EMAIL PROTECTED]
> > For additional commands, e-mail: [EMAIL PROTECTED]
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
>
>


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to