Hi Uros,
I was looking into the test fails for the new keylocker-* testcases.
Many are because of missing “_” (which seems to happen more often than
not). These I can fix trivially.
But some are because we have:
name+constant(%rip) being emitted on Linux
and
constant+name(%rip) being emitted on Darwin.
——
The reason is that Darwin is always PIC and so outputs
(const:DI (plus:DI (symbol_ref:DI ("h2") [flags 0x2] <var_decl
0x7ffff55e3c60 h2>)
(const_int 16 [0x10])))
using - gcc/i386.c:output_pic_addr_const
Linux outputs the same thing
using - gcc/final.c:output_addr_const
====
for the PLUS case final.c says:
/* Some assemblers need integer constants to appear last (eg masm). */
for the PLUS case i386.c says:
/* Some assemblers need integer constants to appear first. */
=====
So .. I could make a really tedious patch to match the different forms in the
keylocker tests for Darwin ..
.. but ISTM that maybe one of those comments is wrong / out of date - and the
right thing would be to fix that.
Any insight welcome,
thanks
Iain