[PATCH] D60033: [MSP430] Expand Atomic nodes
Vadzim Dambrouski via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Tue Apr 2 13:10:10 PDT 2019
pftbest added a comment.
But MSP430 has interrupts and they are similar to threads in some ways. For example if I need to increment some shared counter, I would like it to be done in a single instruction. That way if some interrupt triggers at the same time it would not corrupt the value, because a single instruction can not be split. I had to use inline assembly to make such kind of counter, because volatile doesn't optimize to a single instruction in debug builds, only in release.
My point is that just forcing mthread-model single may lead to bugs in peoples code if someone would actually use atomics to implement a counter for example.
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D60033/new/
https://reviews.llvm.org/D60033
More information about the llvm-commits
mailing list