diff options
author | cgd <cgd@138bc75d-0d04-0410-961f-82ee72b054a4> | 2002-02-08 22:46:27 +0000 |
---|---|---|
committer | cgd <cgd@138bc75d-0d04-0410-961f-82ee72b054a4> | 2002-02-08 22:46:27 +0000 |
commit | 47ea8fe4ecf0360f1a7669baf270d83d7c1267ba (patch) | |
tree | cff0f47ee9d3538eba678b4947cf3768d44fce3d /gcc | |
parent | 5b1bb1147d9aea8a328953abbfd8981cd3b61138 (diff) | |
download | gcc-47ea8fe4ecf0360f1a7669baf270d83d7c1267ba.tar.gz |
2002-02-07 Chris Demetriou <cgd@broadcom.com>
* config/mips/mips.md (casesi_internal_di): Calculate
the index into the target offset table correctly.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@49623 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc')
-rw-r--r-- | gcc/ChangeLog | 5 | ||||
-rw-r--r-- | gcc/config/mips/mips.md | 6 |
2 files changed, 9 insertions, 2 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog index 2d78c2699ab..5736247bb10 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,8 @@ +2002-02-07 Chris Demetriou <cgd@broadcom.com> + + * config/mips/mips.md (casesi_internal_di): Calculate + the index into the target offset table correctly. + 2002-02-08 Richard Henderson <rth@redhat.com> * expr.c (expand_expr): Mind EXPAND_INITIALIZER for truncation also. diff --git a/gcc/config/mips/mips.md b/gcc/config/mips/mips.md index 4eadada89e7..ba3e9754c5b 100644 --- a/gcc/config/mips/mips.md +++ b/gcc/config/mips/mips.md @@ -9481,16 +9481,18 @@ lw\\t%2,%1-%S1(%2)\;addu\\t%2,%2,$31\;j\\t%2" (set_attr "mode" "none") (set_attr "length" "24")]) +;; This code assumes that the table index will never be >= 29 bits wide, +;; which allows the 'sign extend' from SI to DI be a no-op. (define_insn "casesi_internal_di" [(set (pc) (mem:DI (plus:DI (sign_extend:DI (mult:SI (match_operand:SI 0 "register_operand" "d") - (const_int 4))) + (const_int 8))) (label_ref (match_operand 1 "" ""))))) (clobber (match_operand:DI 2 "register_operand" "=d")) (clobber (reg:DI 31))] "TARGET_EMBEDDED_PIC" - "%(bal\\t%S1\;sll\\t%2,%0,2\\n%~%S1:\;addu\\t%2,%2,$31%)\;\\ + "%(bal\\t%S1\;sll\\t%2,%0,3\\n%~%S1:\;daddu\\t%2,%2,$31%)\;\\ ld\\t%2,%1-%S1(%2)\;daddu\\t%2,%2,$31\;j\\t%2" [(set_attr "type" "jump") (set_attr "mode" "none") |