Commit e0e93a4
Add options for enable code gen with CFI
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.-fcf-protection=[full|branch|return|none] and -mcf-label-scheme=[unlabeled|func-sig]
1 parent 0d42de6 commit e0e93a4
1 file changed
+23
-0
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
389 | 389 | | |
390 | 390 | | |
391 | 391 | | |
| 392 | + | |
| 393 | + | |
| 394 | + | |
| 395 | + | |
| 396 | + | |
| 397 | + | |
| 398 | + | |
| 399 | + | |
| 400 | + | |
| 401 | + | |
| 402 | + | |
| 403 | + | |
| 404 | + | |
| 405 | + | |
| 406 | + | |
| 407 | + | |
| 408 | + | |
| 409 | + | |
| 410 | + | |
| 411 | + | |
| 412 | + | |
| 413 | + | |
| 414 | + | |
392 | 415 | | |
393 | 416 | | |
394 | 417 | | |
| |||
0 commit comments