1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
|
/* Save and restore call-clobbered registers which are live across a call.
Copyright (C) 1989 Free Software Foundation, Inc.
This file is part of GNU CC.
GNU CC is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation; either version 1, or (at your option)
any later version.
GNU CC is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU CC; see the file COPYING. If not, write to
the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA. */
#include "config.h"
#include "rtl.h"
#include "insn-config.h"
#include "flags.h"
#include "regs.h"
#include "hard-reg-set.h"
#include "reload.h"
#include "recog.h"
#include "basic-block.h"
/* Set of hard regs currently live (during scan of all insns). */
static HARD_REG_SET hard_regs_live;
/* The block of storage on the stack where regs are saved */
static rtx save_block_addr;
static int save_block_size;
/* A REG rtx for each hard register that has been saved. */
static rtx save_reg_rtx[FIRST_PSEUDO_REGISTER];
static void set_reg_live ();
static void clear_reg_live ();
static void insert_call_saves ();
static void emit_mult_save ();
static void emit_mult_restore ();
static rtx grow_save_block ();
static enum machine_mode choose_hard_reg_mode ();
/* Find the places where hard regs are live across calls and save them. */
save_call_clobbered_regs ()
{
rtx insn;
int b;
if (obey_regdecls)
return;
save_block_size = 0;
save_block_addr = 0;
bzero (save_reg_rtx, sizeof save_reg_rtx);
for (b = 0; b < n_basic_blocks; b++)
{
regset regs_live = basic_block_live_at_start[b];
int offset, bit, i;
/* Compute hard regs live at start of block -- this is the
real hard regs marked live, plus live pseudo regs that
have been renumbered to hard regs. */
#ifdef HARD_REG_SET
hard_regs_live = *regs_live;
#else
COPY_HARD_REG_SET (hard_regs_live, regs_live);
#endif
for (offset = 0, i = 0; offset < regset_size; offset++)
{
if (regs_live[offset] == 0)
i += HOST_BITS_PER_INT;
else
for (bit = 1; bit && i < max_regno; bit <<= 1, i++)
if ((regs_live[offset] & bit) && reg_renumber[i] >= 0)
SET_HARD_REG_BIT (hard_regs_live, reg_renumber[i]);
}
/* Now scan the insns in the block, keeping track of what hard
regs are live as we go. When we see a call, save the live
call-clobbered hard regs. */
for (insn = basic_block_head[b]; TRUE; insn = NEXT_INSN (insn))
{
RTX_CODE code = GET_CODE (insn);
if (code == CALL_INSN)
insert_call_saves (insn);
if (code == INSN || code == CALL_INSN || code == JUMP_INSN)
{
rtx link;
/* NB: the normal procedure is to first enliven any
registers set by insn, then deaden any registers that
had their last use at insn. This is incorrect now,
since multiple pseudos may have been mapped to the
same hard reg, and the death notes are ambiguous. So
it must be done in the other, safe, order. */
for (link = REG_NOTES (insn); link; link = XEXP (link, 1))
if (REG_NOTE_KIND (link) == REG_DEAD)
clear_reg_live (XEXP (link, 0));
note_stores (PATTERN (insn), set_reg_live);
}
if (insn == basic_block_end[b])
break;
}
}
}
/* Here from note_stores when an insn stores a value in a register.
Set the proper bit or bits in hard_regs_live. */
static void
set_reg_live (reg, setter)
rtx reg, setter;
{
register int regno;
/* WORD is which word of a multi-register group is being stored.
For the case where the store is actually into a SUBREG of REG.
Except we don't use it; I believe the entire REG needs to be
live. */
int word = 0;
if (GET_CODE (reg) == SUBREG)
{
word = SUBREG_WORD (reg);
reg = SUBREG_REG (reg);
}
if (GET_CODE (reg) != REG)
return;
regno = REGNO (reg);
/* For pseudo reg, see if it has been assigned a hardware reg. */
if (reg_renumber[regno] >= 0)
regno = reg_renumber[regno] /* + word */;
/* Handle hardware regs (and pseudos allocated to hard regs). */
if (regno < FIRST_PSEUDO_REGISTER && ! call_fixed_regs[regno])
{
register int last = regno + HARD_REGNO_NREGS (regno, GET_MODE (reg));
while (regno < last)
{
SET_HARD_REG_BIT (hard_regs_live, regno);
regno++;
}
}
}
/* Here when a REG_DEAD note records the last use of a reg. Clear
the appropriate bit or bits in hard_regs_live. */
static void
clear_reg_live (reg)
rtx reg;
{
register int regno = REGNO (reg);
/* For pseudo reg, see if it has been assigned a hardware reg. */
if (reg_renumber[regno] >= 0)
regno = reg_renumber[regno];
/* Handle hardware regs (and pseudos allocated to hard regs). */
if (regno < FIRST_PSEUDO_REGISTER && ! call_fixed_regs[regno])
{
/* Pseudo regs already assigned hardware regs are treated
almost the same as explicit hardware regs. */
register int last = regno + HARD_REGNO_NREGS (regno, GET_MODE (reg));
while (regno < last)
{
CLEAR_HARD_REG_BIT (hard_regs_live, regno);
regno++;
}
}
}
/* Insert insns to save and restore live call-clobbered regs around
call insn INSN. */
static void
insert_call_saves (insn)
rtx insn;
{
int regno;
int save_block_size_needed;
int save_block_offset[FIRST_PSEUDO_REGISTER];
save_block_size_needed = 0;
for (regno = 0; regno < FIRST_PSEUDO_REGISTER; ++regno)
{
save_block_offset[regno] = -1;
if (call_used_regs[regno] && ! call_fixed_regs[regno]
&& TEST_HARD_REG_BIT (hard_regs_live, regno))
{
enum machine_mode mode = choose_hard_reg_mode (regno);
int align = GET_MODE_UNIT_SIZE (mode);
if (align > BIGGEST_ALIGNMENT / BITS_PER_UNIT)
align = BIGGEST_ALIGNMENT / BITS_PER_UNIT;
save_block_size_needed =
((save_block_size_needed + align - 1) / align) * align;
save_block_offset[regno] = save_block_size_needed;
save_block_size_needed += GET_MODE_SIZE (mode);
if (! save_reg_rtx[regno])
save_reg_rtx[regno] = gen_rtx (REG, mode, regno);
}
}
if (save_block_size < save_block_size_needed)
save_block_addr = grow_save_block (save_block_addr,
save_block_size_needed);
emit_mult_save (insn, save_block_addr, save_block_offset);
emit_mult_restore (insn, save_block_addr, save_block_offset);
}
/* Emit a string of stores to save the hard regs listed in
OFFSET[] at address ADDR. Emit them before INSN.
OFFSET[reg] is -1 if reg should not be saved, or a
suitably-aligned offset from ADDR.
The offsets actually used do not have to be those listed
in OFFSET, but should fit in a block of the same size. */
static void
emit_mult_save (insn, addr, offset)
rtx insn, addr;
int offset[];
{
int regno;
/* A register to use as a temporary for address calculations. */
rtx tempreg;
/* A register that could be used as that temp if we save and restore it. */
rtx can_push_reg;
/* Nonzero means we need to save a register to use it as TEMPREG. */
int needpush;
/* The amount the stack is decremented to save that register (if we do). */
int decrement;
/* Record which regs we save, in case we branch to retry. */
char already_saved[FIRST_PSEUDO_REGISTER];
bzero (already_saved, sizeof already_saved);
/* Hair is needed because sometimes the addresses to save in are
not valid (offsets too big).
So we need a reg, TEMPREG, to compute addresses in.
We look first for an empty reg to use.
Sometimes no reg is empty. Then we push a reg, use it, and pop it.
Sometimes the only reg to push and pop this way is one we want to save.
We can't save it while using it as a temporary.
So we save all the other registers, pop it, and go back to `retry'.
At that point, only this reg remains to be saved;
all the others already saved are empty.
So one of them can be the temporary for this one. */
/* Sometimes we can't save all the regs conveniently at once, just some.
If that happens, we branch back here to save the rest. */
retry:
needpush = 0;
tempreg = 0;
can_push_reg = 0;
/* Set NEEDPUSH if any save-addresses are not valid memory addresses.
If any register is available, record it in TEMPREG.
If any register doesn't need saving here, record it in CAN_PUSH_REG. */
for (regno = 0; regno < FIRST_PSEUDO_REGISTER; ++regno)
{
if (offset[regno] >= 0 && ! already_saved[regno])
{
rtx reg = save_reg_rtx[regno];
rtx addr1 = plus_constant (addr, offset[regno]);
if (memory_address_p (GET_MODE (reg), addr1))
needpush = 1;
}
/* A call-clobbered reg that is dead, or already saved,
can be used as a temporary for sure, at no extra cost. */
if (tempreg == 0 && call_used_regs[regno] && ! fixed_regs[regno]
&& !(offset[regno] >= 0 && ! already_saved[regno])
&& HARD_REGNO_MODE_OK (regno, Pmode))
{
tempreg = gen_rtx (REG, Pmode, regno);
/* Don't use it if not valid for addressing. */
if (! strict_memory_address_p (QImode, tempreg))
tempreg = 0;
}
/* A call-saved reg can be a temporary if we push and pop it. */
if (can_push_reg == 0 && ! call_used_regs[regno]
&& HARD_REGNO_MODE_OK (regno, Pmode))
{
can_push_reg = gen_rtx (REG, Pmode, regno);
/* Don't use it if not valid for addressing. */
if (! strict_memory_address_p (QImode, can_push_reg))
can_push_reg = 0;
}
}
/* Clear NEEDPUSH if we already found an empty reg. */
if (tempreg != 0)
needpush = 0;
/* If we need a temp reg and none is free, make one free. */
if (needpush)
{
/* Choose a reg, preferably not among those it is our job to save. */
if (can_push_reg != 0)
tempreg = can_push_reg;
else
{
for (regno = 0; regno < FIRST_PSEUDO_REGISTER; ++regno)
if (offset[regno] >= 0 && !already_saved[regno]
&& HARD_REGNO_MODE_OK (regno, Pmode))
{
tempreg = gen_rtx (REG, Pmode, regno);
/* Don't use it if not valid for addressing. */
if (! strict_memory_address_p (QImode, tempreg))
tempreg = 0;
else
break;
}
}
/* Push it on the stack. */
#ifdef STACK_GROWS_DOWNWARD
decrement = UNITS_PER_WORD;
#else
decrement = - UNITS_PER_WORD;
#endif
emit_insn_before (gen_add2_insn (stack_pointer_rtx,
gen_rtx (CONST_INT, VOIDmode, -decrement)),
insn);
emit_insn_before (gen_move_insn (gen_rtx (MEM, Pmode, stack_pointer_rtx),
tempreg),
insn);
}
/* Save the regs we are supposed to save, aside from TEMPREG.
Use TEMPREG for address calculations when needed. */
for (regno = 0; regno < FIRST_PSEUDO_REGISTER; ++regno)
if (offset[regno] >= 0 && ! already_saved[regno]
&& tempreg != 0 && REGNO (tempreg) != regno)
{
rtx reg = save_reg_rtx[regno];
rtx addr1 = plus_constant (addr, offset[regno]);
rtx temp;
if (! memory_address_p (GET_MODE (reg), addr1))
{
if (GET_CODE (addr1) != PLUS)
abort ();
if (GET_CODE (XEXP (addr1, 1)) != CONST_INT
|| GET_CODE (XEXP (addr1, 0)) != REG)
abort ();
emit_insn_before (gen_move_insn (tempreg, XEXP (addr1, 0)), insn);
emit_insn_before (gen_add2_insn (tempreg, XEXP (addr1, 1)), insn);
addr1 = tempreg;
}
temp = gen_rtx (MEM, GET_MODE (reg), addr1);
emit_insn_before (gen_move_insn (temp, reg), insn);
already_saved[regno] = 1;
}
/* If we pushed TEMPREG to make it free, pop it. */
if (needpush)
{
emit_insn_before (gen_move_insn (tempreg,
gen_rtx (MEM, Pmode, stack_pointer_rtx)),
insn);
emit_insn_before (gen_add2_insn (stack_pointer_rtx,
gen_rtx (CONST_INT, VOIDmode, decrement)),
insn);
}
/* If TEMPREG itself needs saving, go back and save it.
There are plenty of free regs now, those already saved. */
if (tempreg != 0
&& offset[REGNO (tempreg)] >= 0 && ! already_saved[REGNO (tempreg)])
goto retry;
}
/* Emit a string of loads to restore the hard regs listed in
OFFSET[] from address ADDR; insert the loads after INSN.
OFFSET[reg] is -1 if reg should not be loaded, or a
suitably-aligned offset from ADDR.
The offsets actually used do not need to be those provided in
OFFSET, but should agree with whatever emit_mult_save does. */
static void
emit_mult_restore (insn, addr, offset)
rtx insn, addr;
int offset[];
{
int regno;
/* Number of regs now needing to be restored. */
int restore_count;
/* A register to use as a temporary for address calculations. */
rtx tempreg;
/* A register available for that purpose but less desirable. */
rtx maybe_tempreg;
/* A register that could be used as that temp if we push and pop it. */
rtx can_push_reg;
/* Nonzero means we need to push and pop a register to use it as TEMPREG. */
int needpush;
/* The amount the stack is decremented to save that register (if we do). */
int decrement;
/* Record which regs we restore, in case we branch to retry. */
char already_restored[FIRST_PSEUDO_REGISTER];
bzero (already_restored, sizeof already_restored);
/* Note: INSN can't be the last insn, since if it were,
no regs would live across it. */
insn = NEXT_INSN (insn);
if (insn == 0)
abort ();
/* Now we can insert before INSN.
That is convenient because we can insert them in the order
that they should ultimately appear. */
/* Hair is needed because sometimes the addresses to restore from are
not valid (offsets too big).
So we need a reg, TEMPREG, to compute addresses in.
We look first for an empty reg to use.
Sometimes no reg is empty. Then we push a reg, use it, and pop it.
If all the suitable regs need to be restored,
that strategy won't work. So we restore all but one, using that one
as a temporary. Then we jump to `retry' to restore that one,
pushing and popping another (already restored) as a temporary. */
retry:
needpush = 0;
tempreg = 0;
can_push_reg = 0;
restore_count = 0;
/* Set NEEDPUSH if any restore-addresses are not valid memory addresses.
If any register is available, record it in TEMPREG.
Otherwise, one register yet to be restored goes in MAYBE_TEMPREG,
and can be used as TEMPREG for any other regs to be restored.
If any register doesn't need restoring, record it in CAN_PUSH_REG. */
for (regno = 0; regno < FIRST_PSEUDO_REGISTER; ++regno)
{
if (offset[regno] >= 0 && ! already_restored[regno])
{
rtx reg = save_reg_rtx[regno];
rtx addr1 = plus_constant (addr, offset[regno]);
restore_count++;
if (memory_address_p (GET_MODE (reg), addr1))
needpush = 1;
/* Find a call-clobbered reg that needs restoring.
We can use it as a temporary if we defer restoring it. */
if (maybe_tempreg == 0)
{
maybe_tempreg = gen_rtx (REG, Pmode, regno);
/* Don't use it if not valid for addressing. */
if (! strict_memory_address_p (QImode, maybe_tempreg))
maybe_tempreg = 0;
}
}
/* If any call-clobbered reg is dead, put it in TEMPREG.
It can be used as a temporary at no extra cost. */
if (tempreg == 0 && call_used_regs[regno] && ! fixed_regs[regno]
&& ! offset[regno] >= 0
&& HARD_REGNO_MODE_OK (regno, Pmode))
{
tempreg = gen_rtx (REG, Pmode, regno);
/* Don't use it if not valid for addressing. */
if (! strict_memory_address_p (QImode, tempreg))
tempreg = 0;
}
/* Any non-call-clobbered reg, put in CAN_PUSH_REG.
It can be used as a temporary if we push and pop it. */
if (can_push_reg == 0 && ! call_used_regs[regno]
&& HARD_REGNO_MODE_OK (regno, Pmode))
{
can_push_reg = gen_rtx (REG, Pmode, regno);
/* Don't use it if not valid for addressing. */
if (! strict_memory_address_p (QImode, can_push_reg))
can_push_reg = 0;
}
/* Any reg we already restored can be a temporary
if we push and pop it. */
if (can_push_reg == 0 && already_restored[regno]
&& HARD_REGNO_MODE_OK (regno, Pmode))
{
can_push_reg = gen_rtx (REG, Pmode, regno);
/* Don't use it if not valid for addressing. */
if (! strict_memory_address_p (QImode, can_push_reg))
can_push_reg = 0;
}
}
/* If 2 or more regs need to be restored, use one as a temp reg
for the rest (if we need a tempreg). */
if (tempreg == 0 && maybe_tempreg != 0 && restore_count > 1)
tempreg = maybe_tempreg;
/* Clear NEEDPUSH if we already found an empty reg. */
if (tempreg != 0)
needpush = 0;
/* If we need a temp reg and none is free, make one free. */
if (needpush)
{
tempreg = can_push_reg;
/* Push it on the stack. */
#ifdef STACK_GROWS_DOWNWARD
decrement = UNITS_PER_WORD;
#else
decrement = - UNITS_PER_WORD;
#endif
emit_insn_before (gen_add2_insn (stack_pointer_rtx,
gen_rtx (CONST_INT, VOIDmode, -decrement)),
insn);
emit_insn_before (gen_move_insn (gen_rtx (MEM, Pmode, stack_pointer_rtx),
tempreg),
insn);
}
/* Restore the regs we are supposed to restore, aside from TEMPREG.
Use TEMPREG for address calculations when needed. */
for (regno = 0; regno < FIRST_PSEUDO_REGISTER; ++regno)
if (offset[regno] >= 0 && ! already_restored[regno]
&& tempreg != 0 && REGNO (tempreg) != regno)
{
rtx reg = save_reg_rtx[regno];
rtx addr1 = plus_constant (addr, offset[regno]);
rtx temp;
if (! memory_address_p (GET_MODE (reg), addr1))
{
if (GET_CODE (addr1) != PLUS)
abort ();
if (GET_CODE (XEXP (addr1, 1)) != CONST_INT
|| GET_CODE (XEXP (addr1, 0)) != REG)
abort ();
emit_insn_before (gen_move_insn (tempreg, XEXP (addr1, 0)), insn);
emit_insn_before (gen_add2_insn (tempreg, XEXP (addr1, 1)), insn);
addr1 = tempreg;
}
temp = gen_rtx (MEM, GET_MODE (reg), addr1);
emit_insn_before (gen_move_insn (reg, temp), insn);
already_restored[regno] = 1;
}
/* If we pushed TEMPREG to make it free, pop it. */
if (needpush)
{
emit_insn_before (gen_move_insn (tempreg,
gen_rtx (MEM, Pmode, stack_pointer_rtx)),
insn);
emit_insn_before (gen_add2_insn (stack_pointer_rtx,
gen_rtx (CONST_INT, VOIDmode, decrement)),
insn);
}
/* If TEMPREG itself needs restoring, go back and restore it.
We can find a reg already restored to push and use as a temporary. */
if (tempreg != 0
&& offset[REGNO (tempreg)] >= 0 && ! already_restored[REGNO (tempreg)])
goto retry;
}
/* Return the address of a new block of size SIZE on the stack.
The old save block is at ADDR; ADDR is 0 if no block exists yet. */
static rtx
grow_save_block (addr, size)
rtx addr;
int size;
{
rtx newaddr;
/* Keep the size a multiple of the main allocation unit. */
size = (((size + (BIGGEST_ALIGNMENT / BITS_PER_UNIT) - 1)
/ (BIGGEST_ALIGNMENT / BITS_PER_UNIT))
* (BIGGEST_ALIGNMENT / BITS_PER_UNIT));
/* If no save block exists yet, create one and return it. */
if (! addr)
{
save_block_size = size;
return XEXP (assign_stack_local (BLKmode, size), 0);
}
/* Get a new block and coalesce it with the old one. */
newaddr = XEXP (assign_stack_local (BLKmode, size - save_block_size), 0);
if (GET_CODE (newaddr) == PLUS
&& XEXP (newaddr, 0) == frame_pointer_rtx
&& GET_CODE (XEXP (newaddr, 1)) == CONST_INT
&& GET_CODE (addr) == PLUS
&& XEXP (addr, 0) == frame_pointer_rtx
&& GET_CODE (XEXP (addr, 1)) == CONST_INT
&& ((INTVAL (XEXP (newaddr, 1)) - INTVAL (XEXP (addr, 1))
== size - save_block_size)
|| (INTVAL (XEXP (addr, 1)) - INTVAL (XEXP (newaddr, 1))
== size - save_block_size)))
{
save_block_size = size;
if (INTVAL (XEXP (newaddr, 1)) < INTVAL (XEXP (addr, 1)))
return newaddr;
else
return addr;
}
/* They didn't coalesce, find out why */
abort ();
save_block_size = size;
return XEXP (assign_stack_local (BLKmode, size), 0);
}
/* Return a machine mode that is legitimate for hard reg REGNO
and large enough to save the whole register. */
static enum machine_mode
choose_hard_reg_mode (regno)
int regno;
{
enum reg_class class = REGNO_REG_CLASS (regno);
if (CLASS_MAX_NREGS (class, DImode) == 1
&& HARD_REGNO_MODE_OK (regno, DImode))
return DImode;
else if (CLASS_MAX_NREGS (class, DFmode) == 1
&& HARD_REGNO_MODE_OK (regno, DFmode))
return DFmode;
else if (CLASS_MAX_NREGS (class, SImode) == 1
&& HARD_REGNO_MODE_OK (regno, SImode))
return SImode;
else if (CLASS_MAX_NREGS (class, SFmode) == 1
&& HARD_REGNO_MODE_OK (regno, SFmode))
return SFmode;
else if (CLASS_MAX_NREGS (class, HImode) == 1
&& HARD_REGNO_MODE_OK (regno, HImode))
return HImode;
else
abort ();
}
|