AIX 3.1: Problems with strcpy and optimizer
Bjorn Engsig
bengsig at oracle.nl
Fri Oct 12 20:15:02 AEST 1990
During normal compilation with optimization, all calls to strcpy expand via
a macro __strcpy to inline lscbx and stcx instructions. We have some examples
of cases where one of the addresses used by lscbx is stored in a register that
is the same used to do the copy, which leads to a bad copy.
If you generate the assembly listning, look for lines like:
1795| 001B98 lscbx. 7C6C 222B LSCBX r3,r4,r5,r6,r7,r8,r9,r10,cr0=ormnam(r4,r12)
where one of the registers in the first list is the same as in the second
paranthesized list, here r4 occurs in both places. A workaround is to give
the -U__STR__ option to the C compiler.
This note is for your information only to use when hunting optimizer problems.
It has been reported to IBM.
--
Bjorn Engsig, E-mail: bengsig at oracle.com, bengsig at oracle.nl
ORACLE Corporation From IBM: auschs!ibmaus!cs.utexas.edu!uunet!oracle!bengsig
"Stepping in others footsteps, doesn't bring you ahead"
More information about the Comp.unix.aix
mailing list