Re: Using extra outputs of an instruction

"Bo Persson" <bop2@telia.com>
24 Mar 2002 00:17:24 -0500

          From comp.compilers

Related articles
Using extra outputs of an instruction dobes@dobesland.com (Dobes Vandermeer) (2002-03-09)
Re: Using extra outputs of an instruction vbdis@aol.com (2002-03-11)
Re: Using extra outputs of an instruction anton@mips.complang.tuwien.ac.at (2002-03-17)
Re: Using extra outputs of an instruction meissner@redhat.com (Michael Meissner) (2002-03-21)
Re: Using extra outputs of an instruction chase@world.std.com (David Chase) (2002-03-22)
Re: Using extra outputs of an instruction bop2@telia.com (Bo Persson) (2002-03-24)
| List of all articles for this month |

From: "Bo Persson" <bop2@telia.com>
Newsgroups: comp.compilers
Date: 24 Mar 2002 00:17:24 -0500
Organization: Telia Internet
References: 02-03-017 02-03-133 02-03-152
Keywords: architecture
Posted-Date: 24 Mar 2002 00:17:24 EST

"David Chase" <chase@world.std.com> skrev i meddelandet


>> [The XCHG instruction only locks the bus if it has a LOCK prefix,
>> but it's slow anyway. -John]


> Careful -- some architectures, the exchange-with-memory operation (not
> sure how it is spelled, since it is an assembler mnemnonic anyway)
> does implicitly lock the bus. Pentium is one example of this.
> CMPXCHG (Pentium-speak for Compare-and-swap) does not, and does
> require a prefix.
>


It's even worse than that!


Pre-Pentium implementations of the same architecture indeed required a
LOCK prefix to lock the bus. Intel "fixed" that with an automatic lock
for XCHG and then had to invent a new instruction for those who really
didn't want the lock.


Nice and smooth. :-)




Bo Persson
bop2@telia.com


Post a followup to this message

Return to the comp.compilers page.
Search the comp.compilers archives again.