int code[n2fpu_code_num];
};
-#define NIOS2_FPU_CONFIG_NUM 3
+#define NIOS2_FPU_CONFIG_NUM 4
static struct nios2_fpu_config custom_fpu_config[NIOS2_FPU_CONFIG_NUM];
static void
cfg->code[n2fpu_fsubs] = 254;
cfg->code[n2fpu_fdivs] = 255;
+ NEXT_FPU_CONFIG;
+ cfg->name = "fph2";
+ cfg->code[n2fpu_fabss] = 224;
+ cfg->code[n2fpu_fnegs] = 225;
+ cfg->code[n2fpu_fcmpnes] = 226;
+ cfg->code[n2fpu_fcmpeqs] = 227;
+ cfg->code[n2fpu_fcmpges] = 228;
+ cfg->code[n2fpu_fcmpgts] = 229;
+ cfg->code[n2fpu_fcmples] = 230;
+ cfg->code[n2fpu_fcmplts] = 231;
+ cfg->code[n2fpu_fmaxs] = 232;
+ cfg->code[n2fpu_fmins] = 233;
+ cfg->code[n2fpu_round] = 248;
+ cfg->code[n2fpu_fixsi] = 249;
+ cfg->code[n2fpu_floatis] = 250;
+ cfg->code[n2fpu_fsqrts] = 251;
+ cfg->code[n2fpu_fmuls] = 252;
+ cfg->code[n2fpu_fadds] = 253;
+ cfg->code[n2fpu_fsubs] = 254;
+ cfg->code[n2fpu_fdivs] = 255;
+
#undef NEXT_FPU_CONFIG
gcc_assert (i == NIOS2_FPU_CONFIG_NUM);
}
-mcustom-fdivs=255 @gol
-fsingle-precision-constant}
+@option{-mcustom-fpu-cfg=fph2} is equivalent to:
+@gccoptlist{-mcustom-fabss=224 @gol
+-mcustom-fnegs=225 @gol
+-mcustom-fcmpnes=226 @gol
+-mcustom-fcmpeqs=227 @gol
+-mcustom-fcmpges=228 @gol
+-mcustom-fcmpgts=229 @gol
+-mcustom-fcmples=230 @gol
+-mcustom-fcmplts=231 @gol
+-mcustom-fmaxs=232 @gol
+-mcustom-fmins=233 @gol
+-mcustom-round=248 @gol
+-mcustom-fixsi=249 @gol
+-mcustom-floatis=250 @gol
+-mcustom-fsqrts=251 @gol
+-mcustom-fmuls=252 @gol
+-mcustom-fadds=253 @gol
+-mcustom-fsubs=254 @gol
+-mcustom-fdivs=255 @gol}
+
Custom instruction assignments given by individual
@option{-mcustom-@var{insn}=} options override those given by
@option{-mcustom-fpu-cfg=}, regardless of the
function attribute (@pxref{Function Attributes})
or pragma (@pxref{Function Specific Option Pragmas}).
+The name @var{fph2} is an abbreviation for @emph{Nios II Floating Point
+Hardware 2 Component}. Please note that the custom instructions enabled by
+@option{-mcustom-fmins=233} and @option{-mcustom-fmaxs=234} are only generated
+if @option{-ffinite-math-only} is specified. The custom instruction enabled by
+@option{-mcustom-round=248} is only generated if @option{-fno-math-errno} is
+specified. In contrast to the other configurations,
+@option{-fsingle-precision-constant} is not set.
+
@end table
These additional @samp{-m} options are available for the Altera Nios II