[OLD_BINUTILS]: Fall back to standard fpsr value if _FPU_STATUS
is not defined.
#include <sysdep.h>
#include <asm/unistd.h>
#include <sysdep.h>
#include <asm/unistd.h>
-/*
- * Arguments for __libc_start_main:
- * out0: main
- * out1: argc
- * out2: argv
- * out3: init
- * out4: fini
- * out5: rtld_fini
- * out6: stack_end
- */
+/* Arguments for __libc_start_main:
+ out0: main
+ out1: argc
+ out2: argv
+ out3: init
+ out4: fini
+ out5: rtld_fini
+ out6: stack_end */
+
+/* XXX: Remove this once a version of the linker scripts (binutils) is
+ widespread enough that provides the default _FPU_STATUS value. It
+ is safe to remove the OLD_BINUTILS code at any time since, in the
+ worst case, it will lead to an unresolved external reference to
+ _FPU_STATUS; that is, there won't be any silent errors. */
+#define OLD_BINUTILS
.prologue
{ .mlx
alloc r2 = ar.pfs,0,0,7,0
.prologue
{ .mlx
alloc r2 = ar.pfs,0,0,7,0
}
{ .mlx
adds out2 = 16, sp /* get address of argc value */
}
{ .mlx
adds out2 = 16, sp /* get address of argc value */
+#ifdef OLD_BINUTILS
+ .weak _FPU_STATUS
+ cmp.eq p6, p0 = r0, r3
+ ;;
+(p6) movl r3 = 0x9804c0270033f
+ ;;
+#endif
{ .mii
mov ar.fpsr = r3
sub gp = r9, gp /* back-compute gp value */
{ .mii
mov ar.fpsr = r3
sub gp = r9, gp /* back-compute gp value */