diff options
author | Hans-Peter Nilsson <hp@bitrange.com> | 2002-01-01 20:52:28 +0000 |
---|---|---|
committer | Hans-Peter Nilsson <hp@gcc.gnu.org> | 2002-01-01 20:52:28 +0000 |
commit | 91312b81c9e4740fc485dc941b77c7085bd9f1e8 (patch) | |
tree | 7c432fcf032fb7ef1cddcfdfa84a0ffc3577337c /gcc/config/mmix/mmix.c | |
parent | db993cf385183100b90295b614707c2c014c96bb (diff) | |
download | gcc-91312b81c9e4740fc485dc941b77c7085bd9f1e8.zip gcc-91312b81c9e4740fc485dc941b77c7085bd9f1e8.tar.gz gcc-91312b81c9e4740fc485dc941b77c7085bd9f1e8.tar.bz2 |
mmix.md: Update FIXME to not mention define_constants.
* config/mmix/mmix.md: Update FIXME to not mention
define_constants.
(MMIX_rJ_REGNUM): New define_constants constant.
("movqi", "movsi", "movdi", "*movdicc_real_foldable",
"*movdicc_real"): Adjust contraints formatting.
("*bCC_foldable"): Add %+ for P in output format and delete FIXME
for branch prediction.
("*bCC", "*bCC_inverted_foldable", "*bCC_inverted"): Add %+ in
output template.
("*call_real", "*call_value_real", "nonlocal_goto_receiver",
"*nonlocal_goto_receiver_expanded"): Use MMIX_rJ_REGNUM instead of
number. Delete related FIXMEs.
* config/mmix/mmix.h (MMIX_INCOMING_RETURN_ADDRESS_REGNUM): Change
from number to MMIX_rJ_REGNUM.
(TARGET_MASK_BRANCH_PREDICT): New.
(TARGET_DEFAULT): Change to TARGET_MASK_BRANCH_PREDICT.
(TARGET_SWITCHES): Update comment. Correct -mno-toplevel-symbols
value. Add -mbranch-predict and -mno-branch-predict.
(TARGET_VERSION): Drop date.
(ADDITIONAL_REGISTER_NAMES): Use MMIX_rJ_REGNUM, not number.
* config/mmix/mmix.c (mmix_encode_section_info): Correct condition
for finding out global symbols.
(mmix_asm_output_labelref): Revert condition for global symbol.
(mmix_print_operand): <case '+'>: Emit P for a likely branch.
(mmix_print_operand_punct_valid_p): A '+' is valid.
From-SVN: r48448
Diffstat (limited to 'gcc/config/mmix/mmix.c')
-rw-r--r-- | gcc/config/mmix/mmix.c | 28 |
1 files changed, 18 insertions, 10 deletions
diff --git a/gcc/config/mmix/mmix.c b/gcc/config/mmix/mmix.c index 5227270..e60a690 100644 --- a/gcc/config/mmix/mmix.c +++ b/gcc/config/mmix/mmix.c @@ -1683,10 +1683,8 @@ mmix_encode_section_info (decl) { /* Test for an external declaration, and do nothing if it is one. */ if ((TREE_CODE (decl) == VAR_DECL - && (DECL_EXTERNAL (decl) || TREE_PUBLIC (decl)) - && ! TREE_STATIC (decl)) - || (TREE_CODE (decl) == FUNCTION_DECL - && (DECL_EXTERNAL (decl) || TREE_PUBLIC (decl)))) + && (DECL_EXTERNAL (decl) || TREE_PUBLIC (decl))) + || (TREE_CODE (decl) == FUNCTION_DECL && TREE_PUBLIC (decl))) ; else if (DECL_P (decl)) { @@ -1697,8 +1695,8 @@ mmix_encode_section_info (decl) Note that this does not work for data that is declared extern and later defined as static. If there's code in between, that code will refer to the extern declaration. And vice versa. Until we - can get rid of mmixal, we have to assume that code is well-behaved - or come up with a contorted scheme to work around bad code. */ + can get rid of mmixal, we have to assume that code is + well-behaved. */ const char *str = XSTR (XEXP (DECL_RTL (decl), 0), 0); int len = strlen (str); @@ -2043,11 +2041,11 @@ mmix_asm_output_labelref (stream, name) FILE *stream; const char *name; { - int is_extern = 0; + int is_extern = 1; for (; (*name == '@' || *name == '*'); name++) if (*name == '@') - is_extern = 1; + is_extern = 0; asm_fprintf (stream, "%s%U%s", is_extern && TARGET_TOPLEVEL_SYMBOLS ? ":" : "", @@ -2112,6 +2110,16 @@ mmix_print_operand (stream, x, code) { /* Unrelated codes are in alphabetic order. */ + case '+': + /* For conditional branches, output "P" for a probable branch. */ + if (TARGET_BRANCH_PREDICT) + { + x = find_reg_note (current_output_insn, REG_BR_PROB, 0); + if (x && INTVAL (XEXP (x, 0)) > REG_BR_PROB_BASE / 2) + putc ('P', stream); + } + return; + case 'B': if (GET_CODE (x) != CONST_INT) fatal_insn ("MMIX Internal: Expected a CONST_INT, not this", x); @@ -2319,8 +2327,8 @@ int mmix_print_operand_punct_valid_p (code) int code ATTRIBUTE_UNUSED; { - /* None at the moment. */ - return 0; + /* A '+' is used for branch prediction, similar to other ports. */ + return code == '+'; } /* PRINT_OPERAND_ADDRESS. */ |