This patch is in a series of patches to provide builtins for compatibility with the XL compiler. 
This patch adds the builtin and intrinsic for  "__stbcx".
Details
- Reviewers
- nemanjai 
- Group Reviewers
- Restricted Project 
- Commits
- rG26ea4a443243: [PowerPC] Add PowerPC "__stbcx" builtin and intrinsic for XL compatibility
Diff Detail
- Repository
- rG LLVM Github Monorepo
Event Timeline
| clang/include/clang/Basic/BuiltinsPPC.def | ||
|---|---|---|
| 116 | maybe move this up to where __builtin_ppc_stdcx is defined. To match what you did in PPC.cpp | |
| clang/test/CodeGen/builtins-ppc-xlcompat-pwr8.c | ||
| 31 | Why not just add this tc to clang/test/CodeGen/builtins-ppc-xlcompat-LoadReseve-StoreCond.c? | |
| clang/test/CodeGen/builtins-ppc-xlcompat-pwr8.c | ||
|---|---|---|
| 31 | __stbcx is only valid with pwr8 (or later cpu) | |
LGTM aside from a small nit.
| clang/lib/Basic/Targets/PPC.cpp | ||
|---|---|---|
| 121 | Nit: move just under sthcx so the order makes sense: doubleword, word, haflword, byte. | |
| clang/lib/Sema/SemaChecking.cpp | ||
|---|---|---|
| 3432 | would prefer if this joined the list of sthcx, lharx and lbarx right below this case | |
maybe move this up to where __builtin_ppc_stdcx is defined. To match what you did in PPC.cpp