diff options
author | kkojima <kkojima@138bc75d-0d04-0410-961f-82ee72b054a4> | 2007-12-10 05:42:02 +0000 |
---|---|---|
committer | kkojima <kkojima@138bc75d-0d04-0410-961f-82ee72b054a4> | 2007-12-10 05:42:02 +0000 |
commit | d3c9aa0579f5742726437e40f68a919b5ae1cc8d (patch) | |
tree | 7514c354622716ccfcebc69facff422e3a6c96e2 /gcc/config/arm | |
parent | 45a0ce77f8b87863ad40d7b34adfe7ec400f401d (diff) | |
download | gcc-d3c9aa0579f5742726437e40f68a919b5ae1cc8d.tar.gz |
* genopinit.c: Include tm_p.h in generated file.
* config/arm/neon.md (vec_set<mode>_internal): Use INTVAL
to extract the integer from operands[2].
(vec_setv2di_internal): Likewise.
* config/arm/arm.c (arm_size_return_regs): Make return type
unsigned.
(arm_init_neon_builtins): Move code after declarations.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@130736 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/config/arm')
-rw-r--r-- | gcc/config/arm/arm.c | 86 | ||||
-rw-r--r-- | gcc/config/arm/neon.md | 4 |
2 files changed, 45 insertions, 45 deletions
diff --git a/gcc/config/arm/arm.c b/gcc/config/arm/arm.c index 808a6002962..5b3b7035c15 100644 --- a/gcc/config/arm/arm.c +++ b/gcc/config/arm/arm.c @@ -77,7 +77,7 @@ static bool thumb_force_lr_save (void); static unsigned long thumb1_compute_save_reg_mask (void); static int const_ok_for_op (HOST_WIDE_INT, enum rtx_code); static rtx emit_sfm (int, int); -static int arm_size_return_regs (void); +static unsigned arm_size_return_regs (void); static bool arm_assemble_integer (rtx, unsigned int, int); static const char *fp_const_from_val (REAL_VALUE_TYPE *); static arm_cc get_arm_condition_code (rtx); @@ -11801,7 +11801,7 @@ emit_multi_reg_push (unsigned long mask) } /* Calculate the size of the return value that is passed in registers. */ -static int +static unsigned arm_size_return_regs (void) { enum machine_mode mode; @@ -14839,27 +14839,6 @@ arm_init_neon_builtins (void) tree neon_intSI_type_node = make_signed_type (GET_MODE_PRECISION (SImode)); tree neon_intDI_type_node = make_signed_type (GET_MODE_PRECISION (DImode)); tree neon_float_type_node = make_node (REAL_TYPE); - TYPE_PRECISION (neon_float_type_node) = FLOAT_TYPE_SIZE; - layout_type (neon_float_type_node); - - /* Define typedefs which exactly correspond to the modes we are basing vector - types on. If you change these names you'll need to change - the table used by arm_mangle_type too. */ - (*lang_hooks.types.register_builtin_type) (neon_intQI_type_node, - "__builtin_neon_qi"); - (*lang_hooks.types.register_builtin_type) (neon_intHI_type_node, - "__builtin_neon_hi"); - (*lang_hooks.types.register_builtin_type) (neon_intSI_type_node, - "__builtin_neon_si"); - (*lang_hooks.types.register_builtin_type) (neon_float_type_node, - "__builtin_neon_sf"); - (*lang_hooks.types.register_builtin_type) (neon_intDI_type_node, - "__builtin_neon_di"); - - (*lang_hooks.types.register_builtin_type) (neon_polyQI_type_node, - "__builtin_neon_poly8"); - (*lang_hooks.types.register_builtin_type) (neon_polyHI_type_node, - "__builtin_neon_poly16"); tree intQI_pointer_node = build_pointer_type (neon_intQI_type_node); tree intHI_pointer_node = build_pointer_type (neon_intHI_type_node); @@ -14913,32 +14892,12 @@ arm_init_neon_builtins (void) tree intUSI_type_node = make_unsigned_type (GET_MODE_PRECISION (SImode)); tree intUDI_type_node = make_unsigned_type (GET_MODE_PRECISION (DImode)); - (*lang_hooks.types.register_builtin_type) (intUQI_type_node, - "__builtin_neon_uqi"); - (*lang_hooks.types.register_builtin_type) (intUHI_type_node, - "__builtin_neon_uhi"); - (*lang_hooks.types.register_builtin_type) (intUSI_type_node, - "__builtin_neon_usi"); - (*lang_hooks.types.register_builtin_type) (intUDI_type_node, - "__builtin_neon_udi"); - /* Opaque integer types for structures of vectors. */ tree intEI_type_node = make_signed_type (GET_MODE_PRECISION (EImode)); tree intOI_type_node = make_signed_type (GET_MODE_PRECISION (OImode)); tree intCI_type_node = make_signed_type (GET_MODE_PRECISION (CImode)); tree intXI_type_node = make_signed_type (GET_MODE_PRECISION (XImode)); - (*lang_hooks.types.register_builtin_type) (intTI_type_node, - "__builtin_neon_ti"); - (*lang_hooks.types.register_builtin_type) (intEI_type_node, - "__builtin_neon_ei"); - (*lang_hooks.types.register_builtin_type) (intOI_type_node, - "__builtin_neon_oi"); - (*lang_hooks.types.register_builtin_type) (intCI_type_node, - "__builtin_neon_ci"); - (*lang_hooks.types.register_builtin_type) (intXI_type_node, - "__builtin_neon_xi"); - /* Pointers to vector types. */ tree V8QI_pointer_node = build_pointer_type (V8QI_type_node); tree V4HI_pointer_node = build_pointer_type (V4HI_type_node); @@ -14986,6 +14945,47 @@ arm_init_neon_builtins (void) tree reinterp_ftype_qreg[5][5]; tree dreg_types[5], qreg_types[5]; + TYPE_PRECISION (neon_float_type_node) = FLOAT_TYPE_SIZE; + layout_type (neon_float_type_node); + + /* Define typedefs which exactly correspond to the modes we are basing vector + types on. If you change these names you'll need to change + the table used by arm_mangle_type too. */ + (*lang_hooks.types.register_builtin_type) (neon_intQI_type_node, + "__builtin_neon_qi"); + (*lang_hooks.types.register_builtin_type) (neon_intHI_type_node, + "__builtin_neon_hi"); + (*lang_hooks.types.register_builtin_type) (neon_intSI_type_node, + "__builtin_neon_si"); + (*lang_hooks.types.register_builtin_type) (neon_float_type_node, + "__builtin_neon_sf"); + (*lang_hooks.types.register_builtin_type) (neon_intDI_type_node, + "__builtin_neon_di"); + + (*lang_hooks.types.register_builtin_type) (neon_polyQI_type_node, + "__builtin_neon_poly8"); + (*lang_hooks.types.register_builtin_type) (neon_polyHI_type_node, + "__builtin_neon_poly16"); + (*lang_hooks.types.register_builtin_type) (intUQI_type_node, + "__builtin_neon_uqi"); + (*lang_hooks.types.register_builtin_type) (intUHI_type_node, + "__builtin_neon_uhi"); + (*lang_hooks.types.register_builtin_type) (intUSI_type_node, + "__builtin_neon_usi"); + (*lang_hooks.types.register_builtin_type) (intUDI_type_node, + "__builtin_neon_udi"); + + (*lang_hooks.types.register_builtin_type) (intTI_type_node, + "__builtin_neon_ti"); + (*lang_hooks.types.register_builtin_type) (intEI_type_node, + "__builtin_neon_ei"); + (*lang_hooks.types.register_builtin_type) (intOI_type_node, + "__builtin_neon_oi"); + (*lang_hooks.types.register_builtin_type) (intCI_type_node, + "__builtin_neon_ci"); + (*lang_hooks.types.register_builtin_type) (intXI_type_node, + "__builtin_neon_xi"); + dreg_types[0] = V8QI_type_node; dreg_types[1] = V4HI_type_node; dreg_types[2] = V2SI_type_node; diff --git a/gcc/config/arm/neon.md b/gcc/config/arm/neon.md index 167367c5239..0c312e7c336 100644 --- a/gcc/config/arm/neon.md +++ b/gcc/config/arm/neon.md @@ -751,7 +751,7 @@ (match_operand:SI 2 "immediate_operand" "i")))] "TARGET_NEON" { - HOST_WIDE_INT elem = ffs (operands[2]) - 1; + HOST_WIDE_INT elem = ffs ((int) INTVAL (operands[2])) - 1; int half_elts = GET_MODE_NUNITS (<MODE>mode) / 2; int elt = elem % half_elts; int hi = (elem / half_elts) * 2; @@ -775,7 +775,7 @@ (match_operand:SI 2 "immediate_operand" "i")))] "TARGET_NEON" { - HOST_WIDE_INT elem = ffs (operands[2]) - 1; + HOST_WIDE_INT elem = ffs ((int) INTVAL (operands[2])) - 1; int regno = REGNO (operands[0]) + 2 * elem; operands[0] = gen_rtx_REG (DImode, regno); |