Drea Pinski (pinskia) <[email protected]> requested changes to the code:


> +++ gcc/config/aarch64/aarch64-jit.cc
> @@ -0,0 +54,4 @@
> +  }
> +#endif
> +
> +  if (TARGET_AES)
There has to be a better way of doing this. Especially since the information 
you need is already in aarch64-option-extensions.def. So only one place needs 
to be updated when new option extensions are added.

Maybe something like:
```
#define AARCH64_OPT_EXTENSION(NAME, IDENT, REQUIRES, EXPLICIT_ON, EXPLICIT_OFF, 
FEATURE_STRING) \
if (TARGET_##IDENT) jit_add_target_info_space ("target_feature", 
FEATURE_STRING);
#include "aarch64-option-extensions.def"
```

Where jit_add_target_info_space does the space handling for some of the feature 
strings (like for TARGET_PAUTH).

> +++ gcc/config/aarch64/aarch64-jit.cc
> @@ -0,0 +54,4 @@
> +  }
> +#endif
> +
> +  if (TARGET_AES)
With regards to the mapping between GCC and Rust names we talked on IRC, where 
would you put them?
A copy in gccrs and the other in libgccjit?

> +++ gcc/config/aarch64/aarch64-jit.cc
> @@ -0,0 +54,4 @@
> +  }
> +#endif
> +
> +  if (TARGET_AES)
>With regards to the mapping between GCC and Rust names we talked on IRC, where 
>would you put them?

It should go into gccrs. Since that is gccrs specific code rather than generic 
libgccjit code.

> +++ gcc/config/aarch64/aarch64-jit.cc
> @@ -0,0 +54,4 @@
> +  }
> +#endif
> +
> +  if (TARGET_AES)
Ok, so you mean the mapping won't be in libgccjit, but will be in 
`rustc_codegen_gcc`?
I'm asking because it was done differently for x86.

> +++ gcc/config/aarch64/aarch64-jit.cc
> @@ -0,0 +54,4 @@
> +  }
> +#endif
> +
> +  if (TARGET_AES)
Well, maybe x86_64 maintainers are ok with matching the names up that way. That 
does not mean other target maintainers should allow designs that don't scale 
that well in libgccjit.

> +++ gcc/config/aarch64/aarch64-jit.cc
> @@ -0,0 +54,4 @@
> +  }
> +#endif
> +
> +  if (TARGET_AES)
I'm currently doing this change.
Is the file `aarch64-option-extensions.def` up-to-date?
I see the following:
```
AARCH64_OPT_EXTENSION("f32mm", F32MM, (SVE), (), (), "svef32mm")
```
but `TARGET_F32MM` doesn't seem to exist anymore.

> +++ gcc/config/aarch64/aarch64-jit.cc
> @@ -0,0 +54,4 @@
> +  }
> +#endif
> +
> +  if (TARGET_AES)
@antoyo wrote in 
https://forge.sourceware.org/gcc/gcc-TEST/pulls/108#issuecomment-3308:

> I'm currently doing this change. Is the file `aarch64-option-extensions.def` 
> up-to-date? I see the following:
> 
> ```text
> AARCH64_OPT_EXTENSION("f32mm", F32MM, (SVE), (), (), "svef32mm")
> ```
> 
> but `TARGET_F32MM` doesn't seem to exist anymore.

Because I messed up. `AARCH64_HAVE_ISA (IDENT)` is what you want rather than 
`TARGET_##IDENT`.


--
https://forge.sourceware.org/gcc/gcc-TEST/pulls/108#issuecomment-3089

Reply via email to