christos
fd6ed0e3f6
Fix capitalization
2015-11-12 17:31:43 +00:00
christos
557b696a7a
Recognize 0[bB] as binary (base 2)
2015-11-12 17:23:51 +00:00
nakayama
2c01e1e121
Fix 64-bit atomic operations on 32-bit kernel and userland, and add
...
support for missing __sync_*_8 builtins.
2015-10-18 02:28:07 +00:00
phx
028fd4a71a
Fixed typo: propertly -> property.
2015-08-20 15:55:09 +00:00
mlelstv
2bb05299a6
fix comment
2015-07-10 20:16:01 +00:00
isaki
3940a87a45
Improve the code in __sync_bool_compare_and_swap_{1,2,4}.
...
- bccs is smaller and faster than bcc(.w) in this case.
- it can be used movql in this case (assembler optimise it though).
2015-07-04 07:11:45 +00:00
isaki
55d302de22
atomic_cas_{8,16}:
...
- Correct the wrong offset in stack.
__sync_bool_compare_and_swap_{1,2,4}:
- Correct the wrong offset in stack.
- D3 must be preserved in subroutines.
PR/49995.
2015-07-04 06:56:29 +00:00
matt
1ce375c3b8
Always use sync if mips3 or later or not using O32 ABI. (A little redundant
...
since not using O32 means you are using mips3 or later.)
2015-06-23 20:56:17 +00:00
matt
bb7982ddd7
#include "assym.h"
...
Don't include "assym.h" with _RUMPKERNEL defined.
2015-06-22 06:06:02 +00:00
matt
e4cf7e4e27
Back out last change; fixed in the correct place.
2015-06-07 15:06:24 +00:00
matt
91746eb77c
Use ${COPT} so it properly emits the right features doing MKCOMPAT
2015-06-07 15:05:34 +00:00
joerg
33e2d9fc4a
Require ARMv5TE to assemble.
2015-06-07 11:46:56 +00:00
joerg
2b71fd9719
Add ARM EABI aliases for aligned arguments.
2015-06-07 11:41:59 +00:00
matt
ac748598de
Include OCTEON support for syncw and saa/saad (Store Atomic Add).
2015-06-01 23:16:54 +00:00
matt
6ac68d00a5
Don't compile if there is a macro of the same name.
2015-05-29 19:39:41 +00:00
matt
1d43c96919
force 2nd to argument to unsigned byte value.
...
(found by t_strchr and t_strrchr tests)
2015-05-26 06:55:08 +00:00
justin
d392f6aa93
Do not set CRT_ALIAS for rump kernel; symbols provided by toolchain
2015-05-18 08:24:10 +00:00
justin
39470f7e73
It is just the __ffssi2 alias we do not want in rump kernel
2015-05-17 22:14:38 +00:00
justin
75c54c2178
Move arm sync_* changes to Makefile.inc
2015-05-17 22:08:24 +00:00
justin
b4bb74214e
Do not build arm toolchain symbols in the rump kernel
...
These symbols will be provided at link time and will be
duplicate symbols in rump kernel and libc if defined.
Many have been fixed previously, but these were missed
as did not have a test.
2015-05-17 20:57:11 +00:00
christos
72b528eece
Now that _PROP_ISSPACE does not include the EOF check, put the check for
...
EOF inside the loop. Also fix another unbounded loop that did not check for
EOF. From Mateusz Kocielski
XXX: pullup-7
2015-05-12 14:59:35 +00:00
christos
272b1fe359
Don't treat NUL (EOF) as SPACE. All the code that uses _PROP_ISSPACE() checks
...
explicitly for _PROP_EOF() anyway, and this can be abused to cause run beyond
the end of buffer DoS (Mateusz Kocielski)
XXX: pullup-7
2015-05-11 16:50:35 +00:00
christos
ad3d79508d
Limit size of xml buffer for userland requests (From Mateusz Kocielski)
...
XXX: pullup-7
2015-05-11 16:48:34 +00:00
christos
35d355f3ea
- new test for strtoi
...
- namespace protection for strto{i,u}
- separate manpages for strto{i,u} from the ones for strto{u,}l
From: Kamil Rytarowski
2015-05-01 14:17:56 +00:00
riastradh
808c0b52c7
Sort includes.
2015-04-21 12:47:33 +00:00
skrll
a2e01a4bd7
Use the right register in previous. Spotted by matt@
2015-04-17 07:15:02 +00:00
skrll
bbef540942
ARM ARM D7.3.2 - ensure all previous accesses are observed before
...
the lock is cleared
2015-04-17 07:03:40 +00:00
justin
6324ab4097
On big endian machines needs to include sys/endian.h for le32dec
...
Mainly affects cross builds on big endian; tested on FreeBSD mips
and Linux ppc.
2015-04-15 08:31:05 +00:00
matt
2d9adf0d04
Switch to new ABI (a0/a1 replace v0/v1)
2015-03-27 06:42:37 +00:00
justin
8f795c07a7
Don't build the __eabi_ aliases in the arm rump kernel.
...
These are provided by libc in userspace, so leave out of kernel
2015-03-26 13:34:51 +00:00
riastradh
5a2ca44c60
Switch to the suggested constant-time result conversion.
...
Not hard to find CPU/compiler combinations with branches for `!res'.
While here, make everything unsigned for good measure.
2015-03-18 20:11:35 +00:00
christos
84a48e0829
match variable names with man page (Kamil Rytarowski)
2015-01-18 17:55:22 +00:00
christos
368192c420
add strto{i,u} from Kamil Rytarowski as discussed in tech-userlevel.
2015-01-16 18:35:28 +00:00
riastradh
fe3ead6a42
Introduce membar_datadep_consumer.
...
Discussed briefly on tech-kern without objection:
https://mail-index.netbsd.org/tech-kern/2014/11/20/msg018054.html
https://mail-index.netbsd.org/tech-kern/2015/01/07/msg018326.html
2015-01-08 22:27:17 +00:00
chs
6d40f9ff57
add a new "fo_mmap" fileops method to allow use of arbitrary uvm_objects for
...
mappings of file objects. move vnode-specific details of mmap()ing a vnode
from uvm_mmap() to the new vnode-specific vn_mmap(). add new uvm_mmap_dev()
and uvm_mmap_anon() convenience functions for mapping character devices
and anonymous memory, and replace all other calls to uvm_mmap() with those.
use the new fileop in drm2 so that libdrm can use mmap() to map things
like on other platforms (instead of the ioctl that we have used so far).
2014-12-14 23:48:58 +00:00
matt
f6453319ae
Add atomic_c11_compare_exchange_cas_{8,16,32}.c
2014-11-20 07:07:13 +00:00
joerg
67ec38504d
Provide prototypes to fix build with clang.
2014-11-04 19:56:44 +00:00
dennis
f8446d6fc9
Add missing C11 atomic support functions to repair prior
...
build breakage. matt@ made me do this.
2014-10-16 18:52:17 +00:00
martin
be3005a074
Provide C++ 2011 <atomic> support functions for hppa and arm.
2014-10-14 07:25:05 +00:00
martin
f0a1164b36
Provide <atomic> C++ 2011 support functions for mips and sh3.
2014-10-13 13:00:55 +00:00
martin
963bb46806
Move the and_{16,8}_nv sources into the right (libc only) block.
2014-10-13 12:49:59 +00:00
martin
6e3879b0c6
Add C++ 2011 <atomic> support functions.
2014-10-13 08:59:41 +00:00
martin
3f671a8ede
Provide __sync_and_and_fetch_2 and __sync_and_and_fetch_1 for pre-ARMv6,
...
they are needed for the C++ 2011 <atomic> stuff.
2014-10-13 07:31:12 +00:00
martin
241614a4c5
Hook __atomic_compare_exchange_N into vax libc.
2014-10-12 17:53:33 +00:00
martin
2a3f84309a
Provide __atomic_compare_exchange_N (as needed for the C11 2011 <atomic>
...
ops) via the corresponding CAS.
2014-10-12 17:51:47 +00:00
khorben
00b617c08a
Look for the character to locate before checking for the NUL character
...
As documented in PR port-i386/49208, this fixes strchr(s, '\0'), as used by
the FAT first-stage bootloader on x86 (bootxx_msdos).
strchr(s, '\0') is otherwise equivalent to strlen(string), which would
probably look nicer in the original file, dosfs.c from libsa.
Confirmed working in qemu and on real hardware.
ok joerg@
XXX pull-up to netbsd-6 and netbsd-7
2014-09-22 20:31:56 +00:00
matt
6cf6fe02a9
New files for Userland support of UCB RISC-V (both 32-bit and 64-bit)
2014-09-19 17:36:24 +00:00
matt
6569f93208
Eliminate use of C++ keywords and don't nest struct definitions.
2014-09-05 05:19:24 +00:00
matt
27620987b8
New files for OR1K support
2014-09-03 19:34:25 +00:00
matt
8f455a577d
Add __sync_val_compare_and_swap_{1,2} aliases for _atomic_cas_{8,16}
2014-09-03 19:30:47 +00:00