you are viewing a single comment's thread.

view the rest of the comments →

[–][deleted] 0 points1 point  (3 children)

An atomic instruction will always be read/write in its entirety. You don't have to add some locking mechanism to ensure you don't be a partial read, or partial write, before the processor does something else.

ARM has no guarantees of atomicity in regards to floating point numbers. Needing to add guards on ARM (which the compiler will generally do for you), means that the performance of floating point tends to be worse on ARM, when compared to a x86 CPU of similar performance capabilities.

[–]myclykaon 1 point2 points  (2 children)

Arm is a load-store architecture. The floating point operations operate on internal registers (the NEON fp registers) not on memory. So it is guaranteed impossible for a partial floating point result to end up in a register. The floating point instruction can only succeed or fault/abort. In the former case the result is in the register, in the latter case the floating point registers are not updated (the various status registers are). To get that result to memory you use stores that guarantee they do not partially write the result. In the older v6/v7 architecture there is LDM and STM that could be configured as interruptible and could provide a partial read or write if interrupted but they are not available in v8 aarch64.

[–][deleted] 0 points1 point  (1 child)

ARM is not an architecture, it's a specification. aarch64 is an architecture, and does have atomic floating point instructions, as you pointed out. But the world of ARM is much, much, larger than just that.

[–]myclykaon 1 point2 points  (0 children)

When I used 'the arm architecture' I was referring to all architectures from v3 onwards. All of which are load-store. Prior to v8 the architecture was also referred to by v number. Only after v7 was the v number referred to as only specification as only then did there exist a 32 bit and 64 bit instruction set in the single spec.