================
@@ -741,13 +743,41 @@ void SystemZAsmPrinter::emitInstruction(const
MachineInstr *MI) {
case SystemZ::EH_SjLj_Setup:
return;
+ case SystemZ::LOAD_STACK_GUARD:
+ llvm_unreachable(
+ "LOAD_STACK_GUARD should have been eliminated by the DAG Combiner.");
+
+ case SystemZ::MOVE_STACK_GUARD:
+ case SystemZ::COMPARE_STACK_GUARD:
+ llvm_unreachable("MOVE_STACK_GUARD and COMPARE_STACK_GUARD should have "
+ "been expanded by ExpandPostRAPseudo.");
+
+ case SystemZ::LARL:
+ case SystemZ::LGRL: {
+ auto &Op = MI->getOperand(1);
+ if (Op.isGlobal() && (Op.getGlobal()->getName() == "__stack_chk_guard"))
----------------
uweigand wrote:
I do not like this. We should not test against particular symbol names. (The
symbol name shouldn't be hard-coded in the first place.) [ Also, LARL and LGRL
are very common operations, so this may also be a bit of a compile-time hit. ]
If we have to emit the loc entry at asm-printer time (and that's likely true),
we should be using some *other* MI opcode here, and translate them to LARL /
LGRL here. [ Might be one or two opcodes. ]
https://github.com/llvm/llvm-project/pull/169317
_______________________________________________
cfe-commits mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits