Welcome to mirror list, hosted at ThFree Co, Russian Federation.

cygwin.com/git/newlib-cygwin.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJeff Johnston <jjohnstn@redhat.com>2014-03-22 00:58:54 +0400
committerJeff Johnston <jjohnstn@redhat.com>2014-03-22 00:58:54 +0400
commite59026e844dc2f11f032058e671da848beb67f91 (patch)
treeb5a9903ca1f3195791f08f41f4d5333a094e4f31 /libgloss/nds32
parent31b1f3e55f50aa1034b0b318c55f3776a1cd7e5d (diff)
2014-03-21 Sabrini Ni <sabrinanitw@gmail.com>
* nds32/crt0.S: Initialize ITB base. * nds32/crt1.S: Ditto.
Diffstat (limited to 'libgloss/nds32')
-rw-r--r--libgloss/nds32/crt0.S11
-rw-r--r--libgloss/nds32/crt1.S11
2 files changed, 22 insertions, 0 deletions
diff --git a/libgloss/nds32/crt0.S b/libgloss/nds32/crt0.S
index 5f56e9a50..ec294428c 100644
--- a/libgloss/nds32/crt0.S
+++ b/libgloss/nds32/crt0.S
@@ -52,6 +52,17 @@ SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
.type _start, @function
.align 2
_start:
+.L_hw_config:
+#if __NDS32_EX9_EXT__
+ /* Initialize the table base of EX9 instruction. */
+ mfsr $r0, $MSC_CFG /* Check if support EIT. */
+ srli $r0, $r0, 24
+ andi $r0, $r0, 0x1
+ beqz $r0, .L_fp_gp_init
+ la $r0, $_ITB_BASE_ /* Init ITB. */
+ mtusr $r0, $ITB
+#endif
+
.L_fp_gp_init:
/* Initialization for $gp. The _SDA_BASE_ location
stands for Small Data Access. */
diff --git a/libgloss/nds32/crt1.S b/libgloss/nds32/crt1.S
index 5ff4d9629..f8365cef5 100644
--- a/libgloss/nds32/crt1.S
+++ b/libgloss/nds32/crt1.S
@@ -52,6 +52,17 @@ SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
.type _start, @function
.align 2
_start:
+.L_hw_config:
+#if __NDS32_EX9_EXT__
+ /* Initialize the table base of EX9 instruction. */
+ mfsr $r0, $MSC_CFG /* Check if support EIT. */
+ srli $r0, $r0, 24
+ andi $r0, $r0, 0x1
+ beqz $r0, .L_fp_gp_init
+ la $r0, $_ITB_BASE_ /* Init ITB. */
+ mtusr $r0, $ITB
+#endif
+
.L_fp_gp_init:
/* Initialization for $gp. The _SDA_BASE_ location
stands for Small Data Access. */