diff options
author | Eric Christopher <echristo@redhat.com> | 2004-12-09 01:04:40 +0000 |
---|---|---|
committer | Eric Christopher <echristo@gcc.gnu.org> | 2004-12-09 01:04:40 +0000 |
commit | dec20d740406b043383a8ad0564d4c1ea31f709f (patch) | |
tree | 50e5e1e0cdd515ed7e09e4dd0f3c2543d7e844fa /gcc | |
parent | 1e6b30d091dd1527367190a74afdacddcf0e4f9e (diff) | |
download | gcc-dec20d740406b043383a8ad0564d4c1ea31f709f.zip gcc-dec20d740406b043383a8ad0564d4c1ea31f709f.tar.gz gcc-dec20d740406b043383a8ad0564d4c1ea31f709f.tar.bz2 |
mips.c (mips_scalar_mode_supported_p): Rewrite to avoid call to default function.
2004-12-08 Eric Christopher <echristo@redhat.com>
* config/mips/mips.c (mips_scalar_mode_supported_p): Rewrite
to avoid call to default function.
From-SVN: r91925
Diffstat (limited to 'gcc')
-rw-r--r-- | gcc/ChangeLog | 5 | ||||
-rw-r--r-- | gcc/config/mips/mips.c | 33 |
2 files changed, 29 insertions, 9 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog index e780766c..f9fa30f 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,8 @@ +2004-12-08 Eric Christopher <echristo@redhat.com> + + * config/mips/mips.c (mips_scalar_mode_supported_p): Rewrite + to avoid call to default function. + 2004-12-08 Zack Weinberg <zack@codesourcery.com> PR 17982 diff --git a/gcc/config/mips/mips.c b/gcc/config/mips/mips.c index 0a3025a..d3b5faa 100644 --- a/gcc/config/mips/mips.c +++ b/gcc/config/mips/mips.c @@ -7087,19 +7087,34 @@ mips_valid_pointer_mode (enum machine_mode mode) then compiled with -mabi=64 and -mint64. We have no 32-bit type at that point and so the default case - always fails. Instead of special casing everything - it's easier to accept SImode in this function and - then punt to the default which will work for all - of the cases where we deal with TARGET_64BIT, etc. */ + always fails. */ + static bool mips_scalar_mode_supported_p (enum machine_mode mode) { - /* We can always handle SImode. */ - if (mode == SImode) - return true; - else - return default_scalar_mode_supported_p (mode); + switch (mode) + { + case QImode: + case HImode: + case SImode: + case DImode: + return true; + + /* Handled via optabs.c. */ + case TImode: + return TARGET_64BIT; + case SFmode: + case DFmode: + return true; + + /* LONG_DOUBLE_TYPE_SIZE is 128 for TARGET_NEWABI only. */ + case TFmode: + return TARGET_NEWABI; + + default: + return false; + } } |