ppc - srwi 11, 10, 0 gives warning

Andrew Cagney cagney@highland.com.au
Wed Aug 16 20:41:00 GMT 1995


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.




More information about the Gas2 mailing list