This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug target/11817] vargs produce 32 bit signed reference with -mcmodel=medium
- From: "hoffman at cray dot com" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 8 Aug 2003 00:07:16 -0000
- Subject: [Bug target/11817] vargs produce 32 bit signed reference with -mcmodel=medium
- References: <20030806010309.11817.hoffman@cray.com>
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
PLEASE REPLY TO gcc-bugzilla@gcc.gnu.org ONLY, *NOT* gcc-bugs@gcc.gnu.org.
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=11817
------- Additional Comments From hoffman at cray dot com 2003-08-08 00:07 -------
-mcmodel changes the way that all references requiring
relocation are coded, causing the assembler to produce
the correct code. 'medium' mode introduces an intermediate
64 bit register to store the address
the presence of varargs in a function on 64 bit causes a spill
of the mmx registers, conditional on another register being
nonzero (as defined in the x86_64 abi)
this spill is handled by ix86_setup_incoming_varags in
gcc/config/i386/i386.c
this calls a pseudo-instruction, see_prologue_save_insn
in gcc/config/i386/i386.md
the generation of the computed target at the end of the
jump doesn't follow the game generation rule as normal
references, and forces the compiler to issue the signed
32 bit reference, which screws up our link