aboutsummaryrefslogtreecommitdiff
path: root/gcc/common
diff options
context:
space:
mode:
authorPaul Koning <ni1d@arrl.net>2018-06-27 17:58:24 -0400
committerPaul Koning <pkoning@gcc.gnu.org>2018-06-27 17:58:24 -0400
commitb4324a144b4499725143baf1f69722f92814572e (patch)
treeed5e61eed2d97171a207721de22310cec011d782 /gcc/common
parent356d53635faecee4b8abfc6b21208432c72eebff (diff)
downloadgcc-b4324a144b4499725143baf1f69722f92814572e.zip
gcc-b4324a144b4499725143baf1f69722f92814572e.tar.gz
gcc-b4324a144b4499725143baf1f69722f92814572e.tar.bz2
Convert pdp11 back end to CCmode.
* common/config/pdp11/pdp11-common.c (pdp11_handle_option): Handle mutually exclusive options. * config/pdp11/constraints.md (h): New constraint. (O): Update definition to match shift code generation. (D): New constraint. * config/pdp11/pdp11-modes.def (CCNZ): Define mode. (CCFP): Remove. * config/pdp11/pdp11-protos.h (int_no_side_effect_operand): New function. (output_jump): Change arguments. (pdp11_fixed_cc_regs): New function. (pdp11_cc_mode): Ditto. (pdp11_expand_shift): Ditto. (pdp11_assemble_shift): Ditto. (pdp11_small_shift): Ditto. (pdp11_branch_cost): Remove. * config/pdp11/pdp11.c (pdp11_assemble_integer): Remove comments from output. (pdp11_register_move_cost): Update for CC registers. (pdp11_rtx_costs): Add case for LSHIFTRT. (pdp11_output_jump): Add CCNZ mode conditional branches. (notice_update_cc_on_set): Remove. (pdp11_cc_mode): New function. (simple_memory_operand): Correct pre/post decrement case. (no_side_effect_operand): New function. (pdp11_regno_reg_class): Add CC_REGS class. (pdp11_fixed_cc_regs): New function. (pdp11_small_shift): New function. (pdp11_expand_shift): New function to expand shift insns. (pdp11_assemble_shift): New function to output shifts. (pdp11_branch_cost): Remove. (pdp11_modes_tieable_p): Make QI/HI modes tieable. * config/pdp11/pdp11.h (SIZE_TYPE): Ensure 16-bit type. (WCHAR_TYPE): Ditto. (PTRDIFF_TYPE): Ditto. (ADJUST_INSN_LENGTH): New macro. (FIXED_REGISTERS): Add CC registers. (CALL_USED_REGISTERS): Ditto. (reg_class): Ditto. (REG_CLASS_NAMES): Ditto. (REG_CLASS_CONTENTS): Ditto. (SELECT_CC_MODE): Use new function. (TARGET_FLAGS_REGNUM): New macro. (TARGET_FIXED_CONDITION_CODE_REGS): Ditto. (cc0_reg_rtx): Remove. (CC_STATUS_MDEP): Remove. (CC_STATUS_MDEFP_INIT): Remove. (CC_IN_FPU): Remove. (NOTICE_UPDATE_CC): Remove. (REGISTER_NAMES): Add CC registers. (BRANCH_COST): Change to constant 1. * config/pdp11/pdp11.md: Rewrite for CCmode condition code handling. * config/pdp11/pdp11.opt (mbcopy): Remove. (mbcopy-builtin): Remove. (mbranch-cheap): Remove. (mbranch-expensive): Remove. * config/pdp11/predicates.md (expand_shift_operand): Update to match shift code generation. (ccnz_operator): New predicate. * doc/invoke.texi (PDP-11 Options): Remove deleted options -mbcopy, -mbcopy-builtin, -mbranch-cheap, -mbranch-expensive. Remove non-existent option -mabshi, -mno-abshi. Document mutually exclusive options. * doc/md.texi (PDP-11): Document new D and h constraints. Update description of O constraint. From-SVN: r262198
Diffstat (limited to 'gcc/common')
-rw-r--r--gcc/common/config/pdp11/pdp11-common.c20
1 files changed, 19 insertions, 1 deletions
diff --git a/gcc/common/config/pdp11/pdp11-common.c b/gcc/common/config/pdp11/pdp11-common.c
index aa809a9..9feb4fd 100644
--- a/gcc/common/config/pdp11/pdp11-common.c
+++ b/gcc/common/config/pdp11/pdp11-common.c
@@ -39,9 +39,27 @@ pdp11_handle_option (struct gcc_options *opts,
switch (code)
{
case OPT_m10:
- opts->x_target_flags &= ~(MASK_40 | MASK_45);
+ opts->x_target_flags &= ~(MASK_40 | MASK_45 | MASK_FPU | MASK_AC0 | MASK_SPLIT);
return true;
+ case OPT_m40:
+ opts->x_target_flags &= ~(MASK_45 | MASK_FPU | MASK_AC0 | MASK_SPLIT);
+ return true;
+
+ case OPT_mfpu:
+ opts->x_target_flags &= ~MASK_40;
+ opts->x_target_flags |= MASK_45;
+ return true;
+
+ case OPT_msoft_float:
+ opts->x_target_flags &= ~MASK_AC0;
+ return true;
+
+ case OPT_msplit:
+ opts->x_target_flags &= ~MASK_40;
+ opts->x_target_flags |= MASK_45;
+ return true;
+
default:
return true;
}