Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/lib/libc/arch/riscv/sys Use lla instead doing the pcrel relo...
details: https://anonhg.NetBSD.org/src/rev/fe04e50da886
branches: trunk
changeset: 337055:fe04e50da886
user: matt <matt%NetBSD.org@localhost>
date: Tue Mar 31 11:59:41 2015 +0000
description:
Use lla instead doing the pcrel relocs ourselves.
diffstat:
lib/libc/arch/riscv/sys/brk.S | 7 +++----
lib/libc/arch/riscv/sys/sbrk.S | 6 ++----
2 files changed, 5 insertions(+), 8 deletions(-)
diffs (54 lines):
diff -r e8af0213a617 -r fe04e50da886 lib/libc/arch/riscv/sys/brk.S
--- a/lib/libc/arch/riscv/sys/brk.S Tue Mar 31 11:53:13 2015 +0000
+++ b/lib/libc/arch/riscv/sys/brk.S Tue Mar 31 11:59:41 2015 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: brk.S,v 1.3 2015/03/27 23:23:14 matt Exp $ */
+/* $NetBSD: brk.S,v 1.4 2015/03/31 11:59:41 matt Exp $ */
/*-
* Copyright (c) 2014 The NetBSD Foundation, Inc.
@@ -32,7 +32,7 @@
#include "SYS.h"
#if defined(LIBC_SCCS) && !defined(lint)
- RCSID("$NetBSD: brk.S,v 1.3 2015/03/27 23:23:14 matt Exp $")
+ RCSID("$NetBSD: brk.S,v 1.4 2015/03/31 11:59:41 matt Exp $")
#endif /* LIBC_SCCS and not lint */
.hidden _C_LABEL(__minbrk)
@@ -55,8 +55,7 @@
.text
ENTRY(_brk)
-.L0: auipc t1, %pcrel_hi(_C_LABEL(__minbrk))
- addi t1, t1, %pcrel_lo(.L0)
+ lla t1, _C_LABEL(__minbrk)
PTR_L t5, 0(t1)
bgeu a0, t5, 1f
move a0, t5 # dont allow break < minbrk
diff -r e8af0213a617 -r fe04e50da886 lib/libc/arch/riscv/sys/sbrk.S
--- a/lib/libc/arch/riscv/sys/sbrk.S Tue Mar 31 11:53:13 2015 +0000
+++ b/lib/libc/arch/riscv/sys/sbrk.S Tue Mar 31 11:59:41 2015 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: sbrk.S,v 1.3 2015/03/27 23:23:14 matt Exp $ */
+/* $NetBSD: sbrk.S,v 1.4 2015/03/31 11:59:41 matt Exp $ */
/*-
* Copyright (c) 2014 The NetBSD Foundation, Inc.
@@ -33,15 +33,13 @@
.hidden _C_LABEL(__curbrk)
.globl _C_LABEL(__curbrk)
- .globl _C_LABEL(_end)
#ifdef WEAK_ALIAS
WEAK_ALIAS(sbrk, _sbrk)
#endif
ENTRY(_sbrk)
-.L0: auipc t1, %pcrel_hi(_C_LABEL(__curbrk))
- addi t1, t1, %pcrel_lo(.L0)
+ lla t1, _C_LABEL(__curbrk)
PTR_L t2, 0(t1)
add a0, a0, t2 // compute current break
SYSTRAP(break)
Home |
Main Index |
Thread Index |
Old Index