[LLVMdev] question on assembler for systemz backend

bagel bagel99 at gmail.com
Sun Jan 30 10:00:16 PST 2011


What assembler are people using with the SystemZ backend?

I am trying to assemble the output of the SystemZ backend with the GNU 
binutils assembler (build with --target=s390x-linux).  I get errors when 
assembling instructions with literals that are negatives.  For example, 
the test case test/CodeGen/SystemZ/01-RetImm.ll gives errors:

$ s390x-as 01-RetImm.s
01-RetImm.s: Assembler messages:
01-RetImm.s:16: Error: operand out of range (0xffffffffffffffff is not 
between 0x0000000000000000 and 0x000000000000ffff)
01-RetImm.s:61: Error: operand out of range (0xffffffffffffffff is not 
between 0x0000000000000000 and 0x00000000ffffffff)

line 16 is:
	llill	%r2, -1			<<< why -1

which was generated from:
define i64 @foo2() {
entry:
     ret i64 65535
}

Why are negative literals being generated.

regards,
bagel



More information about the llvm-dev mailing list