NetBSD-Bugs archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

Re: port-vax/41139: pipe(2) seems broken on VAX



mhitch%lightning.msu.montana.edu@localhost wrote:

>  On Wed, 8 Apr 2009, Anders Magnusson wrote:
>  
>  > It may be worth trying, but it also may require significantly more code.
>  > The movc3 instruction handles overlapping copies, but if the data block is
>  > larger than 64k then it must be done manually.  This is only a problem for 
> kcopy,
>  > copy{in,out} should not overlap :-)
>  
>     It's not all that much code, at least for copy{in,out}:
>  
>  ENTRY(copyout, 0)
>           movl    8(%ap),%r3
>           blss    3f              # kernel space
>           movl    4(%ap),%r1
>           brb     2f
>  
>  ENTRY(copyin, 0)
>           movl    4(%ap),%r1
>           blss    3f              # kernel space
>           movl    8(%ap),%r3
>  2:      mfpr    $PR_ESP,%r2
>           movab   1f,(%r2)
>  4:      tstw    14(%ap)         # check if >= 64K
>           bneq    5f
>           movc3   12(%ap),(%r1),(%r3)
>  1:      mfpr    $PR_ESP,%r2
>           clrl    (%r2)
>           ret
>  5:      movc3   $0xfffc,(%r1),(%r3)
>           subl2   $0xfffc,12(%ap)
>           brb     4b
>  
>  3:      mnegl   $1,%r0
>           ret

This fixes the pipe problem on 5.0.
Should we commit it and pull up to 5.0?
---
Izumi Tsutsui


Home | Main Index | Thread Index | Old Index