aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRichard Henderson <rth@cygnus.com>1999-10-15 13:51:10 -0700
committerRichard Henderson <rth@gcc.gnu.org>1999-10-15 13:51:10 -0700
commit810c1b83f60f4e74c91e766c390142c18d3b17aa (patch)
treefaa0ee20928b66645b2e238b5ad852f1ae3716a7
parenta2c8e1446425cec057cf89614fda399beb0babdd (diff)
downloadgcc-810c1b83f60f4e74c91e766c390142c18d3b17aa.zip
gcc-810c1b83f60f4e74c91e766c390142c18d3b17aa.tar.gz
gcc-810c1b83f60f4e74c91e766c390142c18d3b17aa.tar.bz2
mips.c (function_prologue): Fix argument types.
* mips.c (function_prologue): Fix argument types. * mips.md (casesi): Use emit_jump_insn for casesi_internal. (casesi_internal): Write to the scratch register. From-SVN: r30023
-rw-r--r--gcc/ChangeLog6
-rw-r--r--gcc/config/mips/mips.c2
-rw-r--r--gcc/config/mips/mips.md16
3 files changed, 12 insertions, 12 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog
index 6e4038c..4fad5cd 100644
--- a/gcc/ChangeLog
+++ b/gcc/ChangeLog
@@ -1,3 +1,9 @@
+Fri Oct 15 13:48:45 1999 Richard Henderson <rth@cygnus.com>
+
+ * mips.c (function_prologue): Fix argument types.
+ * mips.md (casesi): Use emit_jump_insn for casesi_internal.
+ (casesi_internal): Write to the scratch register.
+
1999-10-15 11:16 -0700 Zack Weinberg <zack@bitmover.com>
* cppexp.c (cpp_parse_escape): Make static. Change second arg
diff --git a/gcc/config/mips/mips.c b/gcc/config/mips/mips.c
index 0828489..69bd271 100644
--- a/gcc/config/mips/mips.c
+++ b/gcc/config/mips/mips.c
@@ -6393,7 +6393,7 @@ save_restore_insns (store_p, large_reg, large_offset, file)
void
function_prologue (file, size)
FILE *file;
- int size ATTRIBUTE_UNUSED;
+ HOST_WIDE_INT size ATTRIBUTE_UNUSED;
{
#ifndef FUNCTION_NAME_ALREADY_DECLARED
const char *fnname;
diff --git a/gcc/config/mips/mips.md b/gcc/config/mips/mips.md
index 0a41e5f..4f0a419 100644
--- a/gcc/config/mips/mips.md
+++ b/gcc/config/mips/mips.md
@@ -9231,7 +9231,8 @@ move\\t%0,%z4\\n\\
emit_insn (gen_bgtu (operands[4]));
/* Do the PIC jump. */
- emit_insn (gen_casesi_internal (reg, operands[3], gen_reg_rtx (SImode)));
+ emit_jump_insn (gen_casesi_internal (reg, operands[3],
+ gen_reg_rtx (SImode)));
DONE;
}
@@ -9239,7 +9240,7 @@ move\\t%0,%z4\\n\\
;; An embedded PIC switch statement looks like this:
;; bal $LS1
-;; sll $reg,$reg,2
+;; sll $reg,$index,2
;; $LS1:
;; addu $reg,$reg,$31
;; lw $reg,$L1-$LS1($reg)
@@ -9249,8 +9250,6 @@ move\\t%0,%z4\\n\\
;; .word case1-$LS1
;; .word case2-$LS1
;; ...
-;;
-;; ??? So how does operand 2 get used?
(define_insn "casesi_internal"
[(set (pc)
@@ -9260,13 +9259,8 @@ move\\t%0,%z4\\n\\
(clobber (match_operand:SI 2 "register_operand" "=d"))
(clobber (reg:SI 31))]
"TARGET_EMBEDDED_PIC"
- "*
-{
- output_asm_insn (\"%(bal\\t%S1\;sll\\t%0,2\\n%~%S1:\", operands);
- output_asm_insn (\"addu\\t%0,%0,$31%)\", operands);
- output_asm_insn (\"lw\\t%0,%1-%S1(%0)\;addu\\t%0,%0,$31\", operands);
- return \"j\\t%0\";
-}"
+ "%(bal\\t%S1\;sll\\t%2,%0,2\\n%~%S1:\;addu\\t%2,%2,$31%)\;\\
+lw\\t%2,%1-%S1(%2)\;addu\\t%2,%2,$31\;j\\t%2"
[(set_attr "type" "jump")
(set_attr "mode" "none")
(set_attr "length" "24")])