is (at least if you have fixed function alignment):
.file "z.c"
.text
.p2align 2,,3
.globl main
.type main,@function
main:
pushl %ebp
movl %esp, %ebp
pushl %edi
pushl %eax
movl x, %ecx
xorl %eax, %eax
shrl $2, %ecx
movl $foo, %edi
cld
rep
stosl
andl $-16, %esp
<-- the lower bits of `len' should be loaded
near here
testl $2, %edi <-- this seems to be meant to test the 2^1
bit in `len' (not alignment of the pointer
like it actually does). %edi is the wrong
register for holding the bits, since it is
still needed for the pointer.
je .L2
stosw
.L2:
testl $1, %edi <-- similarly for the 2^0 bit.
je .L3
stosb
.L3:
movl -4(%ebp), %edi
leave
ret
.Lfe1:
.size main,.Lfe1-main
.comm foo,400,32
.comm x,4,4
.ident "GCC: (GNU) 3.1 [FreeBSD] 20020509 (prerelease)"
This seems to only result in (len % 3) bytes not being cleared, since gcc
doesn't seem to use the builtin memset unless it knows that the pointer is
aligned. If %edi could be misaligned, then too many bytes would be set.
gad [Tue, 4 Jun 2002 03:40:24 +0000 (03:40 +0000)]
Change some "process id" variables from 'int' to 'pid_t', renaming some
of them to keep better track of which-is-which (multiple variables were
named 'pid'). Moved a global pid-variable into the only routine that
used it. Net result: fixes two compile-time warnings...
jhb [Mon, 3 Jun 2002 22:36:52 +0000 (22:36 +0000)]
Backout revision 1.2 since it didn't work and replace it with a fix that
actually does work. Ignore errors from kldload(2) if the errno value is
EEXIST. It would help if this return value were documented in the
kldload(2) manual page.
iedowse [Mon, 3 Jun 2002 22:09:04 +0000 (22:09 +0000)]
Use a per-device worker thread to avoid blocking in mdstrategy()
until the I/O completes. This fixes some easily reproducable deadlocks
that occur when using md(4) with GEOM.
jmallett [Mon, 3 Jun 2002 20:35:35 +0000 (20:35 +0000)]
Make the manpage consistent with the code on the subject of comments, as to
not change the code to always do the "GNU" thing, as it's possible people
rely on BSD m4(1) traditionally resetting comment characters in case of no
arguments to the changecom function.
PR: bin/17480 (I think this satisfies the problem report)
jhb [Mon, 3 Jun 2002 19:42:49 +0000 (19:42 +0000)]
Fix handling of the 'noError' variable. According to the code comments,
one can set the 'noError' variable to ignore any errors that occur for the
next command. However, the code was only unsetting 'noError' when an error
actually occurred, so if you set 'noError', the next command completed ok,
and the command after that failed, the second command's failure would be
ignored. This fixes this by performing the 'noError' check earlier and
then unsetting 'noError' after every command that is run.
jhb [Mon, 3 Jun 2002 19:39:28 +0000 (19:39 +0000)]
Add a 'mediaClose' script command to close the open media. An example use
would be to unmount the CD you installed from and prompt the user to
eject it before rebooting the machine.
Reimplement FILES support using bsd.files.mk with the
same set of features as in recently added bsd.incs.mk
(FILESGROUPS, accessibility from both bsd.prog.mk and
bsd.lib.mk, de-pessimized typical installation path,
etc.) New standard targets: buildfiles, installfiles,
and files (buildfiles + installfiles).
iedowse [Mon, 3 Jun 2002 12:06:49 +0000 (12:06 +0000)]
Call getmntinfo with MNT_NOWAIT to avoid hanging if any NFS servers
are down. Avoid trying to send RPCs to the pidXXX@machine names
used in the special amd(8) mounts.
PR: bin/6183
Submitted by: Petr Lampa <lampa@fee.vutbr.cz>
alc [Sun, 2 Jun 2002 23:54:09 +0000 (23:54 +0000)]
o Migrate vm_map_split() from vm_map.c to vm_object.c, renaming it
to vm_object_split(). Its interface should still be changed
to resemble vm_object_shadow().
brian [Sun, 2 Jun 2002 14:27:02 +0000 (14:27 +0000)]
Don't send a RAD_NAS_IP_ADDRESS attribute as RAD_NAS_IDENTIFIER is
sufficient.
In fact, using both breaks the radiator RADIUS daemon when used with
a db as it maps both attributes to the same field value and then
fails the insert.
I decided to remove RAD_NAS_IP_ADDRESS on the basis that rfc2138 says:
An Access-Request MUST contain a User-Name attribute. It SHOULD
contain either a NAS-IP-Address attribute or NAS-Identifier
attribute (or both, although that is not recommended). It MUST
despite the fact that this not recommended bit was removed from the
updated rfc.
tjr [Sun, 2 Jun 2002 08:27:04 +0000 (08:27 +0000)]
Adding an entry to the history with H_ENTER moves libedit's internal
history cursor. Reset the cursor after adding the entry to the history
when doing ``fc -s'' so the output is correct.
alc [Sun, 2 Jun 2002 06:31:41 +0000 (06:31 +0000)]
o Condition vm_object_pmap_copy_1()'s compilation on the kernel
option ENABLE_VFS_IOOPT. Unless this option is in effect,
vm_object_pmap_copy_1() is not used.
alc [Sat, 1 Jun 2002 22:41:43 +0000 (22:41 +0000)]
o Remove GIANT_REQUIRED from vm_map_zfini(), vm_map_zinit(),
vm_map_create(), and vm_map_submap().
o Make further use of a local variable in vm_map_entry_splay()
that caches a reference to one of a vm_map_entry's children.
(This reduces code size somewhat.)
o Revert a part of revision 1.66, deinlining vmspace_pmap().
(This function is MPSAFE.)