Commit 6af713e4 by John David Anglin Committed by John David Anglin

pa.h (REGNO_OK_FOR_INDEX_P, [...]): Check register number and that reg_renumber…

pa.h (REGNO_OK_FOR_INDEX_P, [...]): Check register number and that reg_renumber is nonzero before using it.

	* pa.h (REGNO_OK_FOR_INDEX_P, REGNO_OK_FOR_BASE_P, REGNO_OK_FOR_FP_P):
	Check register number and that reg_renumber is nonzero before using it.

From-SVN: r92164
parent cf77e601
2004-12-14 John David Anglin <dave.anglin@nrc-cnrc.gc.ca>
* pa.h (REGNO_OK_FOR_INDEX_P, REGNO_OK_FOR_BASE_P, REGNO_OK_FOR_FP_P):
Check register number and that reg_renumber is nonzero before using it.
2004-12-14 Steve Ellcey <sje@cup.hp.com> 2004-12-14 Steve Ellcey <sje@cup.hp.com>
* doc/invoke.texi (IA-64 options): Add existing options that * doc/invoke.texi (IA-64 options): Add existing options that
......
...@@ -1172,18 +1172,27 @@ extern int may_call_alloca; ...@@ -1172,18 +1172,27 @@ extern int may_call_alloca;
/* Macros to check register numbers against specific register classes. */ /* Macros to check register numbers against specific register classes. */
/* These assume that REGNO is a hard or pseudo reg number. /* The following macros assume that X is a hard or pseudo reg number.
They give nonzero only if REGNO is a hard reg of the suitable class They give nonzero only if X is a hard reg of the suitable class
or a pseudo reg currently allocated to a suitable hard reg. or a pseudo reg currently allocated to a suitable hard reg.
Since they use reg_renumber, they are safe only once reg_renumber Since they use reg_renumber, they are safe only once reg_renumber
has been allocated, which happens in local-alloc.c. */ has been allocated, which happens in local-alloc.c. */
#define REGNO_OK_FOR_INDEX_P(REGNO) \ #define REGNO_OK_FOR_INDEX_P(X) \
((REGNO) && ((REGNO) < 32 || (unsigned) reg_renumber[REGNO] < 32)) ((X) && ((X) < 32 \
#define REGNO_OK_FOR_BASE_P(REGNO) \ || (X >= FIRST_PSEUDO_REGISTER \
((REGNO) && ((REGNO) < 32 || (unsigned) reg_renumber[REGNO] < 32)) && reg_renumber \
#define REGNO_OK_FOR_FP_P(REGNO) \ && (unsigned) reg_renumber[X] < 32)))
(FP_REGNO_P (REGNO) || FP_REGNO_P (reg_renumber[REGNO])) #define REGNO_OK_FOR_BASE_P(X) \
((X) && ((X) < 32 \
|| (X >= FIRST_PSEUDO_REGISTER \
&& reg_renumber \
&& (unsigned) reg_renumber[X] < 32)))
#define REGNO_OK_FOR_FP_P(X) \
(FP_REGNO_P (X) \
|| (X >= FIRST_PSEUDO_REGISTER \
&& reg_renumber \
&& FP_REGNO_P (reg_renumber[X])))
/* Now macros that check whether X is a register and also, /* Now macros that check whether X is a register and also,
strictly, whether it is in a specified class. strictly, whether it is in a specified class.
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment