Article View: comp.arch
Article #284Re: Performance of xchg reg,reg
From: Anton Ertl
Date: Thu, 22 Oct 2026 10:54
Date: Thu, 22 Oct 2026 10:54
18 lines
2281 bytes
2281 bytes
Stefan Monnier <monnier@iro.umontreal.ca> writes: >Anton Ertl [2026-10-18 16:57:26] wrote: >> And actually all the stuff about XCHG with memory operands does not >> contradict this sentence. It could be understood as meaning that >> while all the other aspects of locking don't apply to "XCHG reg, reg", >> the assertion of the LOCK# signal still has to occur, and that's why >> Intel processors implement a slow XCHG reg, reg. > >How could code witness the difference? Depends on the hardware. If there is some device connected t the LOCK# signal (e.g., another CPU), and that behaves differently when the signal is asserted, the code can measure that. - anton -- 'Anyone trying for "industrial quality" ISA should avoid undefined behavior.' Mitch Alsup, <c17fcd89-f024-40e7-a594-88a85ac10d20o@googlegroups.com>
Technical Details
Message-ID:
<2026Oct22.125404@mips.complang.tuwien.ac.at>Path:
mbox-mo1.pugleaf.net!archive.usenet.blueworldhosting.com!usenet.blueworldhosting.com!diablo1.usenet.blueworldhosting.com!eternal-september.org!feeder.eternal-september.org!nntp.eternal-september.org!.POSTED!not-for-mailReferences:
<2026Oct13.104347@mips.complang.tuwien.ac.at> <11au1vu$3ks5m$2@dont-email.me> <11aunpn$8c6$1@reader2.panix.com> <1792257076-5857@newsgrouper.org> <11b0bd3$b5b$1@reader2.panix.com> <1792265982-5857@newsgrouper.org> <2026Oct18.170823@mips.complang.tuwien.ac.at> <20261018184318.00000bee@yahoo.com> <2026Oct18.185726@mips.complang.tuwien.ac.at> <jwv8q3uqrxf.fsf-monnier+comp.arch@gnu.org>Show Full Headers
Complete Article Headers
Path: mbox-mo1.pugleaf.net!archive.usenet.blueworldhosting.com!usenet.blueworldhosting.com!diablo1.usenet.blueworldhosting.com!eternal-september.org!feeder.eternal-september.org!nntp.eternal-september.org!.POSTED!not-for-mail From: anton@mips.complang.tuwien.ac.at (Anton Ertl) Newsgroups: comp.arch Subject: Re: Performance of xchg reg,reg Date: Thu, 22 Oct 2026 10:54:04 GMT Organization: Institut fuer Computersprachen, Technische Universitaet Wien Lines: 18 Message-ID: <2026Oct22.125404@mips.complang.tuwien.ac.at> References: <2026Oct13.104347@mips.complang.tuwien.ac.at> <11au1vu$3ks5m$2@dont-email.me> <11aunpn$8c6$1@reader2.panix.com> <1792257076-5857@newsgrouper.org> <11b0bd3$b5b$1@reader2.panix.com> <1792265982-5857@newsgrouper.org> <2026Oct18.170823@mips.complang.tuwien.ac.at> <20261018184318.00000bee@yahoo.com> <2026Oct18.185726@mips.complang.tuwien.ac.at> <jwv8q3uqrxf.fsf-monnier+comp.arch@gnu.org> Injection-Date: Thu, 22 Oct 2026 10:58:06 +0000 (UTC) Injection-Info: dont-email.me; logging-data="795334"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX1+NaQsk1aF4CZMUPhP7a3BC"; posting-host="149e461fbbae38ec7b7c6c8f4381520c" Cancel-Lock: sha1:Ht09gcSboIr0XoBxXA4km99UdXA= sha256:IIe0s/mXZoQ4/Nf/gAj07mrmaGwolmMA+j5seoeYvQo= sha1:yKfVMo6M7EdVaT+265h6Nqa/DAA= sha256:mLmxzqhN0ChvejvYIG7++n7fSJrKMwhZWxa+1k42AsY= X-newsreader: xrn 10.11