/* Implement TARGET_HANDLE_OPTION. */
static bool
-sh_handle_option (struct gcc_options *opts, struct gcc_options *opts_set,
+sh_handle_option (struct gcc_options *opts,
+ struct gcc_options *opts_set ATTRIBUTE_UNUSED,
const struct cl_decoded_option *decoded,
location_t loc ATTRIBUTE_UNUSED)
{
size_t code = decoded->opt_index;
- gcc_assert (opts == &global_options);
- gcc_assert (opts_set == &global_options_set);
-
switch (code)
{
case OPT_m1:
- target_flags = (target_flags & ~MASK_ARCH) | SELECT_SH1;
+ opts->x_target_flags = (opts->x_target_flags & ~MASK_ARCH) | SELECT_SH1;
return true;
case OPT_m2:
- target_flags = (target_flags & ~MASK_ARCH) | SELECT_SH2;
+ opts->x_target_flags = (opts->x_target_flags & ~MASK_ARCH) | SELECT_SH2;
return true;
case OPT_m2a:
- target_flags = (target_flags & ~MASK_ARCH) | SELECT_SH2A;
+ opts->x_target_flags = (opts->x_target_flags & ~MASK_ARCH) | SELECT_SH2A;
return true;
case OPT_m2a_nofpu:
- target_flags = (target_flags & ~MASK_ARCH) | SELECT_SH2A_NOFPU;
+ opts->x_target_flags
+ = (opts->x_target_flags & ~MASK_ARCH) | SELECT_SH2A_NOFPU;
return true;
case OPT_m2a_single:
- target_flags = (target_flags & ~MASK_ARCH) | SELECT_SH2A_SINGLE;
+ opts->x_target_flags
+ = (opts->x_target_flags & ~MASK_ARCH) | SELECT_SH2A_SINGLE;
return true;
case OPT_m2a_single_only:
- target_flags = (target_flags & ~MASK_ARCH) | SELECT_SH2A_SINGLE_ONLY;
+ opts->x_target_flags
+ = (opts->x_target_flags & ~MASK_ARCH) | SELECT_SH2A_SINGLE_ONLY;
return true;
case OPT_m2e:
- target_flags = (target_flags & ~MASK_ARCH) | SELECT_SH2E;
+ opts->x_target_flags = (opts->x_target_flags & ~MASK_ARCH) | SELECT_SH2E;
return true;
case OPT_m3:
- target_flags = (target_flags & ~MASK_ARCH) | SELECT_SH3;
+ opts->x_target_flags = (opts->x_target_flags & ~MASK_ARCH) | SELECT_SH3;
return true;
case OPT_m3e:
- target_flags = (target_flags & ~MASK_ARCH) | SELECT_SH3E;
+ opts->x_target_flags = (opts->x_target_flags & ~MASK_ARCH) | SELECT_SH3E;
return true;
case OPT_m4:
case OPT_m4_100:
case OPT_m4_200:
case OPT_m4_300:
- target_flags = (target_flags & ~MASK_ARCH) | SELECT_SH4;
+ opts->x_target_flags = (opts->x_target_flags & ~MASK_ARCH) | SELECT_SH4;
return true;
case OPT_m4_nofpu:
case OPT_m4_340:
case OPT_m4_400:
case OPT_m4_500:
- target_flags = (target_flags & ~MASK_ARCH) | SELECT_SH4_NOFPU;
+ opts->x_target_flags
+ = (opts->x_target_flags & ~MASK_ARCH) | SELECT_SH4_NOFPU;
return true;
case OPT_m4_single:
case OPT_m4_100_single:
case OPT_m4_200_single:
case OPT_m4_300_single:
- target_flags = (target_flags & ~MASK_ARCH) | SELECT_SH4_SINGLE;
+ opts->x_target_flags
+ = (opts->x_target_flags & ~MASK_ARCH) | SELECT_SH4_SINGLE;
return true;
case OPT_m4_single_only:
case OPT_m4_100_single_only:
case OPT_m4_200_single_only:
case OPT_m4_300_single_only:
- target_flags = (target_flags & ~MASK_ARCH) | SELECT_SH4_SINGLE_ONLY;
+ opts->x_target_flags
+ = (opts->x_target_flags & ~MASK_ARCH) | SELECT_SH4_SINGLE_ONLY;
return true;
case OPT_m4a:
- target_flags = (target_flags & ~MASK_ARCH) | SELECT_SH4A;
+ opts->x_target_flags = (opts->x_target_flags & ~MASK_ARCH) | SELECT_SH4A;
return true;
case OPT_m4a_nofpu:
case OPT_m4al:
- target_flags = (target_flags & ~MASK_ARCH) | SELECT_SH4A_NOFPU;
+ opts->x_target_flags
+ = (opts->x_target_flags & ~MASK_ARCH) | SELECT_SH4A_NOFPU;
return true;
case OPT_m4a_single:
- target_flags = (target_flags & ~MASK_ARCH) | SELECT_SH4A_SINGLE;
+ opts->x_target_flags
+ = (opts->x_target_flags & ~MASK_ARCH) | SELECT_SH4A_SINGLE;
return true;
case OPT_m4a_single_only:
- target_flags = (target_flags & ~MASK_ARCH) | SELECT_SH4A_SINGLE_ONLY;
+ opts->x_target_flags
+ = (opts->x_target_flags & ~MASK_ARCH) | SELECT_SH4A_SINGLE_ONLY;
return true;
case OPT_m5_32media:
- target_flags = (target_flags & ~MASK_ARCH) | SELECT_SH5_32MEDIA;
+ opts->x_target_flags
+ = (opts->x_target_flags & ~MASK_ARCH) | SELECT_SH5_32MEDIA;
return true;
case OPT_m5_32media_nofpu:
- target_flags = (target_flags & ~MASK_ARCH) | SELECT_SH5_32MEDIA_NOFPU;
+ opts->x_target_flags
+ = (opts->x_target_flags & ~MASK_ARCH) | SELECT_SH5_32MEDIA_NOFPU;
return true;
case OPT_m5_64media:
- target_flags = (target_flags & ~MASK_ARCH) | SELECT_SH5_64MEDIA;
+ opts->x_target_flags
+ = (opts->x_target_flags & ~MASK_ARCH) | SELECT_SH5_64MEDIA;
return true;
case OPT_m5_64media_nofpu:
- target_flags = (target_flags & ~MASK_ARCH) | SELECT_SH5_64MEDIA_NOFPU;
+ opts->x_target_flags
+ = (opts->x_target_flags & ~MASK_ARCH) | SELECT_SH5_64MEDIA_NOFPU;
return true;
case OPT_m5_compact:
- target_flags = (target_flags & ~MASK_ARCH) | SELECT_SH5_COMPACT;
+ opts->x_target_flags
+ = (opts->x_target_flags & ~MASK_ARCH) | SELECT_SH5_COMPACT;
return true;
case OPT_m5_compact_nofpu:
- target_flags = (target_flags & ~MASK_ARCH) | SELECT_SH5_COMPACT_NOFPU;
+ opts->x_target_flags
+ = (opts->x_target_flags & ~MASK_ARCH) | SELECT_SH5_COMPACT_NOFPU;
return true;
default: