diff options
author | jamborm <jamborm@138bc75d-0d04-0410-961f-82ee72b054a4> | 2016-02-26 17:42:06 +0000 |
---|---|---|
committer | jamborm <jamborm@138bc75d-0d04-0410-961f-82ee72b054a4> | 2016-02-26 17:42:06 +0000 |
commit | 0d1b26a75421b18789affbebfa03e3d30c82bbae (patch) | |
tree | 8379ac80524de2a88452679ab20844956ad1fd06 /gcc/hsa.h | |
parent | 63ee769cb1157bf02a5ad1083841fba29de7dd4b (diff) | |
download | gcc-0d1b26a75421b18789affbebfa03e3d30c82bbae.tar.gz |
[hsa] Satisfy conditional move operand type constrains
2016-02-26 Martin Jambor <mjambor@suse.cz>
* hsa.h (is_a_helper): New overload for hsa_op_immed for
hsa_op_with_type operands.
(hsa_unsigned_type_for_type): Declare.
* hsa.c (hsa_unsigned_type_for_type): New function.
* hsa-gen.c (gen_hsa_binary_operation): Use hsa_unsigned_type_for_type.
(gen_hsa_insns_for_operation_assignment): Satisfy constrains of
the finalizer. Do not emit extra move.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@233749 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/hsa.h')
-rw-r--r-- | gcc/hsa.h | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/gcc/hsa.h b/gcc/hsa.h index f0436f3cf69..275a954f88d 100644 --- a/gcc/hsa.h +++ b/gcc/hsa.h @@ -199,6 +199,17 @@ is_a_helper <hsa_op_immed *>::test (hsa_op_base *p) return p->m_kind == BRIG_KIND_OPERAND_CONSTANT_BYTES; } +/* Likewise, but for a more specified base. */ + +template <> +template <> +inline bool +is_a_helper <hsa_op_immed *>::test (hsa_op_with_type *p) +{ + return p->m_kind == BRIG_KIND_OPERAND_CONSTANT_BYTES; +} + + /* HSA register operand. */ class hsa_op_reg : public hsa_op_with_type @@ -1326,6 +1337,7 @@ BrigType16_t hsa_bittype_for_bitsize (unsigned bitsize); BrigType16_t hsa_uint_for_bitsize (unsigned bitsize); BrigType16_t hsa_float_for_bitsize (unsigned bitsize); BrigType16_t hsa_bittype_for_type (BrigType16_t t); +BrigType16_t hsa_unsigned_type_for_type (BrigType16_t t); bool hsa_type_float_p (BrigType16_t type); bool hsa_type_integer_p (BrigType16_t type); bool hsa_btype_p (BrigType16_t type); |