Richard Sandiford <richard.sandif...@arm.com> writes: > Indu Bhagat <indu.bha...@oracle.com> writes: >> MEMTAG sanitizer, which is based on the HWASAN sanitizer, will invoke >> the target-specific hooks to create a random tag, add tag to memory >> address, and finally tag and untag memory. >> >> Implement the target hooks to emit MTE instructions if MEMTAG sanitizer >> is in effect. Continue to use the default target hook if HWASAN is >> being used. Following target hooks are implemented: >> - TARGET_MEMTAG_INSERT_RANDOM_TAG >> - TARGET_MEMTAG_ADD_TAG >> - TARGET_MEMTAG_TAG_MEMORY
Sorry for only thinking about it later, but: it might be worth looking at whether target-insns.def would be a better fit for these operations. For one thing, it would mean that we can use the usual .md machinery to enforce the kinds of operand that the target actually needs (via predicates). But it would also allow target-independent code to query whether the required operations are available, so perhaps saving another query hook. Thanks, Richard