Subject: bogus assembler warning on shifted immediates Date: Tue, 22 Sep 1998 15:09:14 -0400 From: "Steven K. Reinhardt" Organization: Univ. of Michigan EECS Newsgroups: umich.eecs.class.373 From the "Notes and Hints" section of lab 2 (since I got a question on this already): 4. The assembler will warn you when you provide an immediate operand that's outside the proper range. Unfortunately, it's not smart enough to realize that shifted immediate operands (as for 'lis') should be treated as unsigned (since there's really no sign extension involved). If you get a "Value out of range" warning on an 'lis', you can safely ignore it. That is, if you do lis r3, 0xffff the assembler will say "Warning: Value out of range", even though it's a perfectly reasonable thing to do. Since it's just a warning (not an error), the assembler goes ahead and assembles it, and the machine code it generates will do what you want. -- ----------------------------------------------------------------------- Steven K. Reinhardt Assistant Professor, EECS The University of Michigan email: stever@eecs.umich.edu phone: (734) 647-7959, fax: (734) 763-4617 www: http://www.eecs.umich.edu/~stever