fetch them correctly when building PIC.
ok kettenis@
-/* $OpenBSD: fixunsdfsi.S,v 1.4 2012/08/22 17:19:35 pascal Exp $ */
+/* $OpenBSD: fixunsdfsi.S,v 1.5 2023/01/13 17:52:08 miod Exp $ */
/* $NetBSD: fixunsdfsi.S,v 1.3 2000/07/25 04:26:12 mycroft Exp $ */
/*
* Copyright (c) 1992, 1993
* that it really matters, by using `fbul,a'.
*/
+ .section .rodata
.align 8
Lbigd:
.word 0x43e00000 ! .double 2^63
*unsigned long __dtoul(double):
* double -> unsigned long
*/
+ .text
ENTRY(__dtoul)
sub %sp, 16, %sp
std %f2, [%sp + 64 + BIAS + 8]
#ifdef __PIC__
- PICCY_SET(Lbigd, %g1, %o0)
+ PIC_PROLOGUE(%o5, %o4)
+ set Lbigd, %o4
+ ldx [%o5 + %o4], %g1
ldd [%g1], %f2
#else
sethi %hi(Lbigd), %g1
st %f1, [%sp + 64 + BIAS + 8]
st %f2, [%sp + 64 + BIAS + 12]
#ifdef __PIC__
- PICCY_SET(Lbigf, %g1, %o0)
+ PIC_PROLOGUE(%o5, %o4)
+ set Lbigf, %o4
+ ldx [%o5 + %o4], %g1
ld [%g1], %f2
#else
sethi %hi(Lbigf), %g1
-/* $OpenBSD: modf.S,v 1.6 2012/08/22 17:19:35 pascal Exp $ */
+/* $OpenBSD: modf.S,v 1.7 2023/01/13 17:52:08 miod Exp $ */
/* $NetBSD: modf.S,v 1.3 2000/11/01 23:32:41 eeh Exp $ */
/*
* %f6:f7 double temp.
*/
+ .section .rodata
.align 8
Lmagic:
.word 0x43300000 ! sign = 0, exponent = 52 + 1023, mantissa = 0
.word 0 ! 0.0
.word 0
+ .text
ENTRY(modf)
save %sp, -CC64FSZ-16, %sp
+#ifdef __PIC__
+ PIC_PROLOGUE(%o5, %o4)
+#endif
/*
* First, compute v = abs(val)
fabsd %f0, %f4 ! %f4:f5 = v
fcmped %fcc1, %f0, %f4 ! %fcc1 = (val == abs(val))
#ifdef __PIC__
- PICCY_SET(Lmagic, %l0, %o7)
+ set Lmagic, %o4
+ ldx [%o5 + %o4], %l0
ldd [%l0], %f2
#else
sethi %hi(Lmagic), %l0
* fractional part is 0.
*/
#ifdef __PIC__
- PICCY_SET(L0, %l0, %o7)
+ set L0, %o4
+ ldx [%o5 + %o4], %l0
std %f0, [%i1] ! *ival = val;
ldd [%l0], %f0 ! return 0.0;
#else
-/* $OpenBSD: ffs.S,v 1.9 2022/12/08 01:25:43 guenther Exp $ */
+/* $OpenBSD: ffs.S,v 1.10 2023/01/13 17:52:08 miod Exp $ */
/*
* Copyright (c) 1992, 1993
*/
ENTRY(ffs)
#ifdef __PIC__
- PICCY_SET(__ffstab, %o2, %o3)
+ PIC_PROLOGUE(%o5, %o4)
+ set __ffstab, %o4
+ ldx [%o5 + %o4], %o2
#else
set __ffstab, %o2
#endif
END(ffs)
.protected ffs
+ .section .rodata
__ffstab:
.byte -24,1,2,1,3,1,2,1,4,1,2,1,3,1,2,1 /* 00-0f */
.byte 5,1,2,1,3,1,2,1,4,1,2,1,3,1,2,1 /* 10-1f */
-/* $OpenBSD: brk.S,v 1.10 2022/12/08 01:25:44 guenther Exp $ */
+/* $OpenBSD: brk.S,v 1.11 2023/01/13 17:52:08 miod Exp $ */
/* $NetBSD: brk.S,v 1.9 2000/07/25 20:15:40 mycroft Exp $ */
/*
ENTRY_NB(brk)
#ifdef __PIC__
- PIC_PROLOGUE(%o5,%o4)
+ PIC_PROLOGUE(%o5, %o4)
set __minbrk, %o4
ldx [%o5 + %o4], %o4
ldx [%o4], %o1 /* %o1 = minbrk */
-/* $OpenBSD: sbrk.S,v 1.8 2022/12/08 01:25:44 guenther Exp $ */
+/* $OpenBSD: sbrk.S,v 1.9 2023/01/13 17:52:08 miod Exp $ */
/* $NetBSD: sbrk.S,v 1.7 2000/07/25 15:14:46 mycroft Exp $ */
/*
ENTRY_NB(sbrk)
#ifdef __PIC__
- PIC_PROLOGUE(%o5,%o4)
+ PIC_PROLOGUE(%o5, %o4)
set __curbrk, %o3
ldx [%o5 + %o3], %o2
ldx [%o2], %o3 /* %o3 = old break */