1
0
Fork 0
mirror of https://github.com/tobast/libunwind-eh_elf.git synced 2024-11-24 16:27:37 +01:00

Define and use `CONST_ATTR'

This commit is contained in:
Tommi Rantala 2012-09-19 13:48:33 +03:00
parent e0653f9e3a
commit 7d471b1440
5 changed files with 6 additions and 4 deletions

View file

@ -32,6 +32,7 @@ WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */
#ifdef __GNUC__
# define ALIGNED(x) __attribute__((aligned(x)))
# define CONST_ATTR __attribute__((__const__))
# define UNUSED __attribute__((unused))
# define NOINLINE __attribute__((noinline))
# define NORETURN __attribute__((noreturn))
@ -56,6 +57,7 @@ WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */
#else
# define ALIGNED(x)
# define ALWAYS_INLINE
# define CONST_ATTR
# define UNUSED
# define NOINLINE
# define NORETURN

View file

@ -53,7 +53,7 @@ struct arm_cb_data
unw_dyn_info_t di; /* info about the ARM exidx segment */
};
static inline uint32_t
static inline uint32_t CONST_ATTR
prel31_read (uint32_t prel31)
{
return ((int32_t)prel31 << 1) >> 1;

View file

@ -551,7 +551,7 @@ put_rs_cache (unw_addr_space_t as, struct dwarf_rs_cache *cache,
lock_release (&cache->lock, *saved_maskp);
}
static inline unw_hash_index_t
static inline unw_hash_index_t CONST_ATTR
hash (unw_word_t ip)
{
/* based on (sqrt(5)/2-1)*2^64 */

View file

@ -109,7 +109,7 @@ free_state_stack (struct ia64_reg_state *rs)
/* Unwind decoder routines */
static enum ia64_pregnum __attribute__ ((const))
static enum ia64_pregnum CONST_ATTR
decode_abreg (unsigned char abreg, int memory)
{
switch (abreg)

View file

@ -56,7 +56,7 @@ static __thread struct ia64_script_cache ia64_per_thread_cache =
};
#endif
static inline unw_hash_index_t
static inline unw_hash_index_t CONST_ATTR
hash (unw_word_t ip)
{
/* based on (sqrt(5)/2-1)*2^64 */