Re: [RFC, ARM] Convert thumb1 prologue completely to rtl

2011-06-28 Thread Richard Earnshaw
On 27/06/11 19:31, Richard Henderson wrote:
 On 06/24/2011 02:59 AM, Richard Earnshaw wrote:
 On 18/06/11 20:02, Richard Henderson wrote:
 I couldn't find anything terribly tricky about the conversion.

 The existing push_mult pattern would service thumb1 with just
 a tweak or two to the memory predicate and the length.

 The existing emit_multi_reg_push wasn't set up to handle a
 complete switch of registers for unwind info.  I thought about
 trying to merge them, but thought chickened out.

 I havn't cleaned out the code that is now dead in thumb_pushpop.
 I'd been thinking about maybe converting epilogues completely
 to rtl as well, which would allow the function to be deleted
 completely, rather than incrementally.

 I'm unsure what testing should be applied.  I'm currently doing
 arm-elf, which does at least have a thumb1 multilib, and uses
 newlib so I don't have to fiddle with setting up a full native
 cross environment.  What else should be done?  arm-eabi?


 Testing this on arm-eabi is essential since this may affect C++ unwind
 table generation (I can't see any obvious problems, but you never know).

 
 I've now tested the patch with both arm-elf and arm-eabi with
 RUNTESTFLAGS='--target_board=arm-sim{-mthumb}' with no regressions.
 
 Ok to install?
 

Yep, thanks.

R.

 
 r~
 




Re: [RFC, ARM] Convert thumb1 prologue completely to rtl

2011-06-27 Thread Richard Henderson
On 06/24/2011 02:59 AM, Richard Earnshaw wrote:
 On 18/06/11 20:02, Richard Henderson wrote:
 I couldn't find anything terribly tricky about the conversion.

 The existing push_mult pattern would service thumb1 with just
 a tweak or two to the memory predicate and the length.

 The existing emit_multi_reg_push wasn't set up to handle a
 complete switch of registers for unwind info.  I thought about
 trying to merge them, but thought chickened out.

 I havn't cleaned out the code that is now dead in thumb_pushpop.
 I'd been thinking about maybe converting epilogues completely
 to rtl as well, which would allow the function to be deleted
 completely, rather than incrementally.

 I'm unsure what testing should be applied.  I'm currently doing
 arm-elf, which does at least have a thumb1 multilib, and uses
 newlib so I don't have to fiddle with setting up a full native
 cross environment.  What else should be done?  arm-eabi?

 
 Testing this on arm-eabi is essential since this may affect C++ unwind
 table generation (I can't see any obvious problems, but you never know).
 

I've now tested the patch with both arm-elf and arm-eabi with
RUNTESTFLAGS='--target_board=arm-sim{-mthumb}' with no regressions.

Ok to install?


r~


Re: [RFC, ARM] Convert thumb1 prologue completely to rtl

2011-06-24 Thread Richard Earnshaw
On 18/06/11 20:02, Richard Henderson wrote:
 I couldn't find anything terribly tricky about the conversion.
 
 The existing push_mult pattern would service thumb1 with just
 a tweak or two to the memory predicate and the length.
 
 The existing emit_multi_reg_push wasn't set up to handle a
 complete switch of registers for unwind info.  I thought about
 trying to merge them, but thought chickened out.
 
 I havn't cleaned out the code that is now dead in thumb_pushpop.
 I'd been thinking about maybe converting epilogues completely
 to rtl as well, which would allow the function to be deleted
 completely, rather than incrementally.
 
 I'm unsure what testing should be applied.  I'm currently doing
 arm-elf, which does at least have a thumb1 multilib, and uses
 newlib so I don't have to fiddle with setting up a full native
 cross environment.  What else should be done?  arm-eabi?
 

Testing this on arm-eabi is essential since this may affect C++ unwind
table generation (I can't see any obvious problems, but you never know).

 This is the only substantive bit of code left that tries to emit
 dwarf2 unwind info while emitting assembly as text.  So I'd like
 to get rid of this as soon as possible...
 
 
 r~
 
 
 d-thumb-1
 
 
   * config/arm/arm.c (arm_output_function_prologue): Don't call
   thumb1_output_function_prologue.
   (arm_expand_prologue): Avoid dead store.
   (number_of_first_bit_set): Use ctz_hwi.
   (thumb1_emit_multi_reg_push): New.
   (thumb1_expand_prologue): Merge thumb1_output_function_prologue
   to emit the entire prologue as rtl.
   (thumb1_output_interwork): Split out from
   thumb1_output_function_prologue.
   (thumb1_output_function_prologue): Remove.
   (arm_attr_length_push_multi): Handle thumb1.
   * config/arm/arm.md (VUNSPEC_THUMB1_INTERWORK): New.
   (prologue_thumb1_interwork): New.
   (*push_multi): Allow thumb1; use push_mult_memory_operand.
   * config/arm/predicates.md (push_mult_memory_operand): New.
 

OK if the arm-eabi tests are OK.

R.



Re: [RFC, ARM] Convert thumb1 prologue completely to rtl

2011-06-23 Thread Richard Henderson
Ping.  This will shortly be holding up dwarf2 maintenance.

  http://gcc.gnu.org/ml/gcc-patches/2011-06/msg01398.html


r~


Re: [RFC, ARM] Convert thumb1 prologue completely to rtl

2011-06-19 Thread Michael Hope
On Sun, Jun 19, 2011 at 7:02 AM, Richard Henderson r...@twiddle.net wrote:
 I couldn't find anything terribly tricky about the conversion.

 The existing push_mult pattern would service thumb1 with just
 a tweak or two to the memory predicate and the length.

 The existing emit_multi_reg_push wasn't set up to handle a
 complete switch of registers for unwind info.  I thought about
 trying to merge them, but thought chickened out.

 I havn't cleaned out the code that is now dead in thumb_pushpop.
 I'd been thinking about maybe converting epilogues completely
 to rtl as well, which would allow the function to be deleted
 completely, rather than incrementally.

 I'm unsure what testing should be applied.  I'm currently doing
 arm-elf, which does at least have a thumb1 multilib, and uses
 newlib so I don't have to fiddle with setting up a full native
 cross environment.  What else should be done?  arm-eabi?

Hi Richard.  arm-linux-gnueabi bootstraps in Thumb1 mode.  I haven't
done many builds in that way, but here's the latest:
 
http://builds.linaro.org/toolchain/gcc-4.6.0-RC-20110321/logs/armv7l-maverick-cbuild93-ursa1-armv5thumbr1/

-- Michael