diff options
| author | matt <matt@NetBSD.org> | 2013-07-18 12:16:40 +0000 |
|---|---|---|
| committer | matt <matt@NetBSD.org> | 2013-07-18 12:16:40 +0000 |
| commit | dfaa6ca214978e7c441a8dfdbdadbc7d1881f983 (patch) | |
| tree | 9149648cd604b743fbceffbb1b4ebdc22c9ada5b /sys/lib | |
| parent | 760b94c526b270a1fd4b22936307e00695663d1d (diff) | |
Don't use %d2 (violates the ABI since it wasn't saved), use %a0 instead.
Use a pcrelative access for the local data avoiding the GOT.
Diffstat (limited to 'sys/lib')
| -rw-r--r-- | sys/lib/libkern/arch/m68k/random.S | 18 |
1 files changed, 5 insertions, 13 deletions
diff --git a/sys/lib/libkern/arch/m68k/random.S b/sys/lib/libkern/arch/m68k/random.S index 96fc68adb66..f4cc84efa00 100644 --- a/sys/lib/libkern/arch/m68k/random.S +++ b/sys/lib/libkern/arch/m68k/random.S @@ -1,4 +1,4 @@ -/* $NetBSD: random.S,v 1.4 2009/01/06 01:24:56 pooka Exp $ */ +/* $NetBSD: random.S,v 1.5 2013/07/18 12:16:40 matt Exp $ */ /* * Copyright (c) 1990,1993 The Regents of the University of California. @@ -48,22 +48,14 @@ ASLOCAL(randseed) ENTRY(random) movl #16807, %d0 -#ifdef PIC - lea %pc@(_GLOBAL_OFFSET_TABLE_@GOTPC), %a0 - movl _ASM_LABEL(randseed)@GOT(%a0), %d2 - mulsl (%d2), %d1:%d0 -#else - mulsl _ASM_LABEL(randseed), %d1:%d0 -#endif + LEA_LCL(_ASM_LABEL(randseed),%a0) + mulsl (%a0), %d1:%d0 lsll #1, %d0 roxll #2, %d1 addl %d1, %d0 moveql #1, %d1 addxl %d1, %d0 lsrl #1, %d0 -#ifdef PIC - movl %d0, (%d2) -#else - movl %d0, _ASM_LABEL(randseed) -#endif + movl %d0, (%a0) rts +END(random) |
