Minor ARM cleanups

Richard Earnshaw rearnsha@arm.com
Mon Jan 8 07:44:00 GMT 2001


The following patch cleans up the ARM back-end a bit.  However, it also 
adds one more define_expand for ffssi2.  I would have separated this into 
separate posts, but unfortunately the changes overlap in a couple of 
places.

First it uses define_constants to define some more registers, we can then 
eliminate the similar definitions from arm.h.

It also defines some constants for UNSPEC and UNSPEC_VOLATILE insns.  This 
gets rid of several nasty immediates that are used in random places 
throughout the back-end.

It adds a PREDICATE_CODES entry for arm_hard_register_operand (this was 
accidentally omitted in my previous patch).

It cleans up some of the new XScale code.  The extensions added so far are 
largely ARMv5TE features.  We define a new flag variable arm_arch5e and 
use it where appropriate.  The PLD insn is V5E not V5, so we only enable 
that when appropriate.

Finally, when CLZ is available, we can use it to expand the builtin FFS() 
function.

2001-01-08  Richard Earnshaw  <rearnsha@arm.com>

	* arm.c (arm_arch5e): New variable.
	(all_cores): XScale is a 5TE device.
	(arm_override_options): Set arm_arch5e.
	(arm_init_builtins): __builtin_prefetch is in arch5e.
	* arm.h (arm_arch5e): Declare it.

	* arm.h (PREDICATE_CODES): Add arm_hard_register_operand.

	* arm.md (define_constants): Add defines for UNSPEC and
	UNSPEC_VOLATILE insns.  Update all users.
	(define_constants): Add constants for IP_REGNUM, SP_REGNUM, PC_REGNUM.
	* arm.c (multi_register_push, note_invalid_constants)
	(emit_multi_reg_push, emit_sfm, expand_prologue): Use constants.
	* arm.h (SP_REGNUM, IP_REGNUM, PC_REGNUM): Delete defines.
	(STACK_POINTER_REGNUM): Define in terms of SP_REGNUM.
	



More information about the Gcc-patches mailing list