summaryrefslogtreecommitdiff
path: root/libstdc++
diff options
context:
space:
mode:
authorlaw <law@138bc75d-0d04-0410-961f-82ee72b054a4>1999-06-01 23:27:14 +0000
committerlaw <law@138bc75d-0d04-0410-961f-82ee72b054a4>1999-06-01 23:27:14 +0000
commit73f1b9e412c91ad733731fb4fa711773f150a545 (patch)
tree58e12397b2d3309d22f0c555ef5b6aac20d80998 /libstdc++
parentb02afc43f271f8429744d528a83f49729ad95316 (diff)
downloadgcc-73f1b9e412c91ad733731fb4fa711773f150a545.tar.gz
Wed Jun 2 00:21:54 1999 Robert Lipe <robertlipe@usa.net>
* std/bastring.h (class basic_string:Rep): Encode xlock opcode as .bytes instead of mnemonics. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@27295 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'libstdc++')
-rw-r--r--libstdc++/ChangeLog5
-rw-r--r--libstdc++/std/bastring.h11
2 files changed, 14 insertions, 2 deletions
diff --git a/libstdc++/ChangeLog b/libstdc++/ChangeLog
index 8dd6c35bfd4..b3d8a322472 100644
--- a/libstdc++/ChangeLog
+++ b/libstdc++/ChangeLog
@@ -1,3 +1,8 @@
+Wed Jun 2 00:21:54 1999 Robert Lipe <robertlipe@usa.net>
+
+ * std/bastring.h (class basic_string:Rep): Encode xlock opcode
+ as .bytes instead of mnemonics.
+
1999-05-20 Angela Marie Thomas <angela@cygnus.com>
* configure.in: Test for ${compiler_name}.exe as well.
diff --git a/libstdc++/std/bastring.h b/libstdc++/std/bastring.h
index 6206713b6c9..70891262e96 100644
--- a/libstdc++/std/bastring.h
+++ b/libstdc++/std/bastring.h
@@ -77,8 +77,15 @@ private:
void release ()
{
size_t __val;
- asm ("lock; xaddl %0, %2"
- : "=r" (__val) : "0" (-1), "m" (ref) : "memory");
+ // This opcode exists as a .byte instead of as a mnemonic for the
+ // benefit of SCO OpenServer 5. The system assembler (which is
+ // essentially required on this target) can't assemble xaddl in
+ //COFF mode.
+ asm (".byte 0xf0, 0x0f, 0xc1, 0x02" // lock; xaddl %eax, (%edx)
+ : "=a" (__val)
+ : "0" (-1), "m" (ref), "d" (&ref)
+ : "memory");
+
if (__val == 1)
delete this;
}