+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>
* alias.c (get_alias_set): Don't call language-specific routine more
* 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>
return "ret";
}
\f
-#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. */
void
rtx x;
int code;
{
- enum rtx_code rtxcode = GET_CODE (x);
+ enum rtx_code rtxcode = x ? GET_CODE (x) : NIL;
if (rtxcode == REG)
{
else abort ();
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:
output_addr_const (file, x);
break;
rtx ret;
int size, align;
+ if (mode == VOIDmode)
+ return 0;
+
i960_arg_size_and_align (mode, type, &size, &align);
if (size > 4 || cum->ca_nstackparms != 0
{
int new_align;
- if (TREE_CODE (tsize) != INTEGER_CST)
+ if (! tsize || TREE_CODE (tsize) != INTEGER_CST)
return align;
new_align = i960_object_bytes_bitalign (TREE_INT_CST_LOW (tsize)
#define PRINT_OPERAND_ADDRESS(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) == '+')
\f
/* Output assembler code for a block containing the constant parts
of a trampoline, leaving space for the variable parts. */
(label_ref (match_operand 3 "" ""))
(pc)))]
""
- "bbs %2,%1,%l3"
+ "bbs%+ %2,%1,%l3"
[(set_attr "type" "branch")])
(define_insn ""
(label_ref (match_operand 3 "" ""))
(pc)))]
""
- "bbc %2,%1,%l3"
+ "bbc%+ %2,%1,%l3"
[(set_attr "type" "branch")])
(define_insn ""
(label_ref (match_operand 3 "" ""))
(pc)))]
""
- "bbs %2,%1,%l3"
+ "bbs%+ %2,%1,%l3"
[(set_attr "type" "branch")])
(define_insn ""
(label_ref (match_operand 3 "" ""))
(pc)))]
""
- "bbc %2,%1,%l3"
+ "bbc%+ %2,%1,%l3"
[(set_attr "type" "branch")])
;; ??? These will never match. The LOG_LINKs necessary to make these match
(label_ref (match_operand 1 "" ""))
(pc)))]
""
- "b%C0 %l1"
+ "b%C0%+ %l1"
[(set_attr "type" "branch")])
(define_insn ""
(pc)
(label_ref (match_operand 1 "" ""))))]
""
- "b%I0 %l1"
+ "b%I0%+ %l1"
[(set_attr "type" "branch")])
(define_insn ""
(label_ref (match_operand 1 "" ""))
(pc)))]
""
- "b%C0 %l1"
+ "b%C0%+ %l1"
[(set_attr "type" "branch")])
(define_insn ""
(pc)
(label_ref (match_operand 1 "" ""))))]
""
- "b%I0 %l1"
+ "b%I0%+ %l1"
[(set_attr "type" "branch")])
(define_insn ""
(label_ref (match_operand 3 "" ""))
(pc)))]
""
- "cmp%S0%B0%R0 %2,%1,%l3"
+ "cmp%S0%B0%R0%+ %2,%1,%l3"
[(set_attr "type" "branch")])
(define_insn ""
(pc)
(label_ref (match_operand 3 "" ""))))]
""
- "cmp%S0%B0%X0 %2,%1,%l3"
+ "cmp%S0%B0%X0%+ %2,%1,%l3"
[(set_attr "type" "branch")])
\f
;; Now the trap instructions. The i960 appears to only have conditional