rs6000: Emit ROP-mitigation instructions in prologue and epilogue
authorBill Schmidt <wschmidt@linux.ibm.com>
Fri, 14 May 2021 19:25:25 +0000 (14:25 -0500)
committerBill Schmidt <wschmidt@linux.ibm.com>
Sat, 15 May 2021 19:04:56 +0000 (14:04 -0500)
commitaf979a98bce444082cd5fc5d358dcdf3f65fdfce
tree9a7f0afa2db2779b53e327b625825988c16a7591
parent0df864ed1d24bbb0cf7504814e2f48e496ea5669
rs6000: Emit ROP-mitigation instructions in prologue and epilogue

2021-05-14  Bill Schmidt  <wschmidt@linux.ibm.com>

gcc/
* config/rs6000/rs6000-internal.h (rs6000_stack): Add
rop_hash_save_offset and rop_hash_size.
* config/rs6000/rs6000-logue.c (rs6000_stack_info): Compute
rop_hash_size and rop_hash_save_offset.
(debug_stack_info): Dump rop_hash_save_offset and rop_hash_size.
(rs6000_emit_prologue): Emit hashst[p] in prologue.
(rs6000_emit_epilogue): Emit hashchk[p] in epilogue.
* config/rs6000/rs6000.md (unspec): Add UNSPEC_HASHST and
UNSPEC_HASHCHK.
(hashst): New define_insn.
(hashchk): Likewise.
gcc/config/rs6000/rs6000-internal.h
gcc/config/rs6000/rs6000-logue.c
gcc/config/rs6000/rs6000.md