Path: ...!eternal-september.org!feeder2.eternal-september.org!news.eternal-september.org!.POSTED!not-for-mail From: kegs@provalid.com (Kent Dickey) Newsgroups: comp.arch Subject: Re: Arm ldaxr / stxr loop question Date: Thu, 14 Nov 2024 06:24:32 -0000 (UTC) Organization: provalid.com Lines: 74 Message-ID: References: Injection-Date: Thu, 14 Nov 2024 07:24:33 +0100 (CET) Injection-Info: dont-email.me; posting-host="4835a147c44d4176e2ea234e926bb154"; logging-data="2829157"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX18ZqJfluLpdo5bOchMGYFVg" Cancel-Lock: sha1:Ws7JqrIf+vMBW1Qb5ArR6WdaWD0= X-Newsreader: trn 4.0-test76 (Apr 2, 2001) Originator: kegs@provalid.com (Kent Dickey) Bytes: 4009 In article , Scott Lurndal wrote: >Do read B2.3 Definition of the Arm memory model. It's only 32 pages, >and very clearly defines the memory model. Your definition of "clearly" differs from mine. Look at Pick dependencies on page B2-239 and B2-240: (I'm replacing complicating details with "blah blah" or "A, B, C", to highlight the issue I want to point out) --- Pick Basic dependency: There is A, B, C, or a Pick dependency between E1 and E2 Pick Data dependency: There is a Pick Basic dependency from E1 to E2 and blah blah. Pick Address dependency: There is a Pick Data dependency from E1 to E3 and E2 is blah blah Pick Control dependency: This is a Pick Basic dependency from E1 to E3 and E2 is blah blah Pick Dependency: There is a Pick Basic, Pick Address, Pick Data, or Pick Control dependency from E1 to E2 --- This is completely circular, and never defines what "pick" is. Even better, let's look at the actual words for Pick Basic Dependency: --- Pick Basic Dependency: There is a Pick Basic dependency from an effect E1 to an effect E2 if one of the following applies: 1) One of the following applies: a) E1 is an Explicit Memory Read effect b) E1 is a Register Read effect 2) One of the following applies: a) There is a Pick dependency through registers and memory from E1 to E2 b) E1 and E2 are the same effect --- Using the words as they are written, if any of 1a, 1b, 2a, or 2a is true, a Pick Basic dependency exists between E1 and E2. To give background, E1 and E2 are any events (effects) and not necessarily in program order (E2 could be before E1, and can be on another CPU, the event numbering system is not defined to indicate program order and when they want to say E1 is in program order before E2 it seems to always explicitly say so, and there are LOTS of other places where they create a third event, E3, which may be between E1 and E2). I'm using event interchangeably with effect since I think effect is a terrible term. So by rule 1a by itself, a Pick Basic Dependency exists between a Load instruction (an example of an Explicit Memory Read, I'm assuming, as best as I can tell, an Explicit Memory Read is not really defined) and every other possible event in that system happening before or after that load. So what does this mean? I literally have no idea what they are trying to get at here. If E1 and E2 are the "same effect", does that mean it's the same instruction/operation, or just the same type of operation (like two loads), or what? If there was an "overview" summarizing ordering in English, then it I could interpret the looseness better. I want to make it clear that I don't want a formal grammar, I just think this is a particularly poor way to try to present this information. What it reads like to me like a bad one of those logic puzzles but with info missing: The cookie was eaten by someone wearing a red coat. Susan wears a hat. Who ate the cookie? Kent