On 9 Dec 2011, at 17:50, Aldy Hernandez wrote:


scan-assembler can be target-dependent if that would (as I read the
above) help.

Well, whadayaknow...

In that case we can have an x86 variant for Darwin, and one for everything else x86.

in principle, it should be OK ...   with *-*-darwin*

the problem is that c and c++ are generating different code sequences.

c does this (m64):

  movq    _var@GOTPCREL(%rip), %rdx
  movl    (%rdx), %eax
  andb    $15, %al
  orl    $80, %eax
  movl    %eax, (%rdx)

c++ does this (m64):

__Z5setitv:
LFB0:
        movl    _var(%rip), %eax
        andb    $15, %al
        orl     $80, %eax
        movl    %eax, _var(%rip)
        ret

so .. m64 c++ is the same as 'other' cases (less the __USER_LABEL_PREFIX__)

there are 4 cases: {c,c++} {m32,m64} with 4 different asm outputs

if that is a 'reasonable' situation - then might need to include ilp64/ ip32 in the target spec ...

otherwise - if it indicates a bug - then .. we need to deal with that.

Iain


Reply via email to