Commit eb9c1bb6 by Richard Henderson Committed by Richard Henderson

i960.c (i960_br_predict_opcode): Remove.

        * i960.c (i960_br_predict_opcode): Remove.
        (i960_print_operand) [+]: Emit branch prediction hints.
        (i960_function_arg): Return early for VOIDmode.
        (i960_round_align): Return early for incomplete types.
        * i960.h (PRINT_OPERAND_PUNCT_VALID_P): New.
        * i960.md (all conditional branches): Add "%+".

From-SVN: r34342
parent f824e5c3
2000-06-01 Richard Henderson <rth@cygnus.com>
* i960.c (i960_br_predict_opcode): Remove.
(i960_print_operand) [+]: Emit branch prediction hints.
(i960_function_arg): Return early for VOIDmode.
(i960_round_align): Return early for incomplete types.
* i960.h (PRINT_OPERAND_PUNCT_VALID_P): New.
* i960.md (all conditional branches): Add "%+".
Thu Jun 1 12:24:21 2000 Richard Kenner <kenner@vlsi1.ultra.nyu.edu> Thu Jun 1 12:24:21 2000 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
* alias.c (get_alias_set): Don't call language-specific routine more * alias.c (get_alias_set): Don't call language-specific routine more
...@@ -22,7 +31,7 @@ Thu Jun 1 09:37:35 2000 Clinton Popetz <cpopetz@cygnus.com> ...@@ -22,7 +31,7 @@ Thu Jun 1 09:37:35 2000 Clinton Popetz <cpopetz@cygnus.com>
* Makefile.in (c-decl.o): Depend on $(EXPR_H), not expr.h. * Makefile.in (c-decl.o): Depend on $(EXPR_H), not expr.h.
* c-decl.c (init_decl_processing): Set lang_get_alias_set first thing. * c-decl.c (init_decl_processing): Set lang_get_alias_set first thing.
2000-05-31 Richard Henderson <rth@cygnus.com> 2000-05-31 Richard Henderson <rth@cygnus.com>
......
...@@ -1755,40 +1755,6 @@ i960_output_ret_insn (insn) ...@@ -1755,40 +1755,6 @@ i960_output_ret_insn (insn)
return "ret"; return "ret";
} }
#if 0
/* Return a character string representing the branch prediction
opcode to be tacked on an instruction. This must at least
return a null string. */
const char *
i960_br_predict_opcode (lab_ref, insn)
rtx lab_ref, insn;
{
if (TARGET_BRANCH_PREDICT)
{
unsigned long label_uid;
if (GET_CODE (lab_ref) == CODE_LABEL)
label_uid = INSN_UID (lab_ref);
else if (GET_CODE (lab_ref) == LABEL_REF)
label_uid = INSN_UID (XEXP (lab_ref, 0));
else
return ".f";
/* If not optimizing, then the insn_addresses array will not be
valid. In this case, always return ".t" since most branches
are taken. If optimizing, return .t for backward branches
and .f for forward branches. */
if (! optimize
|| insn_addresses[label_uid] < insn_addresses[INSN_UID (insn)])
return ".t";
return ".f";
}
return "";
}
#endif
/* Print the operand represented by rtx X formatted by code CODE. */ /* Print the operand represented by rtx X formatted by code CODE. */
void void
...@@ -1797,7 +1763,7 @@ i960_print_operand (file, x, code) ...@@ -1797,7 +1763,7 @@ i960_print_operand (file, x, code)
rtx x; rtx x;
int code; int code;
{ {
enum rtx_code rtxcode = GET_CODE (x); enum rtx_code rtxcode = x ? GET_CODE (x) : NIL;
if (rtxcode == REG) if (rtxcode == REG)
{ {
...@@ -1918,6 +1884,19 @@ i960_print_operand (file, x, code) ...@@ -1918,6 +1884,19 @@ i960_print_operand (file, x, code)
else abort (); else abort ();
break; break;
case '+':
/* For conditional branches, substitute ".t" or ".f". */
if (TARGET_BRANCH_PREDICT)
{
x = find_reg_note (current_output_insn, REG_BR_PROB, 0);
if (x)
{
int pred_val = INTVAL (XEXP (x, 0));
fputs ((pred_val < REG_BR_PROB_BASE / 2 ? ".f" : ".t"), file);
}
}
break;
case 0: case 0:
output_addr_const (file, x); output_addr_const (file, x);
break; break;
...@@ -2509,6 +2488,9 @@ i960_function_arg (cum, mode, type, named) ...@@ -2509,6 +2488,9 @@ i960_function_arg (cum, mode, type, named)
rtx ret; rtx ret;
int size, align; int size, align;
if (mode == VOIDmode)
return 0;
i960_arg_size_and_align (mode, type, &size, &align); i960_arg_size_and_align (mode, type, &size, &align);
if (size > 4 || cum->ca_nstackparms != 0 if (size > 4 || cum->ca_nstackparms != 0
...@@ -2601,7 +2583,7 @@ i960_round_align (align, tsize) ...@@ -2601,7 +2583,7 @@ i960_round_align (align, tsize)
{ {
int new_align; int new_align;
if (TREE_CODE (tsize) != INTEGER_CST) if (! tsize || TREE_CODE (tsize) != INTEGER_CST)
return align; return align;
new_align = i960_object_bytes_bitalign (TREE_INT_CST_LOW (tsize) new_align = i960_object_bytes_bitalign (TREE_INT_CST_LOW (tsize)
......
...@@ -1564,6 +1564,13 @@ extern struct rtx_def *i960_compare_op0, *i960_compare_op1; ...@@ -1564,6 +1564,13 @@ extern struct rtx_def *i960_compare_op0, *i960_compare_op1;
#define PRINT_OPERAND_ADDRESS(FILE, ADDR) \ #define PRINT_OPERAND_ADDRESS(FILE, ADDR) \
i960_print_operand_addr (FILE, ADDR) i960_print_operand_addr (FILE, ADDR)
/* Determine which codes are valid without a following integer. These must
not be alphabetic (the characters are chosen so that
PRINT_OPERAND_PUNCT_VALID_P translates into a simple range change when
using ASCII). */
#define PRINT_OPERAND_PUNCT_VALID_P(CODE) ((CODE) == '+')
/* Output assembler code for a block containing the constant parts /* Output assembler code for a block containing the constant parts
of a trampoline, leaving space for the variable parts. */ of a trampoline, leaving space for the variable parts. */
......
...@@ -171,7 +171,7 @@ ...@@ -171,7 +171,7 @@
(label_ref (match_operand 3 "" "")) (label_ref (match_operand 3 "" ""))
(pc)))] (pc)))]
"" ""
"bbs %2,%1,%l3" "bbs%+ %2,%1,%l3"
[(set_attr "type" "branch")]) [(set_attr "type" "branch")])
(define_insn "" (define_insn ""
...@@ -184,7 +184,7 @@ ...@@ -184,7 +184,7 @@
(label_ref (match_operand 3 "" "")) (label_ref (match_operand 3 "" ""))
(pc)))] (pc)))]
"" ""
"bbc %2,%1,%l3" "bbc%+ %2,%1,%l3"
[(set_attr "type" "branch")]) [(set_attr "type" "branch")])
(define_insn "" (define_insn ""
...@@ -197,7 +197,7 @@ ...@@ -197,7 +197,7 @@
(label_ref (match_operand 3 "" "")) (label_ref (match_operand 3 "" ""))
(pc)))] (pc)))]
"" ""
"bbs %2,%1,%l3" "bbs%+ %2,%1,%l3"
[(set_attr "type" "branch")]) [(set_attr "type" "branch")])
(define_insn "" (define_insn ""
...@@ -210,7 +210,7 @@ ...@@ -210,7 +210,7 @@
(label_ref (match_operand 3 "" "")) (label_ref (match_operand 3 "" ""))
(pc)))] (pc)))]
"" ""
"bbc %2,%1,%l3" "bbc%+ %2,%1,%l3"
[(set_attr "type" "branch")]) [(set_attr "type" "branch")])
;; ??? These will never match. The LOG_LINKs necessary to make these match ;; ??? These will never match. The LOG_LINKs necessary to make these match
...@@ -483,7 +483,7 @@ ...@@ -483,7 +483,7 @@
(label_ref (match_operand 1 "" "")) (label_ref (match_operand 1 "" ""))
(pc)))] (pc)))]
"" ""
"b%C0 %l1" "b%C0%+ %l1"
[(set_attr "type" "branch")]) [(set_attr "type" "branch")])
(define_insn "" (define_insn ""
...@@ -493,7 +493,7 @@ ...@@ -493,7 +493,7 @@
(pc) (pc)
(label_ref (match_operand 1 "" ""))))] (label_ref (match_operand 1 "" ""))))]
"" ""
"b%I0 %l1" "b%I0%+ %l1"
[(set_attr "type" "branch")]) [(set_attr "type" "branch")])
(define_insn "" (define_insn ""
...@@ -503,7 +503,7 @@ ...@@ -503,7 +503,7 @@
(label_ref (match_operand 1 "" "")) (label_ref (match_operand 1 "" ""))
(pc)))] (pc)))]
"" ""
"b%C0 %l1" "b%C0%+ %l1"
[(set_attr "type" "branch")]) [(set_attr "type" "branch")])
(define_insn "" (define_insn ""
...@@ -513,7 +513,7 @@ ...@@ -513,7 +513,7 @@
(pc) (pc)
(label_ref (match_operand 1 "" ""))))] (label_ref (match_operand 1 "" ""))))]
"" ""
"b%I0 %l1" "b%I0%+ %l1"
[(set_attr "type" "branch")]) [(set_attr "type" "branch")])
(define_insn "" (define_insn ""
...@@ -525,7 +525,7 @@ ...@@ -525,7 +525,7 @@
(label_ref (match_operand 3 "" "")) (label_ref (match_operand 3 "" ""))
(pc)))] (pc)))]
"" ""
"cmp%S0%B0%R0 %2,%1,%l3" "cmp%S0%B0%R0%+ %2,%1,%l3"
[(set_attr "type" "branch")]) [(set_attr "type" "branch")])
(define_insn "" (define_insn ""
...@@ -537,7 +537,7 @@ ...@@ -537,7 +537,7 @@
(pc) (pc)
(label_ref (match_operand 3 "" ""))))] (label_ref (match_operand 3 "" ""))))]
"" ""
"cmp%S0%B0%X0 %2,%1,%l3" "cmp%S0%B0%X0%+ %2,%1,%l3"
[(set_attr "type" "branch")]) [(set_attr "type" "branch")])
;; Now the trap instructions. The i960 appears to only have conditional ;; Now the trap instructions. The i960 appears to only have conditional
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment