patch: convert_move
Aldy Hernandez
aldyh@redhat.com
Thu Jun 12 21:13:00 GMT 2003
Same stupid problem. SUBREGs of:
(subreg:V2SI (reg:DI blah))
and
(subreg:DI (reg:V2SI blah))
...cause an awful lot of grief further down the road. They are the
same size, but do not both fit in one register. Dumping them out to
memory fixes the problem.
OK?
2003-06-12 Aldy Hernandez <aldyh@redhat.com>
* expr.c (convert_move): When converting simd registers, handle
the case where the registers are not tieable.
Index: expr.c
===================================================================
RCS file: /cvs/cvsfiles/devo/gcc/expr.c,v
retrieving revision 1.485.4.2
diff -c -p -r1.485.4.2 expr.c
*** expr.c 2003/04/30 21:48:56 1.485.4.2
--- expr.c 2003/06/12 21:05:05
*************** convert_move (to, from, unsignedp)
*** 595,603 ****
abort ();
if (VECTOR_MODE_P (to_mode))
! from = simplify_gen_subreg (to_mode, from, GET_MODE (from), 0);
else
! to = simplify_gen_subreg (from_mode, to, GET_MODE (to), 0);
emit_move_insn (to, from);
return;
--- 595,633 ----
abort ();
if (VECTOR_MODE_P (to_mode))
! {
! if (GET_CODE (to) == REG
! && GET_CODE (from) == REG
! && !MODES_TIEABLE_P (to_mode, from_mode))
! {
! int slen = GET_MODE_SIZE (to_mode);
! rtx mem;
!
! mem = assign_stack_temp (from_mode, slen, 0);
! emit_move_insn (mem, from);
! from = adjust_address (mem, from_mode, 0);
! from = simplify_gen_subreg (to_mode, from, from_mode, 0);
! }
! else
! from = simplify_gen_subreg (to_mode, from, from_mode, 0);
! }
else
! {
! if (GET_CODE (to) == REG
! && GET_CODE (from) == REG
! && !MODES_TIEABLE_P (to_mode, from_mode))
! {
! int slen = GET_MODE_SIZE (to_mode);
! rtx mem;
!
! mem = assign_stack_temp (from_mode, slen, 0);
! emit_move_insn (mem, from);
! from = adjust_address (mem, from_mode, 0);
! from = simplify_gen_subreg (to_mode, from, from_mode, 0);
! }
! else
! to = simplify_gen_subreg (from_mode, to, to_mode, 0);
! }
emit_move_insn (to, from);
return;
More information about the Gcc-patches
mailing list