Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add options for enable code gen with CFI `-fcf-protection=[full|branc…
…h|return|none]` and `-mcf-label-scheme=[unlabeled|func-sig]` Resue the options defined by X86 CET, `-fcf-protection=[full|branch|return|none]` `-fcf-protection=branch` for landing pad (`Zicfilp`), `-fcf-protection=return` for landing pad (`Zicfiss`) and `-fcf-protection=full` for enable both if possible, landing pad just require instrcution defined by base extension, so compiler will emit landing pad even without `Zicfilp` extension, but `-fcf-protection=return` will require at least `Zimop` since the instrcution isn't included in base extension. Also we defined another option for specify the labeling scheme: `unlabeled` and `func-sig`. The `unlabeled` scheme is always use `lpad 0`, and `func-sig` is based on the function signature, the rule is defined in psABI.
- Loading branch information