[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[avr-gcc-list] Asm Operator for Address Negation
From: |
Ram Kumar Rengaswamy |
Subject: |
[avr-gcc-list] Asm Operator for Address Negation |
Date: |
Wed, 9 Aug 2006 17:04:05 -0700 |
Hi,
I have a large C application in which I would like to write one
of the routines in assembly to improve performance.
uint8_t permsTable[128]; // This is a global variable.
# The following is the assembly routine.
# The offset into permsTable is present in the register pair r30:r31
# I am trying to subtract the negative value of the permsTable from
the offset.
permsCheck:
SUBI r30, lo8(-permsTable)
SBCI r31, hi8(-permsTable)
However, I am getting a syntax error with the above operation.
I would appreciate if anyone could tell me how to perform the above
operation.
I have seen the C compiler generate such code.
Thanks,
-Ram
- [avr-gcc-list] Asm Operator for Address Negation,
Ram Kumar Rengaswamy <=