OpenCores
URL https://opencores.org/ocsvn/openrisc_me/openrisc_me/trunk

Subversion Repositories openrisc_me

Compare Revisions

  • This comparison shows the changes necessary to convert path
    /openrisc/trunk/gnu-src/gcc-4.5.1/gcc/config/or32
    from Rev 400 to Rev 402
    Reverse comparison

Rev 400 → Rev 402

/elf.h
1,4 → 1,5
/* Definitions for rtems targeting an OpenRisc OR32 using COFF
??? this is for OR32, but the rest of the above seems bogus.
Copyright (C) 1996, 1997, 2005 Free Software Foundation, Inc.
Contributed by Joel Sherrill (joel@OARcorp.com).
 
/or32.c
2052,7 → 2052,7
}
 
/* Output a tailcall to FUNCTION. The caller will fill in the delay slot. */
void
static void
or32_output_tailcall (FILE *file, tree function)
{
/* We'll need to add more code if we want to fully support PIC. */
2189,6 → 2189,8
or32_struct_alignment (tree t)
{
unsigned HOST_WIDE_INT total = 0;
int default_align_fields = 0;
int special_align_fields = 0;
tree field;
unsigned max_align
= maximum_field_alignment ? maximum_field_alignment : BIGGEST_ALIGNMENT;
2209,11 → 2211,34
 
if (TREE_CODE (field) != FIELD_DECL)
continue;
/* If this is a field in a non-qualified union, or the sole field in
a struct, and the alignment was set by the user, don't change the
alignment.
If the field is a struct/union in a non-qualified union, we already
had sufficient opportunity to pad it - if we didn't, that'd be
because the alignment was set as above.
Likewise if the field is a struct/union and the sole field in a
struct. */
if (DECL_USER_ALIGN (field)
|| TYPE_USER_ALIGN (TREE_TYPE (field))
|| TREE_CODE (TREE_TYPE (field)) == UNION_TYPE
|| TREE_CODE (TREE_TYPE (field)) == QUAL_UNION_TYPE
|| TREE_CODE (TREE_TYPE (field)) == RECORD_TYPE)
{
if (TREE_CODE (t) == UNION_TYPE)
return 0;
special_align_fields++;
}
else if (DECL_PACKED (field))
special_align_fields++;
else
default_align_fields++;
if (!host_integerp (DECL_SIZE (field), 1))
return max_align;
field_size = tree_low_cst (DECL_SIZE (field), 1);
field_size = max_align;
else
field_size = tree_low_cst (DECL_SIZE (field), 1);
if (field_size >= BIGGEST_ALIGNMENT)
return max_align;
total = max_align;
if (struct_p)
total += field_size;
else
2220,6 → 2245,9
total = MAX (total, field_size);
}
 
if (!default_align_fields
&& (TREE_CODE (t) != RECORD_TYPE || special_align_fields <= 1))
return 0;
return total < max_align ? (1U << ceil_log2 (total)) : max_align;
}
 
/or32.h
47,7 → 47,7
#undef CPP_SPEC
#define CPP_SPEC "%{mor32-newlib*:-idirafter %(target_prefix)/newlib-include}"
 
/* Make sure we pick up the or32-crtbegin.o and or32-crtend.o files. */
/* Make sure we pick up the crti.o, crtbegin.o, crtend.o and crtn.o files. */
#undef STARTFILE_SPEC
#define STARTFILE_SPEC "%{!shared:%{mor32-newlib*:%(target_prefix)/newlib/crt0.o} \
%{!mor32-newlib*:crt0.o%s} crti.o%s crtbegin.o%s}"
247,7 → 247,8
0, 1, 0, 1, 0, 1, 0, 1, 1, 1, 1}
 
/* stack pointer: must be FIXED and CALL_USED */
/* hard frame pointer: must be FIXED and CALL_USED */
/* hard frame pointer: must be call saved. */
/* soft frame pointer / arg pointer: must be FIXED and CALL_USED */
 
/* Return number of consecutive hard regs needed starting at reg REGNO
to hold something of mode MODE.
1350,5 → 1351,8
extern GTY(()) rtx or32_compare_op0;
extern GTY(()) rtx or32_compare_op1;
 
/* Enable parsing of #pragma pack(push,<n>) and #pragma pack(pop). */
#define HANDLE_PRAGMA_PACK_PUSH_POP
 
 
#endif /* _OR32_H_ */

powered by: WebSVN 2.1.0

© copyright 1999-2024 OpenCores.org, equivalent to Oliscience, all rights reserved. OpenCores®, registered trademark.