* config/frv/frv.c (frv_adjust_field_align): Redo check for
too wide bitfields.
(frv_hard_regno_mode_ok): Add SPR_P and AP_FIRST.
* config/frv/frv.h (FUNCTION_PROFILER): Remove abort call.
(SBSS_SECTION_ASM_OP): Remove.
(EXTRA_SECTIONS): Remove in_sbss.
(EXTRA_SECTION_FUNCTIONS): Remove SBSS_SECTION_FUNCTION.
(SBSS_SECTION_FUNCTION, sbss_section): Remove.
(ASM_OUTPUT_ALIGNED_DECL_LOCAL): Change sbss_section to
named_section.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@72463
138bc75d-0d04-0410-961f-
82ee72b054a4
+2003-10-13 Eric Christopher <echristo@redhat.com>
+
+ * config/frv/frv.c (frv_adjust_field_align): Redo check for
+ too wide bitfields.
+ (frv_hard_regno_mode_ok): Add SPR_P and AP_FIRST.
+ * config/frv/frv.h (FUNCTION_PROFILER): Remove abort call.
+ (SBSS_SECTION_ASM_OP): Remove.
+ (EXTRA_SECTIONS): Remove in_sbss.
+ (EXTRA_SECTION_FUNCTIONS): Remove SBSS_SECTION_FUNCTION.
+ (SBSS_SECTION_FUNCTION, sbss_section): Remove.
+ (ASM_OUTPUT_ALIGNED_DECL_LOCAL): Change sbss_section to
+ named_section.
+
2003-10-13 Nathanael Nerode <neroden@gcc.gnu.org>
* Makefile.in, configure.in, config.host, mkheaders.in: Replace
simply be the stack pointer, but if several accesses are being made to a
region far away from the stack pointer, it may be more efficient to set
up a temporary instead.
-
+
Store instructions will be frame-related and will be annotated with the
overall effect of the store. Load instructions will be followed by a
(use) to prevent later optimizations from zapping them.
frv_frame_access_multi (&accessor, info, STACK_REGS_GPR);
frv_frame_access_multi (&accessor, info, STACK_REGS_FPR);
frv_frame_access_multi (&accessor, info, STACK_REGS_LCR);
-}
+}
/* Called after register allocation to add any instructions needed for the
if (GET_CODE (cr) != REG)
goto fail;
-
+
if (mode == CCmode || mode == CC_UNSmode)
{
cr_class = ICR_REGS;
tree field;
int computed;
{
- /* C++ provides a null DECL_CONTEXT if the bit field is wider than its
- type. */
- if (DECL_BIT_FIELD (field) && DECL_CONTEXT (field))
+
+ tree type = TREE_TYPE (field);
+
+ /* Make sure that the bitfield is not wider than the type. */
+ if (DECL_BIT_FIELD (field)
+ && tree_int_cst_compare (DECL_SIZE (field), TYPE_SIZE (type)) <= 0)
{
tree parent = DECL_CONTEXT (field);
tree prev = NULL_TREE;
tree cur;
- /* Loop finding the previous field to the current one */
for (cur = TYPE_FIELDS (parent); cur && cur != field; cur = TREE_CHAIN (cur))
{
if (TREE_CODE (cur) != FIELD_DECL)
}
else
{
- /* The other registers store one word. */
- if (GPR_P (regno))
+ /* The other registers store one word. */
+ if (GPR_P (regno) || regno == AP_FIRST)
base = GPR_FIRST;
else if (FPR_P (regno))
else if (ACC_P (regno))
base = ACC_FIRST;
+ else if (SPR_P (regno))
+ return mode == SImode;
+
+ /* Fill in the table. */
else
return 0;
def_builtin ("__MPACKH", uw1_ftype_uh_uh, FRV_BUILTIN_MPACKH);
def_builtin ("__MUNPACKH", uw2_ftype_uw1, FRV_BUILTIN_MUNPACKH);
def_builtin ("__MDPACKH", uw2_ftype_uw2_uw2, FRV_BUILTIN_MDPACKH);
- def_builtin ("__MDUNPACKH", void_ftype_uw4_uw2, FRV_BUILTIN_MDUNPACKH);
+ def_builtin ("__MDUNPACKH", void_ftype_uw4_uw2, FRV_BUILTIN_MDUNPACKH);
def_builtin ("__MBTOH", uw2_ftype_uw1, FRV_BUILTIN_MBTOH);
def_builtin ("__MHTOB", uw1_ftype_uw2, FRV_BUILTIN_MHTOB);
def_builtin ("__MBTOHE", void_ftype_uw4_uw1, FRV_BUILTIN_MBTOHE);
This declaration must be present, but it can be an abort if profiling is
not implemented. */
-#define FUNCTION_PROFILER(FILE, LABELNO) abort ()
+#define FUNCTION_PROFILER(FILE, LABELNO)
\f
/* Implementing the Varargs Macros. */
/* Short Data Support */
#define SDATA_SECTION_ASM_OP "\t.section .sdata,\"aw\""
-#define SBSS_SECTION_ASM_OP "\t.section .sbss,\"aw\""
/* On svr4, we *do* have support for the .init and .fini sections, and we
can put stuff in there to be executed before and after `main'. We let
`in_text' and `in_data'. You need not define this macro
on a system with no other sections (that GCC needs to use). */
#undef EXTRA_SECTIONS
-#define EXTRA_SECTIONS in_sdata, in_sbss, in_const, in_fixup
+#define EXTRA_SECTIONS in_sdata, in_const, in_fixup
/* One or more functions to be defined in "varasm.c". These
functions should do jobs analogous to those of `text_section' and
#undef EXTRA_SECTION_FUNCTIONS
#define EXTRA_SECTION_FUNCTIONS \
SDATA_SECTION_FUNCTION \
- SBSS_SECTION_FUNCTION \
FIXUP_SECTION_FUNCTION
#define SDATA_SECTION_FUNCTION \
} \
}
-#define SBSS_SECTION_FUNCTION \
-void \
-sbss_section () \
-{ \
- if (in_section != in_sbss) \
- { \
- fprintf (asm_out_file, "%s\n", SBSS_SECTION_ASM_OP); \
- in_section = in_sbss; \
- } \
-}
-
#define FIXUP_SECTION_FUNCTION \
void \
fixup_section () \
#define ASM_OUTPUT_ALIGNED_DECL_LOCAL(STREAM, DECL, NAME, SIZE, ALIGN) \
do { \
if ((SIZE) > 0 && (SIZE) <= g_switch_value) \
- sbss_section (); \
+ named_section (0, ".sbss", 0); \
else \
bss_section (); \
ASM_OUTPUT_ALIGN (STREAM, floor_log2 ((ALIGN) / BITS_PER_UNIT)); \