Just do the check in the corresponding implementation of arch_perform_memory_operand().
Attach a file by drag & drop or click to upload