Subject: __clone function
To: None <port-arm@netbsd.org>
From: Chris Gilbert <chris@paradox.demon.co.uk>
List: port-arm
Date: 07/20/2001 10:09:43
--------------Boundary-00=_7GLR2WUQVFK0GR25DKVN
Content-Type: text/plain;
  charset="iso-8859-1"
Content-Transfer-Encoding: 8bit

Hi,

I was wondering if anyone has the time to check over the attached __clone 
function.  I've not had time to do optimise it, but it should do the right 
thing (famous last words :)  I've only had time to actually compile it, but 
thought it would save everyone doing their own version.

Basically drop the attached file in lib/libc/arch/arm/sys and make dependall 
in libc (libc now requires __clone.S)

Cheers,
Chris

--------------Boundary-00=_7GLR2WUQVFK0GR25DKVN
Content-Type: text/x-c;
  charset="iso-8859-1";
  name="__clone.S"
Content-Transfer-Encoding: base64
Content-Description: arm __clone function
Content-Disposition: attachment; filename="__clone.S"

I2luY2x1ZGUgPHN5cy9lcnJuby5oPgoKI2luY2x1ZGUgIlNZUy5oIgoKI2lmZGVmIFdFQUtfQUxJ
QVMKV0VBS19BTElBUyhjbG9uZSwgX19jbG9uZSkKI2VuZGlmCgovKgogKiBpbnQgX19jbG9uZShp
bnQgKCpmbikodm9pZCAqKSwgdm9pZCAqc3RhY2ssIGludCBmbGFncywgdm9pZCAqYXJnKTsKICov
CkVOVFJZKF9fY2xvbmUpCgoJLyogdGVzdCBzdGFjayBhbmQgZnVuY3Rpb24gYWdhaW5zdCBudWxs
ICovCgltb3YJaXAsICMweDAwCgljbXAJcjAsIGlwCgljbXBuZQlyMSwgaXAKCWJlcQlMZWludmFs
CgoJc3RtZmQJcjEhLCB7cjAsIHIzfSAKCQoJLyogc3lzY2FsbCBleHBlY3RzIChmbGFncywgc3Rh
Y2spICovCgltb3YJcjIsIHIwCgkKCVNZU1RSQVAoX19jbG9uZSkKCWJjcwlQSUNfU1lNKENFUlJP
UiwgUExUKQoKCW1vdglpcCwgIzB4MDAKCWNtcAlyMCwgaXAKCS8qIGlmIHRoaXMgaXMgdGhlIHBh
cmVudCB0aGVuIGp1c3QgcmV0dXJuIC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