aarch64: Add report_error helper to aarch64-gen
Adds a helper function to standardize error reporting in AArch64 opcode generation.
This patch introduces a report_error helper function to opcodes/aarch64-gen.c. This function centralizes and standardizes the reporting of errors during opcode table validation. By moving repetitive error-formatting logic into this helper, the validate_table function becomes more readable and less prone to duplication. The core validation logic remains the same, but error messages will be consistently formatted.
In Details
Introduces a report_error function in opcodes/aarch64-gen.c to streamline error reporting from the validate_table function. Previously, error messages were formatted inline, leading to repetition. This new function consolidates the formatting logic, ensuring consistent output for errors detected during opcode table verification. It also centralizes the incrementing of an error counter.