Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/trunk]: src/sys/arch/mips/mips Don't always use ".set mips3" - that expl...



details:   https://anonhg.NetBSD.org/src/rev/d54a71f30e7f
branches:  trunk
changeset: 750647:d54a71f30e7f
user:      simonb <simonb%NetBSD.org@localhost>
date:      Sat Jan 09 11:49:16 2010 +0000

description:
Don't always use ".set mips3" - that explicitly uses 64-bit instructions
and we may be on a 32-bit CPU.  Instead use .set mips3/mips32/mips64
depending on current build arch.

Should fix boot problems on a Alchemy CPU reported by KIYOHARA Takashi
on port-mips.

A couple of niggles/concerns:
 * XXX Clean up with a macro?  Same code fragment is in mipsX_subr.S too.
 * XXX Key off build abi instead of processor type?

diffstat:

 sys/arch/mips/mips/lock_stubs.S |  18 +++++++++++++++++-
 1 files changed, 17 insertions(+), 1 deletions(-)

diffs (33 lines):

diff -r cdfd10159b55 -r d54a71f30e7f sys/arch/mips/mips/lock_stubs.S
--- a/sys/arch/mips/mips/lock_stubs.S   Sat Jan 09 11:18:32 2010 +0000
+++ b/sys/arch/mips/mips/lock_stubs.S   Sat Jan 09 11:49:16 2010 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: lock_stubs.S,v 1.10 2009/12/14 00:46:06 matt Exp $     */
+/*     $NetBSD: lock_stubs.S,v 1.11 2010/01/09 11:49:16 simonb Exp $   */
 
 /*-
  * Copyright (c) 2007 The NetBSD Foundation, Inc.
@@ -53,7 +53,23 @@
 
 #if MIPS_HAS_LLSC != 0
 
+/*
+ * Set ISA level for the assembler.
+ * XXX Clean up with a macro?  Same code fragment is in mipsX_subr.S too.
+ * XXX Key off build abi instead of processor type?
+ */
+#if defined(MIPS3)
        .set    mips3
+#endif
+
+#if defined(MIPS32)
+       .set    mips32
+#endif
+
+#if defined(MIPS64)
+       .set    mips64
+#endif
+
        .set    noreorder
        .set    noat
 



Home | Main Index | Thread Index | Old Index