Split Reg into vreg/hreg and add register pairs
[ghc-hetmet.git] / includes / MachRegs.h
1 /* -----------------------------------------------------------------------------
2  *
3  * (c) The GHC Team, 1998-1999
4  *
5  * Registers used in STG code.  Might or might not correspond to
6  * actual machine registers.
7  *
8  * ---------------------------------------------------------------------------*/
9
10 #ifndef MACHREGS_H
11 #define MACHREGS_H
12
13 /* This file is #included into Haskell code in the compiler: #defines
14  * only in here please.
15  */
16
17 /* 
18  * Defining NO_REGS causes no global registers to be used.  NO_REGS is
19  * typically defined by GHC, via a command-line option passed to gcc,
20  * when the -funregisterised flag is given.
21  *
22  * NB. When NO_REGS is on, calling & return conventions may be
23  * different.  For example, all function arguments will be passed on
24  * the stack, and components of an unboxed tuple will be returned on
25  * the stack rather than in registers.
26  */
27 #ifndef NO_REGS
28
29 /* NOTE: when testing the platform in this file we must test either
30  * *_HOST_ARCH and *_TARGET_ARCH, depending on whether COMPILING_GHC
31  * is set.  This is because when we're compiling the RTS and HC code,
32  * the platform we're running on is the HOST, but when compiling GHC
33  * we want to know about the register mapping on the TARGET platform.
34  */
35 #ifdef COMPILING_GHC
36 #define alpha_REGS    alpha_TARGET_ARCH
37 #define hppa1_1_REGS  hppa1_1_TARGET_ARCH
38 #define i386_REGS     i386_TARGET_ARCH
39 #define x86_64_REGS   x86_64_TARGET_ARCH
40 #define m68k_REGS     m68k_TARGET_ARCH
41 #define mips_REGS     (mipsel_TARGET_ARCH || mipseb_TARGET_ARCH)
42 #define powerpc_REGS  (powerpc_TARGET_ARCH || powerpc64_TARGET_ARCH || rs6000_TARGET_ARCH)
43 #define ia64_REGS     ia64_TARGET_ARCH
44 #define sparc_REGS    sparc_TARGET_ARCH
45 #define darwin_REGS   darwin_TARGET_OS
46 #else
47 #define alpha_REGS    alpha_HOST_ARCH
48 #define hppa1_1_REGS  hppa1_1_HOST_ARCH
49 #define i386_REGS     i386_HOST_ARCH
50 #define x86_64_REGS   x86_64_HOST_ARCH
51 #define m68k_REGS     m68k_HOST_ARCH
52 #define mips_REGS     (mipsel_HOST_ARCH || mipseb_HOST_ARCH)
53 #define powerpc_REGS  (powerpc_HOST_ARCH || powerpc64_HOST_ARCH || rs6000_HOST_ARCH)
54 #define ia64_REGS     ia64_HOST_ARCH
55 #define sparc_REGS    sparc_HOST_ARCH
56 #define darwin_REGS   darwin_HOST_OS
57 #endif
58
59 /* ----------------------------------------------------------------------------
60    Caller saves and callee-saves regs.
61    
62    Caller-saves regs have to be saved around C-calls made from STG
63    land, so this file defines CALLER_SAVES_<reg> for each <reg> that
64    is designated caller-saves in that machine's C calling convention.
65    -------------------------------------------------------------------------- */
66
67 /* -----------------------------------------------------------------------------
68    The DEC Alpha register mapping
69
70    Alpha registers
71    \tr{$9}--\tr{$14} are our ``prize'' callee-save registers.  
72    \tr{$15} is the frame pointer, and \tr{$16}--\tr{$21} are argument
73    registers.  (These are off-limits.)  We can steal some of the \tr{$22}-and-up 
74    caller-save registers provided we do the appropriate save/restore stuff.
75    
76    \tr{$f2}--\tr{$f9} are some callee-save floating-point registers.
77    
78    We cannot use \tr{$23} (aka t9), \tr{$24} (aka t10), \tr{$25} (aka
79    t11), \tr{$27} (aka pv), or \tr{$28} (aka at), because they are
80    occasionally required by the assembler to handle non-primitive
81    instructions (e.g. ldb, remq).  Sigh!
82    
83    Cheat sheet for GDB:
84    
85    GDB  here    Main map
86    ===  ====    ========
87    s5   $14     R1
88    t1   $2      R2
89    t2   $3      R3
90    t3   $4      R4
91    t4   $5      R5
92    t5   $6      R6
93    t6   $7      R7
94    t7   $8      R8
95    s0   $9      Sp
96    s2   $11     SpLim
97    s3   $12     Hp   
98    t8   $22     NCG_reserved
99    t12  $27     NCG_reserved
100    -------------------------------------------------------------------------- */
101
102 #if alpha_REGS
103 # define REG(x) __asm__("$" #x)
104
105 #  define CALLER_SAVES_R2
106 #  define CALLER_SAVES_R3
107 #  define CALLER_SAVES_R4
108 #  define CALLER_SAVES_R5
109 #  define CALLER_SAVES_R6
110 #  define CALLER_SAVES_R7
111 #  define CALLER_SAVES_R8
112   
113 #  define CALLER_SAVES_USER
114   
115 #  define REG_R1        14
116 #  define REG_R2        2
117 #  define REG_R3        3
118 #  define REG_R4        4
119 #  define REG_R5        5
120 #  define REG_R6        6
121 #  define REG_R7        7
122 #  define REG_R8        8
123   
124 #  define REG_F1        f2
125 #  define REG_F2        f3
126 #  define REG_F3        f4
127 #  define REG_F4        f5
128   
129 #  define REG_D1        f6
130 #  define REG_D2        f7
131   
132 #  define REG_Sp        9
133 #  define REG_SpLim     11
134
135 #  define REG_Hp        12
136   
137 #  define NCG_Reserved_I1 22
138 #  define NCG_Reserved_I2 27
139 #  define NCG_Reserved_F1 f29
140 #  define NCG_Reserved_F2 f30
141
142 #endif /* alpha_REGS */
143
144 /* -----------------------------------------------------------------------------
145    The HP-PA register mapping
146
147    We cater for HP-PA 1.1.
148    
149    \tr{%r0}--\tr{%r1} are special.
150    \tr{%r2} is the return pointer.
151    \tr{%r3} is the frame pointer.
152    \tr{%r4}--\tr{%r18} are callee-save registers.
153    \tr{%r19} is a linkage table register for HPUX 8.0 shared libraries.
154    \tr{%r20}--\tr{%r22} are caller-save registers.
155    \tr{%r23}--\tr{%r26} are parameter registers.
156    \tr{%r27} is a global data pointer.
157    \tr{%r28}--\tr{%r29} are temporaries.
158    \tr{%r30} is the stack pointer.
159    \tr{%r31} is a temporary.
160    
161    \tr{%fr12}--\tr{%fr15} are some callee-save floating-point registers.
162    \tr{%fr8}--\tr{%fr11} are some available caller-save fl-pt registers.
163    -------------------------------------------------------------------------- */
164
165 #if hppa1_1_REGS
166
167 #define REG(x) __asm__("%" #x)
168
169 #define REG_R1          r11
170 #define REG_R2          r12
171 #define REG_R3          r13
172 #define REG_R4          r14
173 #define REG_R5          r15
174 #define REG_R6          r16
175 #define REG_R7          r17
176 #define REG_R8          r18
177
178 #define REG_F1          fr12
179 #define REG_F2          fr12R
180 #define REG_F3          fr13
181 #define REG_F4          fr13R
182
183 #define REG_D1          fr20    /* L & R */
184 #define REG_D2          fr21    /* L & R */
185
186 #define REG_Sp          r4
187 #define REG_SpLim       r6
188
189 #define REG_Hp          r7
190
191 #define NCG_Reserved_I1 r28
192 #define NCG_Reserved_I2 r29
193 #define NCG_Reserved_F1 fr8
194 #define NCG_Reserved_F2 fr8R
195 #define NCG_Reserved_D1 fr10
196 #define NCG_Reserved_D2 fr11
197
198 #endif /* hppa */
199
200 /* -----------------------------------------------------------------------------
201    The x86 register mapping
202
203    Ok, we've only got 6 general purpose registers, a frame pointer and a
204    stack pointer.  \tr{%eax} and \tr{%edx} are return values from C functions,
205    hence they get trashed across ccalls and are caller saves. \tr{%ebx},
206    \tr{%esi}, \tr{%edi}, \tr{%ebp} are all callee-saves.
207
208    Reg     STG-Reg
209    ---------------
210    ebx     Base
211    ebp     Sp
212    esi     R1
213    edi     Hp
214
215    Leaving SpLim out of the picture.
216    -------------------------------------------------------------------------- */
217
218
219 #if i386_REGS
220
221 #define REG(x) __asm__("%" #x)
222
223 #ifndef not_doing_dynamic_linking
224 #define REG_Base    ebx
225 #endif
226 #define REG_Sp      ebp
227
228 #ifndef STOLEN_X86_REGS
229 #define STOLEN_X86_REGS 4
230 #endif
231
232 #if STOLEN_X86_REGS >= 3
233 # define REG_R1     esi
234 #endif
235
236 #if STOLEN_X86_REGS >= 4
237 # define REG_Hp     edi
238 #endif
239
240 #define MAX_REAL_VANILLA_REG 1  /* always, since it defines the entry conv */
241 #define MAX_REAL_FLOAT_REG   0
242 #define MAX_REAL_DOUBLE_REG  0
243 #define MAX_REAL_LONG_REG    0
244
245 #endif /* iX86 */
246
247 /* -----------------------------------------------------------------------------
248   The x86-64 register mapping
249
250   %rax          caller-saves, don't steal this one
251   %rbx          YES
252   %rcx          arg reg, caller-saves
253   %rdx          arg reg, caller-saves
254   %rsi          arg reg, caller-saves
255   %rdi          arg reg, caller-saves
256   %rbp          YES (our *prime* register)
257   %rsp          (unavailable - stack pointer)
258   %r8           arg reg, caller-saves
259   %r9           arg reg, caller-saves
260   %r10          caller-saves
261   %r11          caller-saves
262   %r12          YES
263   %r13          YES
264   %r14          YES
265   %r15          YES
266
267   %xmm0-7       arg regs, caller-saves
268   %xmm8-15      caller-saves
269
270   Use the caller-saves regs for Rn, because we don't always have to
271   save those (as opposed to Sp/Hp/SpLim etc. which always have to be
272   saved).
273
274   --------------------------------------------------------------------------- */
275
276 #if x86_64_REGS
277
278 #define REG(x) __asm__("%" #x)
279
280 #define REG_Base  r13
281 #define REG_Sp    rbp
282 #define REG_Hp    r12
283 #define REG_R1    rbx
284 #define REG_R2    r14
285 #define REG_R3    rsi
286 #define REG_R4    rdi
287 #define REG_R5    r8
288 #define REG_R6    r9
289 #define REG_SpLim r15
290
291 #define REG_F1    xmm1
292 #define REG_F2    xmm2
293 #define REG_F3    xmm3
294 #define REG_F4    xmm4
295
296 #define REG_D1    xmm5
297 #define REG_D2    xmm6
298
299 #define CALLER_SAVES_R3
300 #define CALLER_SAVES_R4
301 #define CALLER_SAVES_R5
302 #define CALLER_SAVES_R6
303
304 #define CALLER_SAVES_F1
305 #define CALLER_SAVES_F2
306 #define CALLER_SAVES_F3
307 #define CALLER_SAVES_F4
308
309 #define CALLER_SAVES_D1
310 #define CALLER_SAVES_D2
311
312 #define MAX_REAL_VANILLA_REG 6
313 #define MAX_REAL_FLOAT_REG   4
314 #define MAX_REAL_DOUBLE_REG  2
315 #define MAX_REAL_LONG_REG    0
316
317 #endif /* x86_64 */
318
319 /* -----------------------------------------------------------------------------
320    The Motorola 680x0 register mapping
321
322    A Sun3 (mc680x0) has eight address registers, \tr{a0} to \tr{a7}, and
323    eight data registers, \tr{d0} to \tr{d7}.  Address operations have to
324    be done through address registers; data registers are used for
325    comparison values and data.
326    
327    Here's the register-usage picture for m68k boxes with GCC.
328
329    \begin{tabular}{ll}
330    a0 & used directly by GCC \\
331    a1 & used directly by GCC \\
332    \\
333    a2..a5 & callee-saved: available for STG registers \\
334    & (a5 may be special, ``global'' register for PIC?) \\
335    \\
336    a6 & C-stack frame pointer \\
337    a7 & C-stack pointer \\
338    \\
339    d0 & used directly by GCC \\
340    d1 & used directly by GCC \\
341    d2 & really needed for local optimisation by GCC \\
342    \\
343    d3..d7 & callee-saved: available for STG registers
344    \\
345    fp0 & call-clobbered \\
346    fp1 & call-clobbered \\
347    fp2..fp7 & callee-saved: available for STG registers
348    \end{tabular}
349    -------------------------------------------------------------------------- */
350
351 #if m68k_REGS
352
353 #define REG(x) __asm__(#x)
354
355 #define REG_Base        a2
356
357 #define REG_Sp          a3
358 #define REG_SpLim       d3
359
360 #define REG_Hp          d4
361
362 #define REG_R1          a5
363 #define REG_R2          d6
364 #define MAX_REAL_VANILLA_REG 2
365
366 #define REG_Ret         d7
367
368 #define REG_F1          fp2
369 #define REG_F2          fp3
370 #define REG_F3          fp4
371 #define REG_F4          fp5
372
373 #define REG_D1          fp6
374 #define REG_D2          fp7
375
376 #endif /* m68k */
377
378 /* -----------------------------------------------------------------------------
379    The DECstation (MIPS) register mapping
380
381    Here's at least some simple stuff about registers on a MIPS.
382    
383    \tr{s0}--\tr{s7} are callee-save integer registers; they are our
384    ``prize'' stolen registers.  There is also a wad of callee-save
385    floating-point registers, \tr{$f20}--\tr{$f31}; we'll use some of
386    those.
387    
388    \tr{t0}--\tr{t9} are caller-save (``temporary?'') integer registers.
389    We can steal some, but we might have to save/restore around ccalls.
390    -------------------------------------------------------------------------- */
391
392 #if mips_REGS
393
394 #define REG(x) __asm__("$" #x)
395
396 #define CALLER_SAVES_R5
397 #define CALLER_SAVES_R6
398 #define CALLER_SAVES_R7
399 #define CALLER_SAVES_R8
400
401 #define CALLER_SAVES_USER
402
403 #define REG_R1          16
404 #define REG_R2          17
405 #define REG_R3          18
406 #define REG_R4          19
407 #define REG_R5          12
408 #define REG_R6          13
409 #define REG_R7          14
410 #define REG_R8          15
411
412 #define REG_F1          f20
413 #define REG_F2          f22
414 #define REG_F3          f24
415 #define REG_F4          f26
416
417 #define REG_D1          f28
418 #define REG_D2          f30
419
420 #define REG_Sp          20
421 #define REG_SpLim       21
422
423 #define REG_Hp          22
424
425 #define REG_Base        30
426
427 #endif /* mipse[lb] */
428
429 /* -----------------------------------------------------------------------------
430    The PowerPC register mapping
431
432    0            system glue?    (caller-save, volatile)
433    1            SP              (callee-save, non-volatile)
434    2            AIX, powerpc64-linux:
435                     RTOC        (a strange special case)
436                 darwin:         
437                                 (caller-save, volatile)
438                 powerpc32-linux:
439                                 reserved for use by system
440                     
441    3-10         args/return     (caller-save, volatile)
442    11,12        system glue?    (caller-save, volatile)
443    13           on 64-bit:      reserved for thread state pointer
444                 on 32-bit:      (callee-save, non-volatile)
445    14-31                        (callee-save, non-volatile)
446    
447    f0                           (caller-save, volatile)
448    f1-f13       args/return     (caller-save, volatile)
449    f14-f31                      (callee-save, non-volatile)
450    
451    \tr{14}--\tr{31} are wonderful callee-save registers on all ppc OSes.
452    \tr{0}--\tr{12} are caller-save registers.
453    
454    \tr{%f14}--\tr{%f31} are callee-save floating-point registers.
455    
456    We can do the Whole Business with callee-save registers only!
457    -------------------------------------------------------------------------- */
458
459 #if powerpc_REGS
460
461 #define REG(x) __asm__(#x)
462
463 #define REG_R1          r14
464 #define REG_R2          r15
465 #define REG_R3          r16
466 #define REG_R4          r17
467 #define REG_R5          r18
468 #define REG_R6          r19
469 #define REG_R7          r20
470 #define REG_R8          r21
471
472 #if darwin_REGS
473
474 #define REG_F1          f14
475 #define REG_F2          f15
476 #define REG_F3          f16
477 #define REG_F4          f17
478
479 #define REG_D1          f18
480 #define REG_D2          f19
481
482 #else
483
484 #define REG_F1          fr14
485 #define REG_F2          fr15
486 #define REG_F3          fr16
487 #define REG_F4          fr17
488
489 #define REG_D1          fr18
490 #define REG_D2          fr19
491
492 #endif
493
494 #define REG_Sp          r22
495 #define REG_SpLim       r24
496
497 #define REG_Hp          r25
498
499 #define REG_Base        r27
500
501 #endif /* powerpc */
502
503 /* -----------------------------------------------------------------------------
504    The IA64 register mapping
505
506    We place the general registers in the locals area of the register stack,
507    so that the call mechanism takes care of saving them for us.  We reserve
508    the first 16 for gcc's use - since gcc uses the highest used register to
509    determine the register stack frame size, this gives us a constant size
510    register stack frame.
511    
512    \tr{f16-f32} are the callee-saved floating point registers.
513    -------------------------------------------------------------------------- */
514
515 #if ia64_REGS
516
517 #define REG(x) __asm__(#x)
518
519 #define REG_R1          loc16
520 #define REG_R2          loc17
521 #define REG_R3          loc18
522 #define REG_R4          loc19
523 #define REG_R5          loc20
524 #define REG_R6          loc21
525 #define REG_R7          loc22
526 #define REG_R8          loc23
527
528 #define REG_F1          f16
529 #define REG_F2          f17
530 #define REG_F3          f18
531 #define REG_F4          f19
532
533 #define REG_D1          f20
534 #define REG_D2          f21
535
536 #define REG_Sp          loc24
537 #define REG_SpLim       loc26
538
539 #define REG_Hp          loc27
540
541 #endif /* ia64 */
542
543 /* -----------------------------------------------------------------------------
544    The Sun SPARC register mapping
545
546    !! IMPORTANT: if you change this register mapping you must also update
547                  compiler/nativeGen/SPARC/Regs.hs. That file handles the
548                  mapping for the NCG. This one only affects via-c code.
549
550    The SPARC register (window) story: Remember, within the Haskell
551    Threaded World, we essentially ``shut down'' the register-window
552    mechanism---the window doesn't move at all while in this World.  It
553    *does* move, of course, if we call out to arbitrary~C...
554    
555    The %i, %l, and %o registers (8 each) are the input, local, and
556    output registers visible in one register window.  The 8 %g (global)
557    registers are visible all the time.
558    
559       zero: always zero
560    scratch: volatile across C-fn calls. used by linker.
561        app: usable by application
562     system: reserved for system
563  
564      alloc: allocated to in the register allocator, intra-closure only
565    
566                 GHC usage     v8 ABI        v9 ABI
567    Global
568      %g0        zero        zero          zero
569      %g1        alloc       scratch       scrach
570      %g2        alloc       app           app
571      %g3        alloc       app           app
572      %g4        alloc       app           scratch
573      %g5                    system        scratch    
574      %g6                    system        system
575      %g7                    system        system
576
577    Output: can be zapped by callee
578      %o0-o5     alloc       caller saves
579      %o6                    C stack ptr
580      %o7                    C ret addr
581    
582    Local: maintained by register windowing mechanism
583      %l0        alloc        
584      %l1        R1
585      %l2        R2
586      %l3        R3
587      %l4        R4
588      %l5        R5
589      %l6        alloc
590      %l7        alloc
591
592    Input
593      %i0        Sp
594      %i1        Base
595      %i2        SpLim
596      %i3        Hp
597      %i4        alloc
598      %i5        R6
599      %i6                    C frame ptr
600      %i7                    C ret addr
601      
602    The paired nature of the floating point registers causes complications for
603    the native code generator.  For convenience, we pretend that the first 22
604    fp regs %f0 .. %f21 are actually 11 double regs, and the remaining 10 are
605    float (single) regs.  The NCG acts accordingly.  That means that the 
606    following FP assignment is rather fragile, and should only be changed
607    with extreme care.  The current scheme is:
608
609       %f0 /%f1    FP return from C
610       %f2 /%f3    D1
611       %f4 /%f5    D2
612       %f6 /%f7    ncg double spill tmp #1
613       %f8 /%f9    ncg double spill tmp #2
614       %f10/%f11   allocatable
615       %f12/%f13   allocatable
616       %f14/%f15   allocatable
617       %f16/%f17   allocatable
618       %f18/%f19   allocatable
619       %f20/%f21   allocatable
620
621       %f22        F1
622       %f23        F2
623       %f24        F3
624       %f25        F4
625       %f26        ncg single spill tmp #1
626       %f27        ncg single spill tmp #2
627       %f28        allocatable
628       %f29        allocatable
629       %f30        allocatable
630       %f31        allocatable
631
632    -------------------------------------------------------------------------- */
633
634 #if sparc_REGS
635
636 #define REG(x) __asm__("%" #x)
637
638 #define CALLER_SAVES_USER
639
640 #define CALLER_SAVES_F1
641 #define CALLER_SAVES_F2
642 #define CALLER_SAVES_F3
643 #define CALLER_SAVES_F4
644 #define CALLER_SAVES_D1
645 #define CALLER_SAVES_D2
646
647 #define REG_R1          l1
648 #define REG_R2          l2
649 #define REG_R3          l3
650 #define REG_R4          l4
651 #define REG_R5          l5
652 #define REG_R6          i5
653
654 #define REG_F1          f22
655 #define REG_F2          f23
656 #define REG_F3          f24
657 #define REG_F4          f25
658
659 /* for each of the double arg regs, 
660    Dn_2 is the high half. */
661    
662 #define REG_D1          f2
663 #define REG_D1_2        f3
664
665 #define REG_D2          f4
666 #define REG_D2_2        f5
667
668 #define REG_Sp          i0
669 #define REG_SpLim       i2
670
671 #define REG_Hp          i3
672
673 #define REG_Base        i1
674
675 /*
676 #define NCG_SpillTmp_I1 g1
677 #define NCG_SpillTmp_I2 g2
678 #define NCG_SpillTmp_F1 f26
679 #define NCG_SpillTmp_F2 f27
680 #define NCG_SpillTmp_D1 f6
681 #define NCG_SpillTmp_D2 f8
682 */
683
684 #define NCG_FirstFloatReg f22
685
686 #endif /* sparc */
687
688 #endif /* NO_REGS */
689
690 /* -----------------------------------------------------------------------------
691  * These constants define how many stg registers will be used for
692  * passing arguments (and results, in the case of an unboxed-tuple
693  * return).
694  *
695  * We usually set MAX_REAL_VANILLA_REG and co. to be the number of the
696  * highest STG register to occupy a real machine register, otherwise
697  * the calling conventions will needlessly shuffle data between the
698  * stack and memory-resident STG registers.  We might occasionally
699  * set these macros to other values for testing, though.
700  *
701  * Registers above these values might still be used, for instance to
702  * communicate with PrimOps and RTS functions.
703  */
704
705 #ifndef MAX_REAL_VANILLA_REG
706 #  if   defined(REG_R8)
707 #  define MAX_REAL_VANILLA_REG 8
708 #  elif defined(REG_R7)
709 #  define MAX_REAL_VANILLA_REG 7
710 #  elif defined(REG_R6)
711 #  define MAX_REAL_VANILLA_REG 6
712 #  elif defined(REG_R5)
713 #  define MAX_REAL_VANILLA_REG 5
714 #  elif defined(REG_R4)
715 #  define MAX_REAL_VANILLA_REG 4
716 #  elif defined(REG_R3)
717 #  define MAX_REAL_VANILLA_REG 3
718 #  elif defined(REG_R2)
719 #  define MAX_REAL_VANILLA_REG 2
720 #  elif defined(REG_R1)
721 #  define MAX_REAL_VANILLA_REG 1
722 #  else
723 #  define MAX_REAL_VANILLA_REG 0
724 #  endif
725 #endif
726
727 #ifndef MAX_REAL_FLOAT_REG
728 #  if   defined(REG_F4)
729 #  define MAX_REAL_FLOAT_REG 4
730 #  elif defined(REG_F3)
731 #  define MAX_REAL_FLOAT_REG 3
732 #  elif defined(REG_F2)
733 #  define MAX_REAL_FLOAT_REG 2
734 #  elif defined(REG_F1)
735 #  define MAX_REAL_FLOAT_REG 1
736 #  else
737 #  define MAX_REAL_FLOAT_REG 0
738 #  endif
739 #endif
740
741 #ifndef MAX_REAL_DOUBLE_REG
742 #  if   defined(REG_D2)
743 #  define MAX_REAL_DOUBLE_REG 2
744 #  elif defined(REG_D1)
745 #  define MAX_REAL_DOUBLE_REG 1
746 #  else
747 #  define MAX_REAL_DOUBLE_REG 0
748 #  endif
749 #endif
750
751 #ifndef MAX_REAL_LONG_REG
752 #  if   defined(REG_L1)
753 #  define MAX_REAL_LONG_REG 1
754 #  else
755 #  define MAX_REAL_LONG_REG 0
756 #  endif
757 #endif
758
759 /* define NO_ARG_REGS if we have no argument registers at all (we can
760  * optimise certain code paths using this predicate).
761  */
762 #if MAX_REAL_VANILLA_REG < 2
763 #define NO_ARG_REGS 
764 #else
765 #undef NO_ARG_REGS
766 #endif
767
768 #endif /* MACHREGS_H */