This is the mail archive of the mailing list for the GCC project.

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[PATCH, i386]: Introduce missing FP control register (fpcr) definition


x87 control register definition is missing from i386 target
description, and consequently, x86_fnstcw_1, x86_fldcw_1 are wrong as
they operate on x87 _control_ word register, not status word.

This patch introduces missing register definition and updates all
dependant definitions in all i386 target files. Patch is actually a
first step to resolve PR target/29347.

Patch was bootstrapped on i686-pc-linux-gnu, regression tested for
c,c++ and fortran.

2005-10-05 Uros Bizjak <>

	* config/i386/i386.h (FIRST_PSEUDO_REGISTER): Define to 54.
	(REG_ALLOC_ORDER): Add one element to allocate fpcr register.
	(FRAME_POINTER_REGNUM): Update register number to 21.
	(REG_CLASS_CONTENTS): Update contents for added fpcr register.
	(HI_REGISTER_NAMES): Add "fpcr" for fpcr register.

	* config/i386/i386.c (regclass_map): Add fpcr entry.
	(dbx_register_map, dbx64_register_map, svr4_dbx_register_map):
	Add fpcr entry.

	* config/i386/ (FPCR_REG): New constant.
	(x86_fnstcw_1, x86_fldcw_1): Use FPCR_REG instead of FPSR_REG.


Attachment: i386-fpcr.diff
Description: Binary data

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]