diff options
author | Nick Clifton <nickc@redhat.com> | 2005-09-28 15:56:53 +0000 |
---|---|---|
committer | Nick Clifton <nickc@gcc.gnu.org> | 2005-09-28 15:56:53 +0000 |
commit | 7d866c52c5ae7ff55669c2f053554e67929736a2 (patch) | |
tree | 9956f293d36d3b2c87545e2b36d40076e9e8116c | |
parent | 9f4a5c9a630914ea21535efcbc62825bf289c51e (diff) | |
download | gcc-7d866c52c5ae7ff55669c2f053554e67929736a2.zip gcc-7d866c52c5ae7ff55669c2f053554e67929736a2.tar.gz gcc-7d866c52c5ae7ff55669c2f053554e67929736a2.tar.bz2 |
config/v850/v850.h (GO_IF_LEGITIMATE_ADDRESS): Tidy up formatting.
Add check to PLUS case to ensure that the offset is within an acceptable range.
config/v850/v850.md (casesi): Disable the generation of the switch pattern as
it is not being handled properly at the moment.
From-SVN: r104736
-rw-r--r-- | gcc/ChangeLog | 7 | ||||
-rw-r--r-- | gcc/config/v850/v850.h | 12 | ||||
-rw-r--r-- | gcc/config/v850/v850.md | 4 |
3 files changed, 18 insertions, 5 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog index 478493e..4cea691 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,5 +1,12 @@ 2005-09-28 Nick Clifton <nickc@redhat.com> + * config/v850/v850.h (GO_IF_LEGITIMATE_ADDRESS): Tidy up + formatting. Add check to PLUS case to ensure that the offset is + within an acceptable range. + + * config/v850/v850.md (casesi): Disable the generation of the + switch pattern as it is not being handled properly at the moment. + * config/v850/lib1funcs.asm (___ucmpdi2): Correct jump instruction for when the high words are identical. diff --git a/gcc/config/v850/v850.h b/gcc/config/v850/v850.h index 08c85fdb..c43c802 100644 --- a/gcc/config/v850/v850.h +++ b/gcc/config/v850/v850.h @@ -797,13 +797,14 @@ struct cum_arg { int nbytes; int anonymous_args; }; #define GO_IF_LEGITIMATE_ADDRESS(MODE, X, ADDR) \ do { \ - if (RTX_OK_FOR_BASE_P (X)) goto ADDR; \ + if (RTX_OK_FOR_BASE_P (X)) \ + goto ADDR; \ if (CONSTANT_ADDRESS_P (X) \ && (MODE == QImode || INTVAL (X) % 2 == 0) \ && (GET_MODE_SIZE (MODE) <= 4 || INTVAL (X) % 4 == 0)) \ goto ADDR; \ if (GET_CODE (X) == LO_SUM \ - && GET_CODE (XEXP (X, 0)) == REG \ + && REG_P (XEXP (X, 0)) \ && REG_OK_FOR_BASE_P (XEXP (X, 0)) \ && CONSTANT_P (XEXP (X, 1)) \ && (GET_CODE (XEXP (X, 1)) != CONST_INT \ @@ -815,9 +816,12 @@ do { \ && (GET_MODE_SIZE (MODE) <= GET_MODE_SIZE (word_mode))) \ goto ADDR; \ if (GET_CODE (X) == PLUS \ + && RTX_OK_FOR_BASE_P (XEXP (X, 0)) \ && CONSTANT_ADDRESS_P (XEXP (X, 1)) \ - && (MODE == QImode || INTVAL (XEXP (X, 1)) % 2 == 0) \ - && RTX_OK_FOR_BASE_P (XEXP (X, 0))) goto ADDR; \ + && ((MODE == QImode || INTVAL (XEXP (X, 1)) % 2 == 0) \ + && CONST_OK_FOR_K (INTVAL (XEXP (X, 1)) \ + + (GET_MODE_NUNITS (MODE) * UNITS_PER_WORD)))) \ + goto ADDR; \ } while (0) diff --git a/gcc/config/v850/v850.md b/gcc/config/v850/v850.md index 15c0caf..e67dc40 100644 --- a/gcc/config/v850/v850.md +++ b/gcc/config/v850/v850.md @@ -1309,7 +1309,9 @@ /* Branch to the default label if out of range of the table. */ emit_jump_insn (gen_bgtu (operands[4])); - if (! TARGET_BIG_SWITCH && TARGET_V850E) + /* Disabled because the switch pattern is not being recognised + properly at the moment. eg. compiling vfscanf.c in newlib. */ + if (0 && ! TARGET_BIG_SWITCH && TARGET_V850E) { emit_jump_insn (gen_switch (reg, operands[3])); DONE; |