summaryrefslogtreecommitdiff
path: root/gnu
AgeCommit message (Collapse)Author
2013-01-05Replace the list of platforms enabled (or not) to build the whole binutilsMiod Vallat
with a test of ELF_TOOLCHAIN provided by bsd.own.mk. No functional change.
2013-01-05Switch m88k ports to ELF.Miod Vallat
2013-01-05Remove the -mno-underscores, -msvr3 and -msvr4 options. They suppose theMiod Vallat
compiler can be built on one particular m88k system and output code for another with the proper options, but it only does half the job since there is too much knowledge of the native toolchain embedded (at compile-time) in the compiler. Building code for a different operating system and toolchain is what cross-compiler are for. Remove support for SDB debug information (only used by SVR3) and tdesc debug information (only used by SVR4). The latter is questionable, but this helps making the code less entangled. Tell m88k.h to not rewrite almost all ASM_WHATEVER macros gratuitously on the false pretense that `all m88k assemblers use the same syntax for pseudo-ops'. This was already not true with SVR4, and is getting worse with our ELF toolchain.
2013-01-05Rename m88k_pound_sign to m88k_register_prefix (even though the prefix isMiod Vallat
used for more than registers). Convert all output of registers to asm_fprintf with %R. Stop altering reg_names[] at runtime depending on the selected register prefix.
2013-01-04Remove extern declarations redundant with "flags.h"Miod Vallat
2013-01-03The removal of sdata support also removed the only use of SYMBOL_REF_FLAGMiod Vallat
in the m88k backend; as a result, SHORT_ADDRESS_P() will always return 0, therefore remove all code depending on it being nonzero.
2013-01-02More dead features recycling: -mwarn-passed-struct doesn't do anything, andMiod Vallat
-m{no-,}optimize-arg-area doesn't do anything either since the arg area has been removed in gcc 2.95.
2013-01-02Help the DWARF code to handle our prologues correctly:Miod Vallat
- add the frame pointer to EPILOGUE_USES when profiling - when the initial stack adjustement is larger than 64KB and requires a temporary register to be used, add a REG_FRAME_RELATED_EXPR of the original computation (not constrained by the adjustement size) to the REG_NOTES of the stack pointer adjustement sequence. Borrowed from alpha which has a similar issue.
2013-01-02Remove last boolean argumont of output_function_profiler(), it is always invokedMiod Vallat
with the same value.
2013-01-02Start removing obsolete features from the m88k backend (it's not like we'llMiod Vallat
need to sync with upstream anymore) to make things a bit simpler and get rid of unintended bitrotting. This time: - remove the small-data feature. It was only supported for COFF binaries anyway. This allows us to stop providing TARGET_ASM_SELECT_SECTION and use the default flavour, from which this backend had derived a bit in addition to sdata support, so this is a good thing... - remove the -midentify-version option - remove the -mbig-pic option, it has been superseded by -fPIC since years and was supposed to be removed `in a future version' since a long time as well. - remove the old MONITOR_GCC debug hooks.
2013-01-02Oops, commited this by accident when adding the m88k ELF toolchain bits.Miod Vallat
2013-01-01m88k ELF toolchain, supporting static binaries only so far.Miod Vallat
Assembler supports a register prefix of `#' when configured for SVR4, and `%' when configured for OpenBSD. Pseudo-ops do not need a leading dot, except when configured for OpenBSD, allowing the `set' instruction to be recognized correctly. Based upon various unfinished or unreliable works, including smurph@'s early work in 2003, my own attempts in 2004 and 2005, and Michael Kato's binutils 2.15 diff from 2005. Support for register prefixes, as well as fixing an evil off-by-one in resolving 16-bit pc-relative relocations in ld (which would only affect kernel .S files branching to global symbols), came as part of the 2012 work. Not enabled yet (needs Makefile.bsd-wrapper, bfd/config.bfd and gdb/configure.tgt updates to completely enable) so as not to disturb the existing a.out toolchain builds; will hopefully be enabled very soon.
2012-12-31Correctly disassemble {ld,st}.*.usr opcodes.Miod Vallat
2004-05-17import binutils 2.14 (excluding testsuites, .info files, and .po files)Dale Rahn
2012-12-31Remove GLIBC_DYNAMIC_LINKER which is only relevant for Linux.Brad Smith
ok miod@
2012-12-31Make use of OPENBSD_OS_CPP_BUILTINS_COMMON here as well.Brad Smith
ok miod@
2012-12-30Stop including other files in m88k/openbsd.h; instead specific the complete listMiod Vallat
of files to include, in proper order, as tm_file at configure time. This requires openbsd.h to be split, as also encountered on other platforms, and will make further work easier. No functional change introduced.
2012-12-26Update to sendmail 8.14.6Todd C. Miller
2012-12-25Fix longstanding bug in FRAME_POINTER_REQUIRED; unless -fomit-frame-pointerMiod Vallat
is used, a frame pointer is required for all non-leaf functions, and for leaf functions unless -momit-leaf-frame-pointer is specified. Also, a frame pointer is mandatory when profiling. This used to be mostly harmless with gcc 2.95, but is required with gcc 3 to get profiling to work.
2012-12-25Define INCOMING_RETURN_ADDR_RTX and DWARF_FRAME_RETURN_COLUMN to allow forMiod Vallat
DWARF debugging information to be produced, but define DWARF2_UNWIND_INFO to zero to prevent it from being output yet. This exposes dire weaknesses in the way the dwarf unwinder recognizes stack frame setup instructions, so borrow code from rs6000 to rewrite and annotate them as dwarf-edible instructions. No functional change intended - although this enables one more optimization code path in gcc.
2012-12-20Bring stack smashing protector for MIPS; enabled by default.Martynas Venckus
Reorganize soft frame pointer so that locals are below it and grow downwards. Tested by miod@, jasper@. OK miod@.
2012-12-20Bring stack smashing protector for Alpha; enabled by default.Martynas Venckus
Reorganize soft frame pointer so that locals are below it and grow downwards. Thanks Nick for the access. OK miod@.
2012-12-17Make the SH register spill failure for R0 workaround work againMartynas Venckus
after switching to __guard_local. OK matthew@, miod@.
2012-12-12Previous commit introduced a bug; only return early from m88k_layout_frame()Miod Vallat
if reload_completed; INITIAL_ELIMINATION_OFFSET() invokes it (which is very likely a source for more bugs, to be investigated)
2012-12-10Fix c-bounded when arrays are declared without the size expression.Martynas Venckus
The array_size was uninitialized and used to work by accident. Spotted with SSP on MIPS. OK miod@. Tested by jasper@.
2012-12-10Fix unaligned memory loads on Alpha. GCC used to generate them inMartynas Venckus
the following manner: ([reg:A & -8] << (64 - (((reg:FP+reg:B) & 0x7) << 3))) >> 56 This fails when we're doing loads with the offset from the frame pointer %8. Since it's aligned, optimizer makes it a zero. The correct expression is: ([reg:A & -8] << (56 - (((reg:FP+reg:B-1) & 0x7) << 3))) >> 56 This is actually a 13-year-old bug. Checked by Miod; a few files in the kernel were affected. Spotted with SSP for Alpha. OK miod@. Tested by naddy@.
2012-12-09Remove vax-specific configuration constructs.Miod Vallat
2012-12-08Work-in-progress gcc 3.3.6 configuration for OpenBSD/vax.Miod Vallat
2012-12-08Bring in a couple of bugfixes from old (Aug 2000), but more recent than thisMiod Vallat
one, gas, to correctly output pc-relative jumps.
2003-11-29Import gcc-3.3.2. Only the compiler. ada frontend removed for space Marc Espie
considerations.
2012-12-02m88k_layout_frame(): return early if the frame computations have alreadyMiod Vallat
been done.
2012-12-01reload_cse_noop_set_p(): invoking rtx_equal_for_cselib_p() is not enough; ifMiod Vallat
it reports the dest and source parts of the set insn are identical, we need to check whether they are volatile memory references, and return 0 (not a noop) in that case. This allows `*volatile_ptr = *volatile_ptr;' constructs to no longer be incorrectly optimized away on platforms which can perform memory to memory transfers in a single instruction (i.e. m68k and vax). Found the hard way on vax, where some systems need to frob the interrupt stack early, before being able to handle faults, and a gcc3-built kernel would have this operation optimized away, leading to a quick system reset.
2012-11-28merge conflictsMiod Vallat
2012-11-28gcc 3.3.6Miod Vallat
2012-11-21Disable the stack protector in OVERRIDE_OPTIONS for the time being. The stackMiod Vallat
protector code will conflict with the way variadic functions spill the registers on the stack, causing the latter to be partially overwritten with the value of __guard. Core dumps and hilarity ensues. This can probably be fixed by changing the time registers are spilled from the backend for __builtin_expand_saveregs(), to setup_incoming_varargs(), as done on e.g. rs6000. But that's far from a trivial change, and I'd like to be able to exercize gcc 3 a bit more on m88k before sacrificing more brain cells to the gcc evil deities.
2012-11-21Remove an md global which value is a duplicate of MI current_function_args_info.Miod Vallat
No functional change.
2012-11-21Turn OVERRIDE_OPTIONS into a function, will make it easier to extend on aMiod Vallat
per-platform basis.
2012-11-20Convert to new world order by defining TARGET_OS_CPP_BUILTINS instead ofMiod Vallat
CPP_PREDEFINES; try to deuglify CPP_SPEC whenever possible as well.
2012-11-20Make the mips and powerpc optimizer bug workarounds permanent (i.e. applyMiod Vallat
them to all platforms). Both of them had been added very late in a release cycle, which caused us to prefer workarounds with minimal side effects. Since the issue they are avoiding may happen on other platforms, there is no harm in making sure no other platform gets bitten by them. And at the moment no supported platform runs gcc 3, so this does not cause any regression.
2012-11-19Make sure to invoke end_sequence() before passing it to any emit_insn()Miod Vallat
flavour. From etoh@'s gcc 3.4 tree. While there, also kill change_arg_use_of_insns_2() which is now a dim wrapper around change_arg_use_of_insns(), from etoh@'s tree as well.
2012-11-19move_by_pieces_1(), store_by_pieces_2(): sync insn skipping logic in theMiod Vallat
predecrement cases with gcc 2.95. This had been needed for m68k but somehow etoh@ missed this when porting the gcc 2.95 fixes back to its 3.3, then 3.4 tree. This fixes passing of struct by value on m68k, and lets gcc 3 reliably bootstrap itself now.
2012-11-19Sprinkle TREE_SIDE_EFFECTS annotations around all the computations done inMiod Vallat
va_arg(). __vfprintf() still unhappy in some edge cases I am investigating.
2012-11-17Revert the va_start() and va_arg() optimization for functions which have noMiod Vallat
variadic arguments passed in registers: these functions may pass a va_list to another function, which will then need to rely upon a properly filled __va_list struct and can't assume anything about the way arguments have been passed to its caller.
2012-11-17In the expansion of __builtin_saveregs(), use double store instructions toMiod Vallat
spill the registers on __va_reg instead of calling move_block_from_reg().
2012-11-16In SETUP_INCOMING_VARARGS(), make sure to return in pretend_size the amountMiod Vallat
of memory which will be used for the __va_reg register spill.
2012-11-16Rewrite the varags implementation again (third time's the charm), the upstreamMiod Vallat
varagrs implementation being utterly wrong. This is the same logic as the one I wrote for gcc 2.95, with a few more optimizations whenever possible (such as not outputting instructions to fill fields of the __va_list struct we know won't be accessed, now that we have total control of the struct in the compiler). It should now be possible to mix varags code compiled by gcc 2.95, with code compiled with gcc 3, with the following exception: as I have finally found and fixed the buglet causing all arguments to be passed on the stack if any of the named arguments (before varargs) is a struct of 32 bytes or more passed by value, such a (pretty uncommon) case will not be interoperable. One such case can be found as va-arg-4.c in gcc's testsuite. With these changes, all the following varargs exercizers from gcc's testsuite now pass when compiled with the in-tree gcc 3: gcc.c-torture/execute/920625-1.c gcc.c-torture/execute/931004-10.c gcc.c-torture/execute/931004-12.c gcc.c-torture/execute/931004-14.c gcc.c-torture/execute/931004-4.c gcc.c-torture/execute/931004-6.c gcc.c-torture/execute/931004-8.c gcc.c-torture/execute/strct-varg-2.c gcc.c-torture/execute/va-arg-1.c gcc.c-torture/execute/va-arg-2.c gcc.c-torture/execute/va-arg-4.c gcc.c-torture/execute/va-arg-5.c gcc.c-torture/execute/va-arg-6.c as well as the few others of my own I had been using while working on gcc 2.95 more than 8 years ago.
2012-11-15Only allow the "return" insn construct (which simply yields a "jmp r1" line)Miod Vallat
if null_prologue(), i.e. if there is no stack frame to undo and no r1 to restore. Make the "epilogue" insn construct no longer depend on "return", but rather on "(use (const_int 0))" as "prologue" and as generally done on other backends. On the other hand, make it unconditionnal, instead of "! null_prologue()". These changes make sure than a leaf procedure call does not end up "returning" (i.e. jmp r1) upon return from the call, without restoring r1 and r30 (whenever applicable) from the existing stack frame. This makes a gcc3-compiled __main() (from libgcc2.c) no longer spin after invoking the constructors, and gives the real payload (i.e. main() and whatever follows from there) a chance to run.
2012-11-15Make this cross-compile friendly by defining ATTRIBUTE_UNUSED to an emptyMiod Vallat
string if not defined already, when cross-compiling. (curse words censored)
2012-11-14Do not bother reloading r1 from the stack in the epilogue, if it has not beenMiod Vallat
clobbered (e.g. in leaf functions). While saving it helps debugging, reading it back is just useless in that case.
2012-11-14Generously sprinkle RTX_FRAME_RELATED_P() in the prologue and epilogue code,Miod Vallat
as recommended by the documentation. I have not seen a difference in the generated code so far, but I'd rather play safe at the moment.