This is the mail archive of the gas2@sourceware.cygnus.com mailing list for the gas2 project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

ppc - srwi 11, 10, 0 gives warning


Hello,

Given the PowerPC assembler:

	cagney@puddin$ cat bug.s
	        srwi 11,10,0
	        rlwinm 11, 10, 32, 0, 31

where the second instruction is what `srwi' is expanded into, gas-950726
gives the warning:

	cagney@puddin$ powerpc-unknown-eabi-as -v bug.s -o bug.o
	GNU assembler version 950726 (powerpc-unknown-eabi), using BFD version
cygnus-2.5
	bug.s: Assembler messages:
	bug.s:1: Warning: operand out of range (32 not between 0 and 31)
	bug.s:2: Warning: operand out of range (32 not between 0 and 31)

While the warning is valid (32 is indeed > 31) and gas is still
generating correct code (mapping it to zero),   I think that for this
case the warning may possibly need to be suppressed.

The assembler was output by ss-950805 from the C file
c-torture/execute/930921-1.c:

	bash$ powerpcle-unknown-eabi-gcc 930921-1.c -msoft-float
/applications/clayton/root/usr/lib/crt0.o
-L/applications/clayton/root/usr/lib -lc -mstrict-align
	/var/tmp/cc026999.s: Assembler messages:
	/var/tmp/cc026999.s:34: Warning: operand out of range (32 not between 0
and 31)

Any thoughts?

			Andrew.