On Wed, 2021-08-18 at 20:45 +0100, Iain Sandoe wrote:
> Hi,
> 
> This provides adjusted assembler fragments that are suitable
> for x86_64 Mach-O.
> 
> ** as an aside, I wonder if it would be possible to configure some
>    conditional on __ELF__, __MACH__, and CPU arch to pull in some
>    object-cpu.inc so that we can generalize this for all hosts.

I don't know how far I want to go down this route - the purpose of the
tests is to verify that the API works, analogously to inline asm in a C
source file, but the asm fragments are always going to be very target-
dependent, given that it's asm, and probably rather host-dependent.  I
took the easy way out by getting the tests working on x86_64-pc-linux-
gnu (host and target), and (ahem) hoping nothing else was too badly
broken.  Sorry about that.

If there's a simple way to clean it up that would be great.

Note that the functions in the testcase code are also included by the
Sphinx documentation as examples of API usage (see the asm.rst
references in comments) - though for some reason that doesn't seem to
be working in the built HTML docs on gcc.gnu.org.

> 
> this version tested on x86_64-darwin, x86_64-linux,
> OK for master?

The patch as-is looks OK to me.
Dave



Reply via email to