Commit Graph

700 Commits

Author SHA1 Message Date
uwe
943edbd0d8 Nuke va-sh.h. stdarg.h and varargs.h now use __builtin_va_*. 2006-05-21 23:14:13 +00:00
uwe
9458b164a6 New stdarg.h and varargs.h based on arm and i386 versions.
Use __builtin_va_* instead of hand written code in va-sh.h that uses
LHS casts.  Slightly worse code is generated by gcc 3.3.3, but LHS
casts are outlawed in gcc 3.3.6 and gcc 4.

Build-tested on hpcsh (le) and mmeye (be), run-tested on hpcsh.
2006-05-21 22:39:04 +00:00
uwe
d5b4b78d10 Change _BSD_VA_LIST_ from "void *" to "__builtin_va_list" for newer
gcc versions and "char *" otherwise.  This is what most other arches
use, modulo different __GNUC_PREREQ__.

This is in preparation for replacing stdarg.h and varargs.h with
versions based on __builtin_* instead of handwritten code that gcc
3.3.6 and up refuse to compile b/c of lhs casts.

Identical binary code produced.
2006-05-15 08:57:59 +00:00
elad
8ccb6c9341 integrate kauth. 2006-05-14 21:55:09 +00:00
skrll
a9f4c28a3d Fix a bunch of cast lvalues. 2006-05-10 06:24:02 +00:00
uwe
03ee8a12f3 Fix typo in comment in previous. 2006-04-11 23:45:13 +00:00
uwe
1860560960 Cosmetic. Same object code generated. 2006-04-11 19:07:54 +00:00
uwe
c73fd1d833 Shave off few instructions by replacing mov src, dst; swap.w dst, dst;
with swap.w src, dst in REDUCE.
2006-04-11 18:42:09 +00:00
uwe
412106574d Shave off few instructions by replacing mov #imm, reg; sub reg, dst
with add #-imm, dst
2006-04-11 18:34:39 +00:00
uwe
ae727708e1 Decorate pmap_remove_all() with /* ARGSUSED */ 2006-04-10 23:12:11 +00:00
cherry
93447d7ac4 closes: PR kern/32359
modifies machine/db_machdep.h: BKPT_SET(inst) to BKPT_SET(inst, addr) for all archs ie; passess the
breakpoint address as well.

Patch from cherry@mahiti.org
2006-04-01 15:45:00 +00:00
uebayasi
8572d2c144 Stop using linker scripts on all sh3 ports.
The only information to be compensated is text section start address.
The default value is set arch-wise as DEFTEXTADDR.  Each kernel config
can override the default value by setting TEXTADDR.

Tested on COMPUTEXEVB (evbsh3).

Reviewed By:	uwe
2006-03-17 16:06:51 +00:00
he
450ce68a74 Transform to new signature for uvm_fault() by dropping the third arg.
Discussed with drochner.
2006-03-16 15:10:06 +00:00
uebayasi
f059840dbd * Don't define SET/CLR/ISSET locally.
* Avoid shadow in a pointer-to-function declaration.
2006-03-07 10:53:29 +00:00
thorpej
61dd49d3bc Syscall debug tracing is handled by trace_enter() / trace_exit(). Change
trace_is_enabled() to return TRUE if SYSCALL_DEBUG is defined, and g/c
all of the SYSCALL_DEBUG handling from individual system call dispatch
routines.
2006-03-07 07:21:50 +00:00
thorpej
be8b235384 Clean up fallout proc_is_traced_p() change:
- proc_is_traced_p() -> trace_is_enabled(), to match trace_enter() and
  trace_exit().
- trace_is_enabled() becomes a real function.
- Remove unnecessary include files from various files that used to care
  about KTRACE and SYSTRACE, but do no more.
2006-03-07 03:32:04 +00:00
he
fddbc48a67 Remove yet another instance of the SET/CLR/ISSET macro triplet, now
that they are in <sys/types.h>.
2006-03-06 15:01:45 +00:00
christos
beea4fc3fa Add a proc_is_traced_p() macro and use it, instead of copying the same code
in many places. Idea from thorpej.
2006-03-05 19:08:38 +00:00
christos
a4495f4cec implement PT_SYSCALL 2006-03-05 07:21:37 +00:00
uwe
970e24ee46 s/u_intN_t/uintN_t/ 2006-03-04 01:55:03 +00:00
uwe
3499d9e849 s/u_intN_t/uintN_t/ 2006-03-04 01:13:35 +00:00
uwe
7ebf92ccc4 Use 4- or 2-bytes aligned accesses if possible.
Makes it possible to examine hw registers that require 4- or 2-byte accesses.
2006-02-24 00:57:19 +00:00
thorpej
3ddf26777f Use device_is_active() rather than testing dv_flags for DVF_ACTIVE
directly.
2006-02-20 16:50:36 +00:00
uwe
01bb68c06b Make _BASE visible regardless of #ifdef SHx.
Add defines for SMR bits in IrDA mode in 7709.
2006-02-18 00:41:32 +00:00
skrll
221fe583b6 Match comment against #endif with #ifdef 2006-02-17 08:23:26 +00:00
perry
fbae48b901 Change "inline" back to "__inline" in .h files -- C99 is still too
new, and some apps compile things in C89 mode. C89 keywords stay.

As per core@.
2006-02-16 20:17:12 +00:00
uwe
c842fab210 Fix file comment to include the expansion for 'F' in "SCIF". 2006-02-14 00:02:03 +00:00
uwe
533115eb12 Define scif register base(s) and offsets.
Express old defines in terms of base + offset.
Use uintN_t.
2006-02-14 00:00:34 +00:00
uwe
7dea0a81b8 Move/merge common defintions out of ifdef. 2006-02-13 23:26:31 +00:00
uwe
2e71b70d1f While here, use uintN_t. 2006-02-12 02:30:55 +00:00
uwe
c6474efc78 Revert changes made in 1.10. They should not be necessary (we are
doing a single word store).  I've been running my Jornada without them
for a very long time, but got no word from dreamcast folks.  Thanks to
Nick Hudson for testing it on dreamcast finally.
2006-02-12 02:23:03 +00:00
uwe
3c5e28322e pmap_extract: handle P1 and P2 (MMU bypass) addresses specially.
PMAP_MAP_POOLPAGE maps pa -> P1 va, so we must handle this case here.
PR port-sh3/26569 by Nick Hudson.
2006-02-09 10:08:32 +00:00
uwe
175260c2de sh3_vector_tlbmiss: don't waste perfectly good delay slots. 2006-02-08 02:19:57 +00:00
uwe
33c4e018e2 While here, shave off few bytes and few cycles off of the sh3_vector_tlbmiss.
Since the registers we use are at the very end of address space, we
can load their addresses as small immediate negative constants instead
of loading them from memory.
2006-02-08 00:32:06 +00:00
uwe
9621f44368 Pass untruncated va=TEA to tlb_exception(), not its VPN. 2006-02-07 23:56:20 +00:00
skrll
c36e4cf586 Fix the multiple inclusion protection. hi dsl. 2006-02-02 06:39:05 +00:00
dsl
37875b24f4 Need to install byte_swap.h and bswap.h needs to include sh3/byte_swap.h. 2006-02-01 20:56:18 +00:00
dsl
28cb02c94f Make the sh3 bswap headers look like all the other ports 2006-01-31 07:58:56 +00:00
dsl
67d47e0290 Change sys/arch/xxx/include/bswap.h to #include machine/byte_swap.h then
sys/bswap.h in order to pick up the MD inline routines and the constant
folding definitions in the right order.
Code can include either sys/bswap.h or machine/bswap.h with the same effect.
2006-01-31 07:49:18 +00:00
dsl
6f0f9f8763 Make almost everything #include <sys/bswap.h> instead of <machine/bswap.h>
The bswap.h and endian.h files are all rather incestuous, but I want to
get the constant folding stuff into one place - sys/bswap.h
2006-01-29 21:42:40 +00:00
uwe
86e8b6d9d0 Wrap sh3 and sh4 parts into respective ifdefs.
Declare local functions static.
ANSI'ify functions without arguments.
2006-01-25 00:02:57 +00:00
uwe
4baa2e17dd EVTCODE_TO_MAP_INDEX - tweak to help gcc produce better code. 2006-01-24 23:51:42 +00:00
uwe
25196f3ee3 Consistently apply ifdef logic so that in SH3-only or SH4-only kernel
all references to CPU cpecific functions are direct, and unused hooks
are not defined.
2006-01-24 00:01:22 +00:00
uwe
aec45d5629 Pacify -Wuninitialized for SH3 && SH4 case. 2006-01-23 23:25:45 +00:00
uwe
6b850c4367 Delclare __sh_PTEH for SH3 && SH4 case. 2006-01-23 23:17:49 +00:00
uwe
8cfe9e15ba Pacify -Wuninitialized for SH3 && SH4 case. 2006-01-23 23:07:19 +00:00
uwe
406de23722 Don't waste rts delay slots in sh3_switch_resume and savectx.
longjmp needs to arrange for a call to setjmp to return 1.
2006-01-23 22:52:09 +00:00
uwe
a22aa45682 Use cpp-safe labels. 2006-01-23 22:32:50 +00:00
uwe
5db834dbd4 LINTSTUB: include <sh3/locore.h> - to check *_switch_resume prototypes. 2006-01-23 22:14:59 +00:00
uwe
3e38547c6e Provide sh3_switch_resume/sh4_switch_resume with own copies of L_MD_UPTE.
Move SET_ENTRY_SIZE(sh4_switch_resume) under ifdef SH4.
2006-01-23 22:06:44 +00:00