[PATCH] i386: Cleanup i386/i386elf.h and align it's return convention with the SVR4 ABI
Tue Aug 18 22:02:30 GMT 2020
As observed a number of years ago in the following thread, i386/i386elf.h has not been kept up to date:
This patch does the following cleanup:
1. The return convention now follows the i386 and x86_64 SVR4 ABIs again. As discussed in the above thread, the current return convention does not match any other target or existing ABI, which is problematic since the current approach is inefficient (particularly on x86_64-elf) and confuses other tools like GDB (unfortunately that thread did not lead to any fix at the time).
2. The default version of ASM_OUTPUT_ASCII from elfos.h is used. As mentioned in the cleanup of i386/sysv4.h  the ASM_OUTPUT_ASCII implementation then used by sysv4.h, and currently used by i386elf.h, has a significantly higher computation complexity than the default version provided by elfos.h.
The patch has been tested on i386-elf and x86_64-elf hosted on x86_64-linux, fixing a number failing tests that were expecting the SVR4 ABI return convention. It has also been bootstrapped and tested on x86_64-pc-linux-gnu without regression.
If approved, I'll need a maintainer to kindly commit on my behalf.
Senior Software Engineer, AdaCore
2020-08-18 Pat Bernardi <email@example.com>
* config/i386/i386elf.h (SUBTARGET_RETURN_IN_MEMORY): Remove.
* config/i386/i386.c (ix86_return_in_memory): Remove
-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
More information about the Gcc-patches