diff options
author | Doug Evans <dje@gnu.org> | 1996-03-23 20:54:21 +0000 |
---|---|---|
committer | Doug Evans <dje@gnu.org> | 1996-03-23 20:54:21 +0000 |
commit | 18c5947fd35bd6f8d2632cf41f8e841b9cd12419 (patch) | |
tree | 69a9e8dba1538bad945c0f513f6760d4565a6f54 /gcc | |
parent | 4b27ecd5aec9437f249e41373b67878544ed932d (diff) | |
download | gcc-18c5947fd35bd6f8d2632cf41f8e841b9cd12419.zip gcc-18c5947fd35bd6f8d2632cf41f8e841b9cd12419.tar.gz gcc-18c5947fd35bd6f8d2632cf41f8e841b9cd12419.tar.bz2 |
sparc.h (SPARC_SIMM{10,11,13}_P): Define.
* sparc/sparc.h (SPARC_SIMM{10,11,13}_P): Define.
(SMALL_INT): Use SPARC_SIMM13_P.
(CONST_OK_FOR_LETTER_P): Support new letters L,M.
From-SVN: r11600
Diffstat (limited to 'gcc')
-rw-r--r-- | gcc/config/sparc/sparc.h | 18 |
1 files changed, 13 insertions, 5 deletions
diff --git a/gcc/config/sparc/sparc.h b/gcc/config/sparc/sparc.h index 40b9b6e..9e789c5 100644 --- a/gcc/config/sparc/sparc.h +++ b/gcc/config/sparc/sparc.h @@ -1141,17 +1141,25 @@ extern char leaf_reg_remap[]; C is the letter, and VALUE is a constant value. Return 1 if VALUE is in the range specified by C. - For SPARC, `I' is used for the range of constants an insn - can actually contain. + `I' is used for the range of constants an insn can actually contain. `J' is used for the range which is just zero (since that is R0). - `K' is used for constants which can be loaded with a single sethi insn. */ + `K' is used for constants which can be loaded with a single sethi insn. + `L' is used for the range of constants supported by the movcc insns. + `M' is used for the range of constants supported by the movrcc insns. */ -#define SMALL_INT(X) ((unsigned) (INTVAL (X) + 0x1000) < 0x2000) +#define SPARC_SIMM10_P(X) ((unsigned HOST_WIDE_INT) ((X) + 0x200) < 0x400) +#define SPARC_SIMM11_P(X) ((unsigned HOST_WIDE_INT) ((X) + 0x400) < 0x800) +#define SPARC_SIMM13_P(X) ((unsigned HOST_WIDE_INT) ((X) + 0x1000) < 0x2000) +/* 10 and 11 bit immediates are only used for a few specific insns. + SMALL_INT is used throughout the port so we continue to use it. */ +#define SMALL_INT(X) (SPARC_SIMM13_P (INTVAL (X))) #define CONST_OK_FOR_LETTER_P(VALUE, C) \ - ((C) == 'I' ? (unsigned) ((VALUE) + 0x1000) < 0x2000 \ + ((C) == 'I' ? SPARC_SIMM13_P (VALUE) \ : (C) == 'J' ? (VALUE) == 0 \ : (C) == 'K' ? ((VALUE) & 0x3ff) == 0 \ + : (C) == 'L' ? SPARC_SIMM11_P (VALUE) \ + : (C) == 'M' ? SPARC_SIMM10_P (VALUE) \ : 0) /* Similar, but for floating constants, and defining letters G and H. |