pdp11.h (PRINT_OPERAND): Delete.
* config/pdp11/pdp11.h (PRINT_OPERAND): Delete. * config/pdp11/pdp11.c (TARGET_PRINT_OPERAND, TARGET_PRINT_OPERAND_PUNCT_VALID_P): Define (pdp11_asm_print_operand, pdp11_asm_print_operand_punct_valid_p): New function. * config/pdp11/pdp11.md (tablejump): Fix generated assembly. From-SVN: r168368
This commit is contained in:
parent
4afeb65c32
commit
12eb6ed32b
@ -1,3 +1,12 @@
|
|||||||
|
2010-12-31 Paul Koning <ni1d@arrl.net>
|
||||||
|
|
||||||
|
* config/pdp11/pdp11.h (PRINT_OPERAND): Delete.
|
||||||
|
* config/pdp11/pdp11.c (TARGET_PRINT_OPERAND,
|
||||||
|
TARGET_PRINT_OPERAND_PUNCT_VALID_P): Define
|
||||||
|
(pdp11_asm_print_operand, pdp11_asm_print_operand_punct_valid_p):
|
||||||
|
New function.
|
||||||
|
* config/pdp11/pdp11.md (tablejump): Fix generated assembly.
|
||||||
|
|
||||||
2010-12-31 Joern Rennecke <amylaar@spamcop.net>
|
2010-12-31 Joern Rennecke <amylaar@spamcop.net>
|
||||||
|
|
||||||
PR target/47111
|
PR target/47111
|
||||||
|
@ -235,6 +235,12 @@ static const struct default_options pdp11_option_optimization_table[] =
|
|||||||
|
|
||||||
#undef TARGET_ASM_FUNCTION_SECTION
|
#undef TARGET_ASM_FUNCTION_SECTION
|
||||||
#define TARGET_ASM_FUNCTION_SECTION pdp11_function_section
|
#define TARGET_ASM_FUNCTION_SECTION pdp11_function_section
|
||||||
|
|
||||||
|
#undef TARGET_PRINT_OPERAND
|
||||||
|
#define TARGET_PRINT_OPERAND pdp11_asm_print_operand
|
||||||
|
|
||||||
|
#undef TARGET_PRINT_OPERAND_PUNCT_VALID_P
|
||||||
|
#define TARGET_PRINT_OPERAND_PUNCT_VALID_P pdp11_asm_print_operand_punct_valid_p
|
||||||
|
|
||||||
/* Implement TARGET_HANDLE_OPTION. */
|
/* Implement TARGET_HANDLE_OPTION. */
|
||||||
|
|
||||||
@ -721,13 +727,54 @@ pdp11_asm_output_var (FILE *file, const char *name, int size,
|
|||||||
{
|
{
|
||||||
if (align > 8)
|
if (align > 8)
|
||||||
fprintf (file, "\n\t.even\n");
|
fprintf (file, "\n\t.even\n");
|
||||||
fprintf (file, ".globl ");
|
if (global)
|
||||||
assemble_name (file, name);
|
{
|
||||||
|
fprintf (file, ".globl ");
|
||||||
|
assemble_name (file, name);
|
||||||
|
}
|
||||||
fprintf (file, "\n");
|
fprintf (file, "\n");
|
||||||
assemble_name (file, name);
|
assemble_name (file, name);
|
||||||
fprintf (file, ": .=.+ %#ho\n", (unsigned short)size);
|
fprintf (file, ": .=.+ %#ho\n", (unsigned short)size);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
static void
|
||||||
|
pdp11_asm_print_operand (FILE *file, rtx x, int code)
|
||||||
|
{
|
||||||
|
REAL_VALUE_TYPE r;
|
||||||
|
long sval[2];
|
||||||
|
|
||||||
|
if (code == '#')
|
||||||
|
fprintf (file, "#");
|
||||||
|
else if (code == '@')
|
||||||
|
{
|
||||||
|
if (TARGET_UNIX_ASM)
|
||||||
|
fprintf (file, "*");
|
||||||
|
else
|
||||||
|
fprintf (file, "@");
|
||||||
|
}
|
||||||
|
else if (GET_CODE (x) == REG)
|
||||||
|
fprintf (file, "%s", reg_names[REGNO (x)]);
|
||||||
|
else if (GET_CODE (x) == MEM)
|
||||||
|
output_address (XEXP (x, 0));
|
||||||
|
else if (GET_CODE (x) == CONST_DOUBLE && GET_MODE (x) != SImode)
|
||||||
|
{
|
||||||
|
REAL_VALUE_FROM_CONST_DOUBLE (r, x);
|
||||||
|
REAL_VALUE_TO_TARGET_DOUBLE (r, sval);
|
||||||
|
fprintf (file, "$%#lo", sval[0] >> 16);
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
putc ('$', file);
|
||||||
|
output_addr_const_pdp11 (file, x);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
static bool
|
||||||
|
pdp11_asm_print_operand_punct_valid_p (char c)
|
||||||
|
{
|
||||||
|
return (c == '#' || c == '@');
|
||||||
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
print_operand_address (FILE *file, register rtx addr)
|
print_operand_address (FILE *file, register rtx addr)
|
||||||
{
|
{
|
||||||
|
@ -658,27 +658,6 @@ extern struct rtx_def *cc0_reg_rtx;
|
|||||||
#define ASM_OUTPUT_ALIGNED_LOCAL(FILE, NAME, SIZE, ALIGN) \
|
#define ASM_OUTPUT_ALIGNED_LOCAL(FILE, NAME, SIZE, ALIGN) \
|
||||||
pdp11_asm_output_var (FILE, NAME, SIZE, ALIGN, false)
|
pdp11_asm_output_var (FILE, NAME, SIZE, ALIGN, false)
|
||||||
|
|
||||||
/* Print operand X (an rtx) in assembler syntax to file FILE.
|
|
||||||
CODE is a letter or dot (`z' in `%z0') or 0 if no letter was specified.
|
|
||||||
For `%' followed by punctuation, CODE is the punctuation and X is null.
|
|
||||||
|
|
||||||
*/
|
|
||||||
|
|
||||||
|
|
||||||
#define PRINT_OPERAND(FILE, X, CODE) \
|
|
||||||
{ if (CODE == '#') fprintf (FILE, "#"); \
|
|
||||||
else if (GET_CODE (X) == REG) \
|
|
||||||
fprintf (FILE, "%s", reg_names[REGNO (X)]); \
|
|
||||||
else if (GET_CODE (X) == MEM) \
|
|
||||||
output_address (XEXP (X, 0)); \
|
|
||||||
else if (GET_CODE (X) == CONST_DOUBLE && GET_MODE (X) != SImode) \
|
|
||||||
{ REAL_VALUE_TYPE r; \
|
|
||||||
long sval[2]; \
|
|
||||||
REAL_VALUE_FROM_CONST_DOUBLE (r, X); \
|
|
||||||
REAL_VALUE_TO_TARGET_DOUBLE (r, sval); \
|
|
||||||
fprintf (FILE, "$%#lo", sval[0] >> 16); } \
|
|
||||||
else { putc ('$', FILE); output_addr_const_pdp11 (FILE, X); }}
|
|
||||||
|
|
||||||
/* Print a memory address as an operand to reference that memory location. */
|
/* Print a memory address as an operand to reference that memory location. */
|
||||||
|
|
||||||
#define PRINT_OPERAND_ADDRESS(FILE, ADDR) \
|
#define PRINT_OPERAND_ADDRESS(FILE, ADDR) \
|
||||||
|
@ -1212,11 +1212,14 @@
|
|||||||
[(set_attr "length" "4")])
|
[(set_attr "length" "4")])
|
||||||
|
|
||||||
(define_insn "tablejump"
|
(define_insn "tablejump"
|
||||||
[(set (pc) (match_operand:HI 0 "general_operand" "rR,Q"))
|
[(set (pc) (match_operand:HI 0 "general_operand" "r,R,Q"))
|
||||||
(use (label_ref (match_operand 1 "" "")))]
|
(use (label_ref (match_operand 1 "" "")))]
|
||||||
""
|
""
|
||||||
"jmp %0"
|
"@
|
||||||
[(set_attr "length" "2,4")])
|
jmp (%0)
|
||||||
|
jmp %@%0
|
||||||
|
jmp %@%0"
|
||||||
|
[(set_attr "length" "2,2,4")])
|
||||||
|
|
||||||
;; indirect jump - let's be conservative!
|
;; indirect jump - let's be conservative!
|
||||||
;; allow only register_operand, even though we could also
|
;; allow only register_operand, even though we could also
|
||||||
|
Loading…
Reference in New Issue
Block a user