Summary: | [4.9 regression] Casting to/from long double emits ambiguous fild/fisttp instruction | ||
---|---|---|---|
Product: | gcc | Reporter: | zan <zanpeeters> |
Component: | driver | Assignee: | Not yet assigned to anyone <unassigned> |
Status: | RESOLVED DUPLICATE | ||
Severity: | normal | CC: | jakub |
Priority: | P3 | ||
Version: | 4.9.2 | ||
Target Milestone: | 4.9.4 | ||
Host: | Target: | ||
Build: | Known to work: | 4.8.3 | |
Known to fail: | 4.9.2 | Last reconfirmed: | |
Attachments: | Minimal code example |
Description
zan
2015-01-08 14:27:14 UTC
Sounds like user error to me. This is nothing that changed in between 4.8 and 4.9, but depends on against which assembler you configure gcc. If you configure it against old assembler that doesn't accept filds/fists instructions, then it will emit fild, otherwise it emits filds. Similarly, if assembler doesn't accept fildq/fistpq instruction, it will emit fildll. This is checked during gcc configure. Thank you for the info. I tried recompiling gcc 4.9.2 and found in build/gcc/config.log: configure:24745: checking assembler for filds and fists mnemonics configure:24754: /opt/local/bin/as -o conftest.o conftest.s >&5 clang -cc1as: fatal error: error in backend: 32-bit absolute addressing is not supported in 64-bit mode configure:24757: $? = 1 configure: failed program was filds mem; fists mem configure:24768: result: no configure:24776: checking assembler for fildq and fistpq mnemonics configure:24785: /opt/local/bin/as -o conftest.o conftest.s >&5 clang -cc1as: fatal error: error in backend: 32-bit absolute addressing is not supported in 64-bit mode configure:24788: $? = 1 configure: failed program was fildq mem; fistpq mem configure:24799: result: no /opt/local/bin/as is a wrapper script that calls either clang integrated-as or regular as. If I run the regular as assembler on "filds mem; fists mem": tmp.s:1:32-bit absolute addressing is not supported for x86-64 tmp.s:1:cannot do signed 4 byte relocation tmp.s:1:32-bit absolute addressing is not supported for x86-64 tmp.s:1:cannot do signed 4 byte relocation So it's not about the choice of assembler. If I change mem to something like 0(%rax), both commands complete without error. I don't know enough about assembly to understand what's going on, but gcc build completes and the minimal example compiles without error (assembly uses filds). This seems to be a Mac OS X specific problem (https://stackoverflow.com/questions/26394359/mach-o-64-bit-format-does-not-support-32-bit-absolute-addresses-nasm). GCC 4.9.3 has been released. |