alpha.h (PRINT_OPERAND_ADDRESS): Break out to ...
* alpha.h (PRINT_OPERAND_ADDRESS): Break out to ... * alpha.c (print_operand_address): here. Handle subregs. From-SVN: r26616
This commit is contained in:
parent
4d9a07db88
commit
714b019cee
3 changed files with 43 additions and 22 deletions
|
@ -1,3 +1,8 @@
|
|||
Sat Apr 24 20:49:20 1999 Richard Henderson <rth@cygnus.com>
|
||||
|
||||
* alpha.h (PRINT_OPERAND_ADDRESS): Break out to ...
|
||||
* alpha.c (print_operand_address): here. Handle subregs.
|
||||
|
||||
Fri Apr 23 22:35:41 EDT 1999 John Wehle (john@feith.com)
|
||||
|
||||
* acconfig.h (HAVE_GAS_FILDS_FISTS): Add.
|
||||
|
|
|
@ -2929,6 +2929,40 @@ print_operand (file, x, code)
|
|||
output_operand_lossage ("invalid %%xn code");
|
||||
}
|
||||
}
|
||||
|
||||
void
|
||||
print_operand_address (file, addr)
|
||||
FILE *file;
|
||||
rtx addr;
|
||||
{
|
||||
rtx basereg = NULL_RTX;
|
||||
HOST_WIDE_INT offset = 0;
|
||||
|
||||
if (GET_CODE (addr) == AND)
|
||||
addr = XEXP (addr, 0);
|
||||
if (GET_CODE (addr) == SUBREG)
|
||||
addr = SUBREG_REG (addr);
|
||||
|
||||
if (GET_CODE (addr) == REG)
|
||||
basereg = addr;
|
||||
else if (GET_CODE (addr) == CONST_INT)
|
||||
offset = INTVAL (addr);
|
||||
else if (GET_CODE (addr) == PLUS
|
||||
&& GET_CODE (XEXP (addr, 1)) == CONST_INT)
|
||||
{
|
||||
offset = INTVAL (XEXP (addr, 1));
|
||||
basereg = XEXP (addr, 0);
|
||||
if (GET_CODE (basereg) == SUBREG)
|
||||
basereg = SUBREG_REG (basereg);
|
||||
if (GET_CODE (basereg) != REG)
|
||||
abort ();
|
||||
}
|
||||
else
|
||||
abort ();
|
||||
|
||||
fprintf (file, HOST_WIDE_INT_PRINT_DEC, offset);
|
||||
fprintf (file, "($%d)", basereg ? REGNO (basereg) : 31);
|
||||
}
|
||||
|
||||
/* Emit RTL insns to initialize the variable parts of a trampoline at
|
||||
TRAMP. FNADDR is an RTX for the address of the function's pure
|
||||
|
|
|
@ -2297,28 +2297,9 @@ do { \
|
|||
|
||||
/* Print a memory address as an operand to reference that memory location. */
|
||||
|
||||
#define PRINT_OPERAND_ADDRESS(FILE, ADDR) \
|
||||
{ rtx addr = (ADDR); \
|
||||
int basereg = 31; \
|
||||
HOST_WIDE_INT offset = 0; \
|
||||
\
|
||||
if (GET_CODE (addr) == AND) \
|
||||
addr = XEXP (addr, 0); \
|
||||
\
|
||||
if (GET_CODE (addr) == REG) \
|
||||
basereg = REGNO (addr); \
|
||||
else if (GET_CODE (addr) == CONST_INT) \
|
||||
offset = INTVAL (addr); \
|
||||
else if (GET_CODE (addr) == PLUS \
|
||||
&& GET_CODE (XEXP (addr, 0)) == REG \
|
||||
&& GET_CODE (XEXP (addr, 1)) == CONST_INT) \
|
||||
basereg = REGNO (XEXP (addr, 0)), offset = INTVAL (XEXP (addr, 1)); \
|
||||
else \
|
||||
abort (); \
|
||||
\
|
||||
fprintf (FILE, HOST_WIDE_INT_PRINT_DEC, offset); \
|
||||
fprintf (FILE, "($%d)", basereg); \
|
||||
}
|
||||
#define PRINT_OPERAND_ADDRESS(FILE, ADDR) \
|
||||
print_operand_address((FILE), (ADDR))
|
||||
|
||||
/* Define the codes that are matched by predicates in alpha.c. */
|
||||
|
||||
#define PREDICATE_CODES \
|
||||
|
@ -2524,6 +2505,7 @@ extern int current_file_function_operand ();
|
|||
extern int alpha_sa_size ();
|
||||
extern int alpha_adjust_cost ();
|
||||
extern void print_operand ();
|
||||
extern void print_operand_address ();
|
||||
extern int reg_or_0_operand ();
|
||||
extern int reg_or_8bit_operand ();
|
||||
extern int mul8_operand ();
|
||||
|
|
Loading…
Add table
Reference in a new issue