Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 12 Feb 2003 16:43:57 -0800 (PST)
From:      Juli Mallett <jmallett@FreeBSD.org>
To:        Perforce Change Reviews <perforce@freebsd.org>
Subject:   PERFORCE change 25068 for review
Message-ID:  <200302130043.h1D0hvow048616@repoman.freebsd.org>

next in thread | raw e-mail | index | archive | help
http://perforce.freebsd.org/chv.cgi?CH=25068

Change 25068 by jmallett@jmallett_dalek on 2003/02/12 16:43:14

	"Fool, fool, fool -- that's what I am."
	
	Here I thought I'd run into a gas bug, and I trusted the cc -S output
	was OK, and I thought everything was fine, and it was blowing up for
	a dumb reason.  So I dig into the gas code and I get it to talk back
	in interesting ways, and I find out why this code was failing to
	assemble:  I MADE A TYPO.  Ugh.  Forgot to parenthesise the register
	holding our pointer so I would end up with a memory address.  Instead
	I wound up with a register.  Damnit.
	
	Anyway, add the parens that are needed here.  Now we're back to failing
	over DDB stuff in kern_mutex.c.

Affected files ...

.. //depot/projects/mips/sys/mips/include/atomic.h#8 edit

Differences ...

==== //depot/projects/mips/sys/mips/include/atomic.h#8 (text+ko) ====

@@ -83,9 +83,9 @@
 									\
 	__asm __volatile (						\
 	"1:\n\t"							\
-	"ll	%[temp], %[p]\n\t"					\
+	"ll	%[temp], (%[p])\n\t"					\
 	asmop "\n\t"							\
-	"sc	%[temp], %[p]\n\t"					\
+	"sc	%[temp], (%[p])\n\t"					\
 	"beqz	%[temp], 1b\n\t"					\
 	: [val] "=r"(val)						\
 	: [temp] "r"(temp), [p] "r"(p)					\
@@ -117,10 +117,10 @@
 
 	__asm __volatile (
 	"1:\n\t"
-	"ll	%[temp], %[p]\n\t"
+	"ll	%[temp], (%[p])\n\t"
 	"move	%[res], %[temp]\n\t"
 	"move	%[temp], 0\n\t"
-	"sc	%[temp], %[p]\n\t"
+	"sc	%[temp], (%[p])\n\t"
 	"beqz	%[temp], 1b\n\t"
 	:
 	: [temp] "r"(temp), [p] "r"(p), [res] "r"(res)
@@ -142,9 +142,9 @@
 									\
 	__asm __volatile (						\
 	"1:\n\t"							\
-	"lld	%[temp], %[p]\n\t"					\
+	"lld	%[temp], (%[p])\n\t"					\
 	asmop "\n\t"							\
-	"scd	%[temp], %[p]\n\t"					\
+	"scd	%[temp], (%[p])\n\t"					\
 	"beqz	%[temp], 1b\n\t"					\
 	: [val] "=r"(val)						\
 	: [temp] "r"(temp), [p] "r"(p)					\
@@ -176,10 +176,10 @@
 
 	__asm __volatile (
 	"1:\n\t"
-	"lld	%[temp], %[p]\n\t"
+	"lld	%[temp], (%[p])\n\t"
 	"move	%[res], %[temp]\n\t"
 	"move	%[temp], 0\n\t"
-	"scd	%[temp], %[p]\n\t"
+	"scd	%[temp], (%[p])\n\t"
 	"beqz	%[temp], 1b\n\t"
 	:
 	: [temp] "r"(temp), [p] "r"(p), [res] "r"(res)

To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe p4-projects" in the body of the message




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200302130043.h1D0hvow048616>