diff options
author | law <law@138bc75d-0d04-0410-961f-82ee72b054a4> | 2010-04-16 22:56:21 +0000 |
---|---|---|
committer | law <law@138bc75d-0d04-0410-961f-82ee72b054a4> | 2010-04-16 22:56:21 +0000 |
commit | cfdcbbf4c8e0322de45a769ab4c24232db8a1e3f (patch) | |
tree | 99c86050bd12a7945e9513c74c9b4ab1ddcc83e6 /gcc/config/h8300/h8300.h | |
parent | 7130ec9df4fcfe8a0c1f6d3a10cfb46770cc622d (diff) | |
download | gcc-cfdcbbf4c8e0322de45a769ab4c24232db8a1e3f.tar.gz |
* config/h8300/h8300.c (print_operand) : Modify case 'V' and
case 'W' print operands for HI mode.
* config/h8300/h8300.h (Y0, Y2) : New constraints.
* config/h8300/h8300.md (bclrqi_msx, bclrhi_msx): New patterns
(bsetqi_msx, bsethi_msx, bnotqi_msx, bnothi_msx): Likewise.
* config/h8300/predicate.md (bit_register_indirect_operand): New.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@158452 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/config/h8300/h8300.h')
-rw-r--r-- | gcc/config/h8300/h8300.h | 24 |
1 files changed, 17 insertions, 7 deletions
diff --git a/gcc/config/h8300/h8300.h b/gcc/config/h8300/h8300.h index d3f714c3afd..f77dfa31407 100644 --- a/gcc/config/h8300/h8300.h +++ b/gcc/config/h8300/h8300.h @@ -819,15 +819,25 @@ struct cum_arg ((STR)[1] == 'U' ? 2 \ : 0) -/* We don't have any constraint starting with Y yet, but before - someone uses it for a one-letter constraint and we're left without - any upper-case constraints left, we reserve it for extensions - here. */ -#define OK_FOR_Y(OP, STR) \ - (0) +/* Multi-letter constraints starting with Y are to be used for operands + that are constant immediates and have single 1 or 0 in their binary + representation. */ + +#define OK_FOR_Y2(OP) \ + ((GET_CODE (OP) == CONST_INT) && (exact_log2 (INTVAL (OP) & 0xff) != -1)) + +#define OK_FOR_Y0(OP) \ + ((GET_CODE (OP) == CONST_INT) && (exact_log2 (~INTVAL (OP) & 0xff) != -1)) + +#define OK_FOR_Y(OP, STR) \ + ((STR)[1] == '2' ? OK_FOR_Y2 (OP) \ + : (STR)[1] == '0' ? OK_FOR_Y0 (OP) \ + : 0) #define CONSTRAINT_LEN_FOR_Y(STR) \ - (0) + ((STR)[1] == '2' ? 2 \ + : (STR)[1] == '0' ? 2 \ + : 0) #define OK_FOR_Z(OP) \ (TARGET_H8300SX \ |