[Patch] aarch64 EXTDEBUG fixes and extensions
Original Reporter info from Mantis: CuriousKit @CuriousKit
-
Reporter name: J. Gareth Moreton
Original Reporter info from Mantis: CuriousKit @CuriousKit
- Reporter name: J. Gareth Moreton
Description:
This patch fixes an issue where Internal Error 2019090802 is raised when attempting to make the compiler under aarch64-linux with EXTDEBUG enabled.
It also adds an extra debug comment in "tcgaarch64.a_load_const_reg" that shows what the original constant was in the assembly dumps, since the multiple mov instructions don't always make it clear what the constant was.
Steps to reproduce:
Apply patch and build compiler with "make clean all OPT="-dEXTDEBUG" ALLOW_WARNINGS=1" to confirm successful compilation.
When EXTDEBUG is specified, warnings need to be allowed because of how strict the compiler is under these conditions when it comes to temps being freed and location types matching.
Additional information:
The internal error is in "taicpu.spilling_get_operation_type" and was raised when the compiler doesn't recognise an assembly opcode for register spilling purposes. Under normal rules, it assumes that the first operand is written to and other operands are read from, but under EXTDEBUG It raises an internal error instead.
There is a slight change under normal, non-debug conditions: STLXP, STLXR, STXP and STXR have been removed from the 'case' block (and added to the EXTDEBUG branch) and are now handled by the 'else' branch, because their operand rules coincide with the default handling. This should provide a minor performance boost and reduce code size slightly.
Mantis conversion info:
- Mantis ID: 38383
- OS: LInux (Raspberry Pi OS)
- OS Build: 5.4.51-v8+
- Build: r48315
- Platform: aarch64
- Version: 3.3.1
- Fixed in version: 3.3.1
- Fixed in revision: 48337 (#2519fb12)