Diff Detail
- Repository
- rG LLVM Github Monorepo
Event Timeline
Can you add some test cases?
How is this new intrinsic will be used? For now there is no user for it and it will only be used in LLVM IR?
@shchenz I have added the test cases.
This intrinsic is defined in order to test the stackprotect functionality on xlf. Use the -qdebug=smashstack flag to use it, make sure that -qstackprotect=all is also set
llvm/lib/Target/PowerPC/PPCISelLowering.cpp | ||
---|---|---|
11112 | Why should return -1? | |
11120 | nit: the first letter should be upper for deadBird according to LLVM coding style. And how can we make sure 0x4C6C566D is not the same with the canary word load with TargetOpcode::LOAD_STACK_GUARD? | |
11122 | Need to run clang-format for the new codes. | |
11136 | nit: no need for the break after a return | |
llvm/test/CodeGen/PowerPC/kill-canary-intrinsic.ll | ||
3 ↗ | (On Diff #438988) | We may also need to add test cases for AIX 32/64 bit too as stack protector is also supported on AIX. |
13 ↗ | (On Diff #438988) | This seems wrong. When there is no stack protector related instructions in the function, we should not generate the killed store to the stack slot for canary word. The store instruction now will store a word to the caller unexpectedly. |
llvm/lib/Target/PowerPC/PPCISelLowering.cpp | ||
---|---|---|
11112 | The source code for getStackProtectorIndex just returns StackProtectorIndex which is initialized to -1, it makes sense as the stack protector byte should be right before the stack frame begins | |
11120 | What would you suggest for this? I'm not sure exactly how the canary word is created, is it worth loading the canary word first, manipulating it to make sure that we store something different? |
clang-format not found in user’s local PATH; not linting file.