9-bit literal to 32-bit value extension
jonty
Posts: 3
Here's a question for those who really know the fine details of assembler programming on the Propeller:
When an instruction uses a 9-bit literal value in the s field and the instruction operates on a 32-bit value then is the 9-bit literal always zero extended before it is used by the instruction?
The manual V1.01 explicitly says that ABS and ABSNEG both zero extend. But is this a general rule for all arithmetic and logical operations like ADD, SUB, AND etc?
For example, does ANDN take a 9-bit literal, zero extend it to 32-bits, negate (so that the top 23 bits are now all 1's), then bitwise AND with d?
Thanks in advance
Jonty
Post Edited (jonty) : 12/21/2006 9:24:49 PM GMT
When an instruction uses a 9-bit literal value in the s field and the instruction operates on a 32-bit value then is the 9-bit literal always zero extended before it is used by the instruction?
The manual V1.01 explicitly says that ABS and ABSNEG both zero extend. But is this a general rule for all arithmetic and logical operations like ADD, SUB, AND etc?
For example, does ANDN take a 9-bit literal, zero extend it to 32-bits, negate (so that the top 23 bits are now all 1's), then bitwise AND with d?
Thanks in advance
Jonty
Post Edited (jonty) : 12/21/2006 9:24:49 PM GMT
Comments
Chip Gracey
Parallax, Inc.
jonty