Commit Graph

361 Commits

Author SHA1 Message Date
grant 291ac7e9c4 don't include machine/asm.h (make this build again). 2002-09-19 01:24:43 +00:00
lukem ebb6fc9eb8 Use ${NETBSDSRCDIR}/some/path instead of ${.CURDIR}/../../some/path (etc).
(Reduces make output by ~ 20%)
2002-08-19 09:41:27 +00:00
matt b79865a0af To make things clearer, use register prefixes in asm() code. 2002-07-29 21:54:35 +00:00
scw c7b95fdc37 Use an assembler trampoline to call the real start entrypoint, at least
until we switch to the native toolchain.
2002-07-10 13:13:47 +00:00
scw 59474a8c82 NetBSD, meet the SH-5 cpu.
SH-5, meet NetBSD.

Let's hope this is the start of a long and fruitful relationship. :-)

This code, funded by Wasabi Systems, adds initial support for the
Hitachi SuperH(tm) SH-5 cpu architecture to NetBSD.

At the present time, NetBSD/evbsh5 only runs on a SH-5 core simulator
which has no simulated devices other than a simple console. However, it
is good enough to get to the "root device: " prompt.

Device driver support for Real SH-5 Hardware is in place, particularly for
supporting the up-coming Cayman evaluation board, and should be quite
easy to get running when the hardware is available.

There is no in-tree toolchain for this port at this time. Gcc-current has
rudimentary SH-5 support but it is known to be buggy. A working toolchain
was obtained from SuperH to facilitate this port. Gcc-current will be
fixed in due course.

The SH-5 architecture is fully 64-bit capable, although NetBSD/evbsh5 has
currently only been tested in 32-bit mode. It is bi-endian, via a boot-
time option and it also has an "SHcompact" mode in which it will execute
SH-[34] user-land instructions.

For more information on the SH-5, see www.superh.com. Suffice to say it
is *not* just another respin of the SH-[34].
2002-07-05 13:31:28 +00:00
fredette 43c563a3dd A new crt0.c for hppa, with support for dynamic linking. 2002-07-01 15:56:41 +00:00
matt 0ec15f80cc Allow this to compile under gcc-current. No multiline strings for asm. 2002-06-09 06:18:34 +00:00
thorpej 8bbbfff0a1 Remove __LEADING_UNDERSCORE case. 2002-06-08 17:27:25 +00:00
fredette 02ac1ae2f0 Added hppa support (some of it incomplete) to lib/csu, lib/libc,
and lib/libkvm.
2002-06-06 20:31:19 +00:00
fvdl e4b98ed506 Add init/fini handling. 2002-06-06 19:18:22 +00:00
fvdl e8d64f072a -x is too heavy-handed for removing symbols; newer versions of GNU ld
will completely delete empty local symbols with it. Use -X instead
for crt{begin,end}*.o, to keep init_fallthru hacks.
2002-06-06 19:17:01 +00:00
thorpej 7f350cba6c Don't use multi-line string literals. 2002-06-05 02:51:03 +00:00
wiz da0b574ae0 Comment out token after #endif. 2002-05-16 19:30:41 +00:00
matt 858f46fb43 Define _SDA(2)_BASE_ as [] which is more correct. 2002-05-09 20:32:59 +00:00
thorpej 6249662a70 Deal better with platforms that don't yet support shared libraries:
* Only add -fPIC if MKPIC != no.
* Only build crtbeginS and crtendS if MKPIC != no.
2002-05-05 00:45:31 +00:00
thorpej 179139677a All ELF toolchains are of the "new toolchain" variety now, so no need
to conditionalize use of .hidden symbols anymore.
2002-05-05 00:34:00 +00:00
wiz 15d53d85be ${MACHINE_ARCH} != "arm32" is always true now, so remove it from an if. 2002-05-02 16:42:53 +00:00
matt e18dedbd2f switch from addis R,0,... to the simplified mnemonic of lis which is
typically used for this.
2002-04-26 23:28:53 +00:00
kleink 3f1a2352b7 Use __weak_extern() for _SDA_BASE_ and _SDA2_BASE_ declarations. 2002-04-17 17:36:13 +00:00
matt 036d79bb12 Make sure to initialize GPR13/GPR2 appropriately for the Small Data Area
pointer as described in the SVR4 PPC ABI.  Though GPR2 is defined by the
SVR4 PPC ABI as system-reserved, the EABI (Embedded API) changes its use
to be the Small Data Area 2 register (const small data).  Since powerpc
under NetBSD doesn't use R2 in the kernel (yet), support it as well.
2002-04-17 13:32:42 +00:00
skrll 2d0a923dcd Correct some comments. 2002-04-08 22:17:37 +00:00
jmc c03ef26393 Don't make ___start static as gcc can't tell it's referenced and complains. 2002-04-04 08:22:11 +00:00
eeh 41065b740e Don't need `start' in crt0.o any more. ld expects `_start' as the entry
symbol, while gcc likes `__start'.
2002-03-29 18:11:55 +00:00
matt 0ce5ca145f Change to use a register prefix. 2002-02-24 01:06:18 +00:00
matthias 21fb786623 Declare the global register variable kps_strings before including anything
as this needs to be done before any function is defined (and there seems
to be a function definition in one of the include files).
2002-02-22 13:46:30 +00:00
mrg 829b76292e fix multiline string literal. from gcc3 2002-02-11 06:08:23 +00:00
thorpej e4217fbfe4 Pass the rtld object and ps_strings to _start() properly. From Marcus. 2002-02-03 23:57:19 +00:00
thorpej ec206ac99b Multi-line string literals are not in ISO-C. 2002-01-23 03:55:33 +00:00
drochner e757f639d2 don't include <machine/asm.h> to avoid conflicts with definitions
in <sys/cdefs.h>
2002-01-14 12:06:49 +00:00
thorpej fd9112a780 Build and install crtfm.o (sets the Alpha FP_C in a way that GCC's
-ffast-math on Alpha expects).
2002-01-14 01:31:58 +00:00
thorpej 24ca47c4d5 * Use the new ALPHA_SET_FP_C sysarch call.
* Provide an internal sysarch entry point, so that this works
  with statically-linked programs.
2002-01-14 01:31:00 +00:00
thorpej 655925395a Support for the GCC "-ffast-math" option on the Alpha. 2002-01-13 20:05:42 +00:00
thorpej caaec27cfe * Use += to assign OBJS so that machine-dependent Makefiles can
add their own objects to the list.
* Garbage-collect an unneeded CLEANFILES assignment.
2002-01-13 19:59:26 +00:00
thorpej d605da06f0 %progbits, not @progbits (@ is a comment character in ARM assembly). 2002-01-01 01:36:21 +00:00
thorpej 7050ac9aa9 Multi-line string literals are not supported by ANSI C. 2002-01-01 01:31:06 +00:00
thorpej 5ced70565e Set ELFSIZE=64. 2002-01-01 01:14:22 +00:00
thorpej d8abc59932 Add support for invoking GNU C++ local destructors in shared objects
via the __cxa_finalize() mechanism.

XXX Only enabled for new-toolchain platforms, as it requires the assembler
to support the .hidden pseudo-op.
2001-12-31 00:40:11 +00:00
thorpej a50163af65 Build separate crt{begin,end}.o and crt{begin,end}S.o files, rather
than linking them at install time.  Forthcoming changes require different
behavior for static vs. shared object versions of these files.
2001-12-31 00:11:13 +00:00
thorpej c41160abff Add support for registering Java classes emitted by the Java compiler
(e.g. the Java compiler in GCC 3.x) into the ".jcr" section.
2001-12-30 23:45:00 +00:00
thorpej 6027dc5536 Make sure the Dwarf2 EH frame info is 4-byte aligned. 2001-12-30 23:26:20 +00:00
thorpej 5b81869561 Don't use multi-line string literals; they're not supported by ANSI C. 2001-12-30 23:23:38 +00:00
bjh21 7723559395 Quiet GCC warnings. 2001-11-08 22:23:59 +00:00
lukem 65469e54b3 pull in ../../Makefile.inc 2001-11-05 15:11:40 +00:00
skrll 6d6c931c5a This is an a.out thing and doesn't belong here. 2001-10-26 16:05:25 +00:00
scw f768a5c42b Reduce the alignment constraint from 4 to 2. This fixes the problem where
gas(2) pads the text segment with 0x0 instead of NOP. Since m68k instructions
only need 16-bit alignment, .align 2 works just fine.
2001-10-13 09:21:50 +00:00
kristerw 031a62292d Run the entries in __CTOR_LIST__ and __DTOR_LIST__ in the order gcc expect. 2001-10-11 18:02:28 +00:00
matt eef4b63246 Make __start global. 2001-09-08 18:59:20 +00:00
bjh21 751e6fa590 Ensure that the stack is aligned to an 8-byte boundary before calling C code.
(ATPCS B-01)
2001-08-17 00:14:38 +00:00
simonb 9a68629ca6 Enlarge the stack frame to 16 bytes, and store the return address 8
bytes in instead of at the start, to leave room for a .cpload to store
the gp at offset 0 in the frame.  Allow 8 bytes for each (for mips64
one day...).

.cpload overwrite problems noted by Michael Hitch.
2001-08-16 03:44:46 +00:00
matt ee6a16ad18 Add a secondary label called __start (makes gcc 2.95.3 happier) and rename
the internal __start to ___start.   (Since -e is not supplied by default,
this has no effect on a native build.)
2001-08-05 00:01:27 +00:00