26
26
#include "config.h"
27
27
#include "system.h"
28
28
#include "coretypes.h"
29
- #include "tm.h"
29
+ #include "backend.h"
30
+ #include "target.h"
30
31
#include "rtl.h"
32
+ #include "tree.h"
33
+ #include "df.h"
34
+ #include "tm.h"
35
+ #include "tm_p.h"
36
+ #include "stringpool.h"
37
+ #include "optabs.h"
31
38
#include "hash-set.h"
39
+ #include "emit-rtl.h"
40
+ #include "recog.h"
32
41
#include "inchash.h"
33
42
#include "symtab.h"
34
- #include "tree.h"
35
- #include "stringpool.h"
36
43
#include "stor-layout.h"
37
44
#include "calls.h"
38
45
#include "varasm.h"
48
55
#include "reload.h"
49
56
#include "function.h"
50
57
#include "explow.h"
51
- #include "emit-rtl.h"
52
58
#include "expr.h"
53
59
#include "toplev.h"
54
- #include "recog.h"
55
60
#include "ggc.h"
56
61
#include "except.h"
57
- #include "tm_p.h"
58
- #include "target.h"
59
62
#include "target-def.h"
60
63
#include "debug.h"
61
64
#include "langhooks.h"
62
65
#include "predict.h"
63
66
#include "basic-block.h"
64
- #include "df.h"
65
- #include "optabs.h"
66
67
#include "dwarf2.h"
67
68
#include "ansidecl.h"
68
69
#include "builtins.h"
70
+ #include "sbitmap.h"
69
71
70
72
/* ========================================================================== */
71
73
/* Local macros */
@@ -379,7 +381,7 @@ or1k_expand_int_compare (enum rtx_code code,
379
381
/* This is very simple, but making the interface the same as in the
380
382
FP case makes the rest of the code easier. */
381
383
tmp = gen_rtx_COMPARE (cmpmode , op0 , op1 );
382
- emit_insn (gen_rtx_SET (VOIDmode , flags , tmp ));
384
+ emit_insn (gen_rtx_SET (flags , tmp ));
383
385
384
386
/* Return the test that should be put into the flags user, i.e.
385
387
the bcc, scc, or cmov instruction. */
@@ -434,14 +436,14 @@ or1k_expand_cmpxchg_qihi (rtx bval, rtx retval, rtx mem, rtx oldval, rtx newval,
434
436
435
437
mask_const = gen_rtx_CONST_INT (VOIDmode ,
436
438
mode == QImode ? 0xff : 0xffff );
437
- emit_insn (gen_rtx_SET (VOIDmode , mask , mask_const ));
439
+ emit_insn (gen_rtx_SET (mask , mask_const ));
438
440
439
441
/* align address and retrieve the offset. */
440
- emit_insn (gen_rtx_SET (VOIDmode , addr ,
442
+ emit_insn (gen_rtx_SET (addr ,
441
443
gen_rtx_AND (Pmode , addr1 , GEN_INT (-4 ))));
442
- emit_insn (gen_rtx_SET (VOIDmode , off ,
444
+ emit_insn (gen_rtx_SET (off ,
443
445
gen_rtx_AND (SImode , addr1 , GEN_INT (3 ))));
444
- emit_insn (gen_rtx_SET (VOIDmode , off ,
446
+ emit_insn (gen_rtx_SET (off ,
445
447
gen_rtx_XOR (SImode , off ,
446
448
GEN_INT (GET_MODE (mem ) == QImode
447
449
? 3 : 2 ))));
@@ -450,7 +452,7 @@ or1k_expand_cmpxchg_qihi (rtx bval, rtx retval, rtx mem, rtx oldval, rtx newval,
450
452
451
453
/* shift all arguments to be aligned to where the data we want
452
454
* to operate on is located. */
453
- emit_insn (gen_rtx_SET (VOIDmode , shifter ,
455
+ emit_insn (gen_rtx_SET (shifter ,
454
456
gen_rtx_ASHIFT (SImode , off , GEN_INT (3 ))));
455
457
456
458
emit_insn (gen_ashlsi3 (shifted_oldval , oldval , shifter ));
@@ -490,14 +492,14 @@ or1k_expand_fetch_op_qihi (rtx oldval, rtx mem, rtx operand, rtx newval,
490
492
491
493
mask_const = gen_rtx_CONST_INT (VOIDmode ,
492
494
mode == QImode ? 0xff : 0xffff );
493
- emit_insn (gen_rtx_SET (VOIDmode , mask , mask_const ));
495
+ emit_insn (gen_rtx_SET (mask , mask_const ));
494
496
495
497
/* align address and retrieve the offset. */
496
- emit_insn (gen_rtx_SET (VOIDmode , addr ,
498
+ emit_insn (gen_rtx_SET (addr ,
497
499
gen_rtx_AND (Pmode , addr1 , GEN_INT (-4 ))));
498
- emit_insn (gen_rtx_SET (VOIDmode , off ,
500
+ emit_insn (gen_rtx_SET (off ,
499
501
gen_rtx_AND (SImode , addr1 , GEN_INT (3 ))));
500
- emit_insn (gen_rtx_SET (VOIDmode , off ,
502
+ emit_insn (gen_rtx_SET (off ,
501
503
gen_rtx_XOR (SImode , off ,
502
504
GEN_INT (GET_MODE (mem ) == QImode
503
505
? 3 : 2 ))));
@@ -506,7 +508,7 @@ or1k_expand_fetch_op_qihi (rtx oldval, rtx mem, rtx operand, rtx newval,
506
508
507
509
/* shift all arguments to be aligned to where the data we want
508
510
* to operate on is located. */
509
- emit_insn (gen_rtx_SET (VOIDmode , shifter ,
511
+ emit_insn (gen_rtx_SET (shifter ,
510
512
gen_rtx_ASHIFT (SImode , off , GEN_INT (3 ))));
511
513
512
514
emit_insn (gen_ashlsi3 (shifted_operand , operand , shifter ));
@@ -565,7 +567,7 @@ or1k_emit_int_cmove (rtx dest,
565
567
566
568
567
569
static void
568
- or1k_print_operand_address (FILE * stream , rtx addr )
570
+ or1k_print_operand_address (FILE * stream , machine_mode /* mode */ , rtx addr )
569
571
{
570
572
rtx offset ;
571
573
@@ -595,7 +597,7 @@ or1k_print_operand_address (FILE *stream, rtx addr)
595
597
offset = XEXP (addr , 0 );
596
598
addr = XEXP (addr , 1 );
597
599
}
598
- output_address (offset );
600
+ output_address (GET_MODE ( addr ), offset );
599
601
fprintf (stream , "(%s)" , reg_names [REGNO (addr )]);
600
602
break ;
601
603
@@ -999,7 +1001,7 @@ or1k_emit_binary (enum rtx_code code,
999
1001
rtx op0 ,
1000
1002
rtx op1 )
1001
1003
{
1002
- emit_insn (gen_rtx_SET (VOIDmode , target ,
1004
+ emit_insn (gen_rtx_SET (target ,
1003
1005
gen_rtx_fmt_ee (code , GET_MODE (target ), op0 , op1 )));
1004
1006
1005
1007
} /* or1k_emit_binary () */
@@ -1102,8 +1104,7 @@ or1k_expand_prologue (void)
1102
1104
GEN_INT (- frame_info .gpr_frame )));
1103
1105
if (frame_info .save_fp_p )
1104
1106
{
1105
- emit_frame_insn (gen_rtx_SET (Pmode ,
1106
- stack_disp_mem (frame_info .fp_save_offset ),
1107
+ emit_frame_insn (gen_rtx_SET (stack_disp_mem (frame_info .fp_save_offset ),
1107
1108
hard_frame_pointer_rtx ));
1108
1109
1109
1110
emit_frame_insn
@@ -1112,7 +1113,7 @@ or1k_expand_prologue (void)
1112
1113
if (frame_info .save_lr_p )
1113
1114
{
1114
1115
emit_frame_insn
1115
- (gen_rtx_SET (Pmode , stack_disp_mem (frame_info .lr_save_offset ),
1116
+ (gen_rtx_SET (stack_disp_mem (frame_info .lr_save_offset ),
1116
1117
gen_rtx_REG (Pmode , LINK_REGNUM )));
1117
1118
}
1118
1119
if (frame_info .gpr_size )
@@ -1134,8 +1135,7 @@ or1k_expand_prologue (void)
1134
1135
!= frame_info .fp_save_offset ));
1135
1136
1136
1137
emit_frame_insn
1137
- (gen_rtx_SET (Pmode ,
1138
- stack_disp_mem (frame_info .gpr_offset + offset ),
1138
+ (gen_rtx_SET (stack_disp_mem (frame_info .gpr_offset + offset ),
1139
1139
gen_rtx_REG (Pmode , regno )));
1140
1140
offset = offset + UNITS_PER_WORD ;
1141
1141
}
@@ -1194,7 +1194,7 @@ or1k_expand_epilogue (void)
1194
1194
{
1195
1195
emit_insn (gen_frame_dealloc_fp ());
1196
1196
emit_insn
1197
- (gen_rtx_SET (Pmode , hard_frame_pointer_rtx ,
1197
+ (gen_rtx_SET (hard_frame_pointer_rtx ,
1198
1198
stack_disp_mem (frame_info .fp_save_offset )));
1199
1199
}
1200
1200
else
@@ -1217,7 +1217,7 @@ or1k_expand_epilogue (void)
1217
1217
if (frame_info .save_lr_p && !crtl -> calls_eh_return )
1218
1218
{
1219
1219
emit_insn
1220
- (gen_rtx_SET (Pmode , gen_rtx_REG (Pmode , LINK_REGNUM ),
1220
+ (gen_rtx_SET (gen_rtx_REG (Pmode , LINK_REGNUM ),
1221
1221
stack_disp_mem (frame_info .lr_save_offset )));
1222
1222
}
1223
1223
@@ -1233,7 +1233,7 @@ or1k_expand_epilogue (void)
1233
1233
1234
1234
if (regno != FIRST_PSEUDO_REGISTER )
1235
1235
emit_insn
1236
- (gen_rtx_SET (Pmode , gen_rtx_REG (Pmode , regno ),
1236
+ (gen_rtx_SET (gen_rtx_REG (Pmode , regno ),
1237
1237
stack_disp_mem (frame_info .gpr_offset + offset )));
1238
1238
offset = offset + UNITS_PER_WORD ;
1239
1239
}
@@ -1414,7 +1414,7 @@ or1k_expand_conditional_branch (rtx *operands,
1414
1414
tmp ,
1415
1415
gen_rtx_LABEL_REF (VOIDmode , operands [3 ]),
1416
1416
pc_rtx );
1417
- emit_jump_insn (gen_rtx_SET (VOIDmode , pc_rtx , tmp ));
1417
+ emit_jump_insn (gen_rtx_SET (pc_rtx , tmp ));
1418
1418
return ;
1419
1419
1420
1420
case SFmode :
@@ -1423,7 +1423,7 @@ or1k_expand_conditional_branch (rtx *operands,
1423
1423
tmp ,
1424
1424
gen_rtx_LABEL_REF (VOIDmode , operands [3 ]),
1425
1425
pc_rtx );
1426
- emit_jump_insn (gen_rtx_SET (VOIDmode , pc_rtx , tmp ));
1426
+ emit_jump_insn (gen_rtx_SET (pc_rtx , tmp ));
1427
1427
return ;
1428
1428
1429
1429
default :
@@ -1554,12 +1554,11 @@ or1k_emit_set_const32 (rtx op0,
1554
1554
/* Emit them as real moves instead of a HIGH/LO_SUM,
1555
1555
this way CSE can see everything and reuse intermediate
1556
1556
values if it wants. */
1557
- emit_insn (gen_rtx_SET (VOIDmode , temp ,
1557
+ emit_insn (gen_rtx_SET (temp ,
1558
1558
GEN_INT (INTVAL (op1 )
1559
1559
& ~(HOST_WIDE_INT ) 0xffff )));
1560
1560
1561
- emit_insn (gen_rtx_SET (VOIDmode ,
1562
- op0 ,
1561
+ emit_insn (gen_rtx_SET (op0 ,
1563
1562
gen_rtx_IOR (mode , temp ,
1564
1563
GEN_INT (INTVAL (op1 ) & 0xffff ))));
1565
1564
}
0 commit comments