Message ID | CAFULd4YKyQJHesPJRhKAg4+Hy-0AoLet9or5oGknxE=K+jsjzQ@mail.gmail.com |
---|---|
State | New |
Headers | show |
Hi Uros, > Currently gcc fails to compile following test from the testsuite [1]: > > FAIL: gcc.target/i386/pr53249.c (test for excess errors) > > We are trying to compile X32 specific test, but the special pattern > that was introduced to handle certain sun assembler limitation, is not > prepared to handle X32. > > The patch avoids this special pattern for X32 target. X32 is currently > supported only with gnu tools, and if/when sun tools will support X32 > target, they will certainly fix the limitation which allows TP loads > to AX register only. I'll give the patch a whirl in my regular bootstraps this weekend. The Sun ld limitation is fixed in recent versions (at least Solaris 11, perhaps also backported to S10) and I do have a patch to detect this and turn off TARGET_SUN_TLS appropriately. Unfortunately, there's still a corner case in 64-bit TLS-IE handling that isn't handled correctly, but I haven't yet found to time to fully investigate this. Thanks. Rainer
Index: i386.c =================================================================== --- i386.c (revision 187841) +++ i386.c (working copy) @@ -12811,13 +12811,13 @@ legitimize_tls_address (rtx x, enum tls_model mode case TLS_MODEL_INITIAL_EXEC: if (TARGET_64BIT) { - if (TARGET_SUN_TLS) + if (TARGET_SUN_TLS && !TARGET_X32) { /* The Sun linker took the AMD64 TLS spec literally and can only handle %rax as destination of the initial executable code sequence. */ - dest = gen_reg_rtx (Pmode); + dest = gen_reg_rtx (DImode); emit_insn (gen_tls_initial_exec_64_sun (dest, x)); return dest; }