Replace with equivalent getter/setter macros.
Change-Id: I1042564dd47347337374762bd64ec31b5c573ee2
MSYMBOL_IS_SPECIAL Tests the "special" bit in a minimal symbol. */
#define MSYMBOL_SET_SPECIAL(msym) \
- MSYMBOL_TARGET_FLAG_1 (msym) = 1
+ (msym)->set_target_flag_1 (true)
#define MSYMBOL_IS_SPECIAL(msym) \
- MSYMBOL_TARGET_FLAG_1 (msym)
+ (msym)->target_flag_1 ()
struct arm_mapping_symbol
{
MSYMBOL_IS_RTI Tests the "RTC" bit in a minimal symbol. */
#define MSYMBOL_SET_RTC(msym) \
- MSYMBOL_TARGET_FLAG_1 (msym) = 1
+ (msym)->set_target_flag_1 (true)
#define MSYMBOL_SET_RTI(msym) \
- MSYMBOL_TARGET_FLAG_2 (msym) = 1
+ (msym)->set_target_flag_2 (true)
#define MSYMBOL_IS_RTC(msym) \
- MSYMBOL_TARGET_FLAG_1 (msym)
+ (msym)->target_flag_1 ()
#define MSYMBOL_IS_RTI(msym) \
- MSYMBOL_TARGET_FLAG_2 (msym)
+ (msym)->target_flag_2 ()
enum insn_return_kind {
RETURN_RTS,
if (ELF_ST_IS_MICROMIPS (st_other))
{
- MSYMBOL_TARGET_FLAG_MICROMIPS (msym) = 1;
+ SET_MSYMBOL_TARGET_FLAG_MICROMIPS (msym);
msym->set_value_address (msym->value_raw_address () | 1);
}
else if (ELF_ST_IS_MIPS16 (st_other))
{
- MSYMBOL_TARGET_FLAG_MIPS16 (msym) = 1;
+ SET_MSYMBOL_TARGET_FLAG_MIPS16 (msym);
msym->set_value_address (msym->value_raw_address () | 1);
}
}
};
/* Corresponding MSYMBOL_TARGET_FLAG aliases. */
-#define MSYMBOL_TARGET_FLAG_MIPS16 MSYMBOL_TARGET_FLAG_1
-#define MSYMBOL_TARGET_FLAG_MICROMIPS MSYMBOL_TARGET_FLAG_2
+#define MSYMBOL_TARGET_FLAG_MIPS16(sym) \
+ (sym)->target_flag_1 ()
+
+#define SET_MSYMBOL_TARGET_FLAG_MIPS16(sym) \
+ (sym)->set_target_flag_1 (true)
+
+#define MSYMBOL_TARGET_FLAG_MICROMIPS(sym) \
+ (sym)->target_flag_2 ()
+
+#define SET_MSYMBOL_TARGET_FLAG_MICROMIPS(sym) \
+ (sym)->set_target_flag_2 (true)
/* Return the MIPS ISA's register size. Just a short cut to the BFD
architecture's word size. */
default:
break;
case 8:
- MSYMBOL_TARGET_FLAG_1 (msym) = 1;
+ msym->set_target_flag_1 (true);
break;
}
}
/* See ppc_elfv2_elf_make_msymbol_special for how local entry point
offset values are encoded. */
- if (MSYMBOL_TARGET_FLAG_1 (fun.minsym))
+ if (fun.minsym->target_flag_1 ())
local_entry_offset = 8;
if (fun.value_address () <= pc
return m_has_size;
}
+ /* Return this minimal symbol's first target-specific flag. */
+
+ bool target_flag_1 () const
+ {
+ return m_target_flag_1;
+ }
+
+ /* Set this minimal symbol's first target-specific flag. */
+
+ void set_target_flag_1 (bool target_flag_1)
+ {
+ m_target_flag_1 = target_flag_1;
+ }
+
+ /* Return this minimal symbol's second target-specific flag. */
+
+ bool target_flag_2 () const
+ {
+ return m_target_flag_2;
+ }
+
+ /* Set this minimal symbol's second target-specific flag. */
+
+ void set_target_flag_2 (bool target_flag_2)
+ {
+ m_target_flag_2 = target_flag_2;
+ }
+
/* Size of this symbol. dbx_end_psymtab in dbxread.c uses this
information to calculate the end of the partial symtab based on the
address of the last symbol plus the size of the last symbol. */
unsigned int created_by_gdb : 1;
/* Two flag bits provided for the use of the target. */
- unsigned int target_flag_1 : 1;
- unsigned int target_flag_2 : 1;
+ unsigned int m_target_flag_1 : 1;
+ unsigned int m_target_flag_2 : 1;
/* Nonzero iff the size of the minimal symbol has been set.
Symbol size information can sometimes not be determined, because
bool text_p () const;
};
-#define MSYMBOL_TARGET_FLAG_1(msymbol) (msymbol)->target_flag_1
-#define MSYMBOL_TARGET_FLAG_2(msymbol) (msymbol)->target_flag_2
-
#include "minsyms.h"
\f