diff options
author | Theo de Raadt <deraadt@cvs.openbsd.org> | 1996-08-10 21:41:17 +0000 |
---|---|---|
committer | Theo de Raadt <deraadt@cvs.openbsd.org> | 1996-08-10 21:41:17 +0000 |
commit | 9faa288fe9517ea8524204f90bfa36d1aa74a828 (patch) | |
tree | eff3e3e0bc96603cd311c9cc44415785ca49cc5c /sys/arch/pc532 | |
parent | 9392a0d20bd3087247d0122567d2147d16bf3f97 (diff) |
srandom() seeds random() at boottime
Diffstat (limited to 'sys/arch/pc532')
-rw-r--r-- | sys/arch/pc532/pc532/random.s | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/sys/arch/pc532/pc532/random.s b/sys/arch/pc532/pc532/random.s index 174d296cd04..d56ad9d693c 100644 --- a/sys/arch/pc532/pc532/random.s +++ b/sys/arch/pc532/pc532/random.s @@ -46,18 +46,19 @@ #include <machine/asm.h> .data -randseed: + .globl __randseed +__randseed: .long 1 .text ENTRY(random) enter [r2],0 - movzwd randseed(pc), r2 /* 1st 16 bit multiply */ + movzwd __randseed(pc), r2 /* 1st 16 bit multiply */ muld 16807, r2 /* result is positive */ movd r2, r1 bicd 0xffff0000, r2 /* save bottom 16 bits */ ashd -16, r1 /* move top 16 to bottom */ - movzwd randseed+2(pc), r0 /* 2n 16 bit multiply */ + movzwd __randseed+2(pc), r0 /* 2n 16 bit multiply */ muld 16807, r0 addd r0, r1 /* add to top 16 bits of first */ movd r1, r0 /* save a copy in r0 */ @@ -70,6 +71,6 @@ ENTRY(random) subd 0x7fffffff, r0 nocarry: - movd r0, randseed(pc) + movd r0, __randseed(pc) exit [r2] ret 0 |