aboutsummaryrefslogtreecommitdiff
path: root/sim/ppc/std-config.h
blob: 07018bfaa1683a18a8b584b2f41635145871abc7 (plain)
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
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
/*  This file is part of the program psim.

    Copyright (C) 1994-1995, Andrew Cagney <cagney@highland.com.au>

    This program 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 2 of the License, or
    (at your option) any later version.

    This program 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 this program; if not, write to the Free Software
    Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
 
    */


#ifndef _CONFIG_H_
#define _CONFIG_H_


/* endianness of the host/target:

   If the build process is aware (at compile time) of the endianness
   of the host/target it is able to eliminate slower generic endian
   handling code.

   If ENDIAN_OK is true then no byte swapping is required.  If it is
   false, copy-in / copy-out functions assume that data should be byte
   reversed as part of the copy. */

#define WITH_HOST_BYTE_ORDER		0 /*unknown*/
#define WITH_TARGET_BYTE_ORDER		0 /*unknown*/

extern int current_host_byte_order;
extern int current_target_byte_order;
#define CURRENT_HOST_BYTE_ORDER (WITH_HOST_BYTE_ORDER \
				 ? WITH_HOST_BYTE_ORDER \
				 : current_host_byte_order)
#define CURRENT_TARGET_BYTE_ORDER (WITH_TARGET_BYTE_ORDER \
				   ? WITH_TARGET_BYTE_ORDER \
				   : current_target_byte_order)


/* SMP support:

   Sets a limit on the number of processors that can be simulated.  If
   WITH_SMP is set to zero (0), the simulator is restricted to
   suporting only on processor (and as a consequence leaves the SMP
   code out of the build process). */

#ifndef WITH_SMP
#define WITH_SMP                        0
#endif


/* Word size of host/target:

   Set these according to your host and target requirements.  At this
   point in time, I've only compiled (not run) for a 64bit and never
   built for a 64bit host.  This will always remain a compile time
   option */

#ifndef WITH_TARGET_WORD_BITSIZE
#define WITH_TARGET_WORD_BITSIZE        32 /* compiled only */
#endif
#ifndef WITH_HOST_WORD_BITSIZE
#define WITH_HOST_WORD_BITSIZE		32 /* 64bit ready? */
#endif


/* Program environment:

   Two environments are available. VEA (or virtual environment
   architecture) and OEA (or operating environment architecture).  The
   former is the environment that a user program would see while the
   latter is the environment as seen by an operating system.  By
   setting these to specific values, the build process is able to
   eliminate non relevent environment code

   CURRENT_ENVIRONMENT specifies which of vea or oea is required for
   the current runtime. */

#define WITH_ENVIRONMENT		0
#define VIRTUAL_ENVIRONMENT		1
#define OPERATING_ENVIRONMENT		2

extern int current_environment;
#define CURRENT_ENVIRONMENT (WITH_ENVIRONMENT \
			     ? WITH_ENVIRONMENT \
			     : current_environment)


/* Optional VEA/OEA code: 

   The below, required for the OEA model may also be included in the
   VEA model however, as far as I can tell only make things
   slower... */


/* Events.  Devices modeling real H/W need to be able to efficiently
   schedule things to do at known times in the future.  The event
   queue implements this.  Unfortunatly this adds the need to check
   for any events once each full instruction cycle. */

#define WITH_EVENTS                     (WITH_ENVIRONMENT != VIRTUAL_ENVIRONMENT)


/* Time base:

   The PowerPC architecture includes the addition of both a time base
   register and a decrement timer.  Like events adds to the overhead
   of of some instruction cycles. */

#ifndef WITH_TIME_BASE
#define WITH_TIME_BASE			1
#endif


/* Callback/Default Memory.

   Core includes a builtin memory type (raw_memory) that is
   implemented using an array.  raw_memory does not require any
   additional functions etc.

   Callback memory is where the core calls a core device for the data
   it requires.

   Default memory is an extenstion of this where for addresses that do
   not map into either a callback or core memory range a default map
   can be used.

   The OEA model uses callback memory for devices and default memory
   for buses.

   The VEA model uses callback memory to capture `page faults'.

   While it may be possible to eliminate callback/default memory (and
   hence also eliminate an additional test per memory fetch) it
   probably is not worth the effort.

   BTW, while raw_memory could have been implemented as a callback,
   profiling has shown that there is a biger win (at least for the
   x86) in eliminating a function call for the most common
   (raw_memory) case. */

#define WITH_CALLBACK_MEMORY		1


/* Alignment:

   The PowerPC may or may not handle miss aligned transfers.  An
   implementation normally handles miss aligned transfers in big
   endian mode but generates an exception in little endian mode.

   This model.  Instead allows both little and big endian modes to
   either take exceptions or handle miss aligned transfers.

   If 0 is specified then for big-endian mode miss alligned accesses
   are permitted (NONSTRICT_ALIGNMENT) while in little-endian mode the
   processor will fault on them (STRICT_ALIGNMENT). */

#define NONSTRICT_ALIGNMENT    		1
#define STRICT_ALIGNMENT	       	2

#ifndef WITH_ALIGNMENT
#define WITH_ALIGNMENT     		0
#endif
extern int current_alignment;
#define CURRENT_ALIGNMENT (WITH_ALIGNMENT \
			   ? WITH_ALIGNMENT \
			   : current_alignment)


/* Floating point suport:

   Still under development. */

#define SOFT_FLOATING_POINT		1
#define HARD_FLOATING_POINT		2

#ifndef WITH_FLOATING_POINT
#define WITH_FLOATING_POINT		HARD_FLOATING_POINT
#endif
extern int current_floating_point;
#define CURRENT_FLOATING_POINT (WITH_FLOATING_POINT \
				? WITH_FLOATING_POINT \
				: current_floating_point)


/* Debugging:

   Control the inclusion of debugging code. */

/* Include the tracing code.  Disabling this eliminates all tracing
   code */

#ifndef WITH_TRACE
#define WITH_TRACE                      1
#endif

/* include code that checks assertions scattered through out the
   program */

#ifndef WITH_ASSERT
#define WITH_ASSERT			1
#endif

/* include profiling code that doesn't yet exist */

#ifndef WITH_PROFILE
#define WITH_PROFILE			1
#endif


/* INSTRUCTION TABLE CODE GENERATION:

   The program gen takes the files ppc.instructions and spr.table and
   creates from them code that provides:

   o	instruction decode and issue
   o	spr information

   The program gen does this according to the configuration
   information that follows. */


/* Line numbering of generated code:

   When generating the semantic and idecode files, gen can also output
   line number information (w.r.t. ppc.instructions).  It may be
   useful to disable this if you suspect that gen.c is incorrectly
   generating itermediate code files.  */

#ifndef WITH_LINE_NUMBERS
#define WITH_LINE_NUMBERS               1
#endif


/* Instruction cache:

   Instead of the idecode routine calling the semantic function
   directly, idecode can instead return a descriptor of the
   instruction (cache entry).

   With level one caching, idecode just returns the address of the
   semantic function.  With level two caching, in addition to this,
   the idecode routine decodes key fields within the instruction and
   also enters them into the cache.  The table IDECODE_CACHE_RULES
   controls what goes into the cache.*/

#ifndef	WITH_IDECODE_CACHE
#define WITH_IDECODE_CACHE              0
#endif
#ifndef	IDECODE_CACHE_SIZE
#define IDECODE_CACHE_SIZE		1024
#endif


/* Semantic code expansion:

   For a given instruction there is the potential to improve
   performance bo creating copies of the instructions code for one or
   more of its possible variations.  Eg branch being relative.  This
   macro determines of semantic functions should be expanded.  How
   well they are expanded is determined by the table
   WITH_IDECODE_OPCODE_RULES. */

#ifndef WITH_IDECODE_EXPAND_SEMANTICS
#define WITH_IDECODE_EXPAND_SEMANTICS   0
#endif


/* SPR database:

   The attributes of the SPR's are kept in a `lookup table'.  This
   table can be implemented as either a true table or a switch
   statement.

   A swith statement may be a performance advantage if the SPR's are
   known at compile time.  The compiler is then able to eliminate the
   switch. */

#ifndef WITH_SPREG_LOOKUP_TABLE
#define WITH_SPREG_LOOKUP_TABLE         1
#endif


/* Instruction decode:

   The table that follows is used by gen to construct a decision tree
   that can identify each possible instruction.  Gen then outputs this
   decision tree as (according to config) a table or switch statement
   as the function idecode.

   In parallel to this, as mentioned above, WITH_EXPANDED_SEMANTICS
   determines of the semantic functions themselves should be expanded
   in a similar way.

   The table contains the following entries:

   <valid>

   Must be 1 for the entry to be considered.  The last entry must be
   zero.
	
   <first>
   <last>

   Range of bits (within the instruction) that should be searched for
   an instruction field.  Within such ranges, gen looks for opcodes
   (constants), registers (strings) and reserved bits (slash) and
   according to the rules that follows includes or excludes them from
   a possible instruction field.

   <force_first>
   <force_last>

   If an instructioin field was found, enlarge the field size so that
   it is forced to at least include bits starting from <force_first>
   (<force_last>).  To stop this occuring, use <force_first> = <last>
   + 1 and <force_last> = <first> - 1.

   <force_slash>

   Treat `/' fields as a constant instead of variable when looking for
   an instruction field.

   <force_expansion>

   Treat any contained register (string) fields as constant when
   determining the instruction field.  For the instruction decode (and
   controled by IDECODE_EXPAND_SEMANTICS) this forces the expansion of
   what would otherwize be non constant bits of an instruction.

   <use_switch>

   Should this table be expanded using a switch statement (val 1) and
   if so, should it be padded with entries so as to force the compiler
   to generate a jump table (val 2).

   <special_mask>
   <special_value>
   <special_rule>

   Special rule to fine tune how specific (or groups) of instructions
   are expanded.  The applicability of the rule is determined by

     <special_mask> != 0 && (instruction> & <special_mask>) == <special_value>

   Where <instruction> is obtained by looking only at constant fields
   with in an instructions spec.  When determining an expansion, the
   rule is only considered when a node contains a single instruction.
   <special_rule> can be any of:

        0: for this instruction, expand by earlier rules
   	1: expand bits <force_low> .. <force_hi> only
	2: boolean expansion of only zero/non-zero cases

   Ok? */


#define WITH_IDECODE_OPCODE_RULES { \
  { 1,  0,  5,  0,  5, 0, 0,                1, 0x00000000, 0x00000000, 0 }, \
  { 1, 21, 31, 32, -1, 0, 0,                1, 0x00000000, 0x00000000, 0 }, \
  { 0 } \
}


/* Instruction unpacking:

   Once the instruction has been decoded, the register (and other)
   fields within the instruction need to be extracted.

   The table that follows determines how each field should be treated.
   Importantly it considers the case where the extracted field is to
   be used immediatly or stored in an instruction cache.

   <valid>

   Zero marks the end of the table.  More importantly 1. indicates
   that the entry is valid and can be cached. 2. indicates that that
   the entry is valid but can not be cached.

   <old_name>

   The field name as given in the instruction spec.

   <new_name>

   A name for <old_name> once it has been extracted from the
   instructioin (and possibly stored in the instruction cache).

   <type>

   String specifying the storage type for <new_name> (the extracted
   field>.

   <expression>

   Specifies how to get <new_name> from <old_name>.  If null, old and
   new name had better be the same. */

#define WITH_IDECODE_CACHE_RULES { \
  { 1, "RA", "RA", 0, 0 }, \
  { 1, "RA", "rA", "signed_word *", \
      "(cpu_registers(processor)->gpr + RA)" }, \
  { 1, "RT", "RT", 0, 0 }, \
  { 1, "RT", "rT", "signed_word *", \
      "(cpu_registers(processor)->gpr + RT)" }, \
  { 2, "RS", "RS", 0, 0 }, \
  { 1, "RS", "rS", "signed_word *", \
      "(cpu_registers(processor)->gpr + RS)" }, \
  { 2, "RB", "RB", 0, 0 }, \
  { 1, "RB", "rB", "signed_word *", \
      "(cpu_registers(processor)->gpr + RB)" }, \
  { 2, "FRA", "FRA", 0, 0 }, \
  { 1, "FRA", "frA", "unsigned64 *", \
      "(cpu_registers(processor)->fpr + FRA)" }, \
  { 2, "FRB", "FRB", 0, 0 }, \
  { 1, "FRB", "frB", "unsigned64 *", \
      "(cpu_registers(processor)->fpr + FRB)" }, \
  { 2, "FRC", "FRC", 0, 0 }, \
  { 1, "FRC", "frC", "unsigned64 *", \
      "(cpu_registers(processor)->fpr + FRC)" }, \
  { 2, "FRS", "FRS", 0, 0 }, \
  { 1, "FRS", "frS", "unsigned64 *", \
      "(cpu_registers(processor)->fpr + FRS)" }, \
  { 2, "FRT", "FRT", 0, 0 }, \
  { 1, "FRT", "frT", "unsigned64 *", \
      "(cpu_registers(processor)->fpr + FRT)" }, \
  { 1, "SI", "EXTS_SI", "unsigned_word", \
      "((signed_word)(signed16)instruction)" }, \
  { 2, "BI", "BI", 0, 0 }, \
  { 1, "BI", "BIT32_BI", 0, \
      "BIT32(BI)" }, \
  { 2, "BA", "BA", 0, 0 }, \
  { 1, "BA", "BIT32_BA", 0, \
       "BIT32(BA)" }, \
  { 2, "BB", "BB", 0, 0 }, \
  { 1, "BB", "BIT32_BB", 0, \
      "BIT32(BB)" }, \
  { 1, "BD", "EXTS_BD_0b00", "unsigned_word", \
      "(((signed_word)(signed16)instruction) & ~3)" }, \
/*{ 1, "BD", "CIA_plus_EXTS_BD_0b00", "unsigned_word", */ \
/*    "CIA + EXTS(BD_0b00)" }, */ \
  { 1, "LI", "EXTS_LI_0b00", "unsigned_word", \
      "((((signed_word)(signed32)(instruction << 6)) >> 6) & ~0x3)" }, \
  { 1, "D", "EXTS_D", "unsigned_word", \
      "((signed_word)(signed16)(instruction))" }, \
  { 1, "DS", "EXTS_DS_0b00", "unsigned_word", \
      "(((signed_word)(signed16)instruction) & ~0x3)" }, \
  { 0 } \
};



/* INLINE CODE SELECTION:

   GCC -O3 attempts to inline any function or procedure in scope.  The
   options below facilitate fine grained control over what is and what
   isn't made inline.  For instance it can control things down to a
   specific modules static routines.  This control is implemented in
   two parts.  Doing this allows the compiler to both eliminate the
   overhead of function calls and (as a consequence) also eliminate
   further dead code.

   Experementing with CISC (x86) I've found that I can achieve an
   order of magintude speed improvement (x3-x5).  In the case of RISC
   (sparc) while the performance gain isn't as great it is still
   significant.

   Part One - Static functions: It is possible to control how static
   functions within each module are to be compiled.  On a per module
   or global basis, it is possible to specify that a modules static
   functions should be compiled inline.  This is controled by the the
   macro's STATIC_INLINE and INLINE_STATIC_<module>.

   Part Two - External functions: Again it is possible to allow the
   inlining of calls to external functions.  This is far more
   complicated and much heaver on the compiler.  In this case, it is
   controled by the <module>_INLINE macro's.  Where each can have a
   value:

      0  ppc.c should call external module

      1  ppc.c should have local copy (and hence possibly facilitate
         the in lineing of that modules external calls)

      2  ppc.c should inline this module

   Finally, this is not for the faint harted.  I've seen GCC get up to
   200mb trying to compile what this can create */

/* Your compilers inline reserved word */

#ifndef INLINE
#if defined(__GNUC__) && defined(__OPTIMIZE__)
#define INLINE __inline__
#else
#define INLINE /*inline*/
#endif
#endif

/* Default prefix for static functions */

#ifndef STATIC_INLINE
#define STATIC_INLINE static INLINE
#endif

/* Default macro to control several of the inlines */

#ifndef DEFAULT_INLINE
#define	DEFAULT_INLINE			0
#endif

/* Code that does byte swapping used on any memory access */

#ifndef ENDIAN_INLINE
#define ENDIAN_INLINE			DEFAULT_INLINE
#endif

/* Instruction cache if in use */

#if 0 /*DNE*/
#ifndef ICACHE_INLINE
#define ICACHE_INLINE			0
#endif
#endif

/* Given a translated address, core maps it onto either simulator data
   or a function call, this is performed once for each
   data/instruction access */


#ifndef CORE_INLINE
#define CORE_INLINE			DEFAULT_INLINE
#endif


/* The cpu object.  May things call upon this module to manipulate
   each cpu object for instance register updates (from semantics) or
   instruction execution from psim */

#ifndef VM_INLINE
#define VM_INLINE			DEFAULT_INLINE
#endif

/* Physical memory is implemented using the memory map module */

#ifndef CPU_INLINE
#define CPU_INLINE			DEFAULT_INLINE
#endif

/* handle the queue of events to happen in the future */

#ifndef EVENTS_INLINE
#define EVENTS_INLINE			DEFAULT_INLINE
#endif

/* not so important register manipulation code.  Most important
   register operations are performed directly on the register file */

#ifndef REGISTERS_INLINE
#define REGISTERS_INLINE		DEFAULT_INLINE
#endif

/* interrupt handling code */

#ifndef INTERRUPTS_INLINE
#define INTERRUPTS_INLINE		DEFAULT_INLINE
#endif

/* device code. While possibly important, this isn't as critical as
   the cpu/memory path

   There seems to be some problem with making either device_tree or
   devices inline.  It reports the message:
   device_tree_find_node() not a leaf  */

#ifndef DEVICE_TREE_INLINE
#define DEVICE_TREE_INLINE		0
#endif

#ifndef DEVICES_INLINE
#define DEVICES_INLINE			0
#endif

/* Special Purpose Register tables.  Provide information on the
   attributes of given SPR's. */

#ifndef SPREG_INLINE
#define SPREG_INLINE			DEFAULT_INLINE
#endif

/* Functions modeling the semantics of each instruction.  Two cases to
   consider, firstly of idecode is implemented with a switch then this
   allows the idecode function to inline each semantic function
   (avoiding a call).  The second case is when idecode is using a
   table, even then while the semantic functions can't be inlined,
   setting it to one still enables each semantic function to inline
   anything they call (if that code is marked for being inlined).

   WARNING: you need lots (like 200mb of swap) of swap.  Setting this
   to 1 is useful when using a table as it enables the sematic code to
   inline all of their called functions */

#ifndef SEMANTICS_INLINE
#define SEMANTICS_INLINE		0
#endif

/* Functions that decode an instruction.  Called by the cpu module.
   Part of the performance critical fetch - decode - issue sequence */

#ifndef IDECODE_INLINE
#define IDECODE_INLINE			DEFAULT_INLINE
#endif



/* If you're confused by the above, check out some of the generic
   configurations below. */


#if 0
/* Allow the expansion of the semantic functions.  That is, if the
   branch instruction is called with AA=0 and AA=1, generate separate
   functions for each case */

#undef WITH_IDECODE_EXPAND_SEMANTICS
#define WITH_IDECODE_EXPAND_SEMANTICS 1

#undef WITH_IDECODE_OPCODE_RULES
#define WITH_IDECODE_OPCODE_RULES { \
  { 1,  0,  5,  0,  5, 0, 0,                0, 0x00000000, 0x00000000, 0 }, \
  { 1, 21, 31, 32, -1, 0, "OE,LR,AA,Rc,LK", 0, 0x00000000, 0x00000000, 0 }, \
  { 1,  6,  9,  6,  9, 0, "BO",             0, 0xfc000000, 0x40000000, 1 }, \
  { 1, 11, 15, 11, 15, 0, "RA",             0, 0xfc000000, 0x38000000, 2 }, \
  { 1, 11, 15, 11, 15, 0, "RA",             0, 0xfc000000, 0x3c000000, 2 }, \
  { 0 } \
}
#endif


#if 0
/* eliminate any debugging noise */

#undef WITH_TRACE
#define WITH_TRACE 0

#undef WITH_ASSERT
#define WITH_ASSERT 0

#endif


#if 0
/* A reasonable set of inline macro's that give the compiler a
   fighting chance at eliminating much of the function call overhead.

   Typically, with the below the -O3 option (to get inline of all
   functioins) isn't of any greate benefit. */

#undef INLINE
#define INLINE inline

#undef STATIC_INLINE
#define STATIC_INLINE static INLINE

#undef ENDIAN_INLINE
#define ENDIAN_INLINE 2

#if 0 /*DNE*/
#undef ICACHE_INLINE
#define ICACHE_INLINE 0
#endif

#undef CORE_INLINE
#define CORE_INLINE 2

#undef VM_INLINE
#define VM_INLINE 2

#undef CPU_INLINE
#define CPU_INLINE 2

#undef EVENTS_INLINE
#define EVENTS_INLINE 2

#undef REGISTERS_INLINE
#define REGISTERS_INLINE 2

#undef INTERRUPTS_INLINE
#define INTERRUPTS_INLINE 2

#undef DEVICE_TREE_INLINE
#define DEVICE_TREE_INLINE 0

#undef DEVICES_INLINE
#define DEVICES_INLINE 0

#undef SPREG_INLINE
#define SPREG_INLINE 2

#undef SEMANTICS_INLINE
#define SEMANTICS_INLINE 1 /* not 2! as it blows away the compiler */

#undef IDECODE_INLINE
#define IDECODE_INLINE 2

#endif


#if 0
/* Enable the full cracking cache.  The cracked instruction cache
   appears to give best performance if most functions have been lined
   as well */

#undef WITH_IDECODE_CACHE
#define WITH_IDECODE_CACHE 2

#endif



#if 0
/* With the VEA model, can eliminate some things.  Not least of which
   is support for the OEA model */

#undef WITH_ENVIRONMENT
#define WITH_ENVIRONMENT VIRTUAL_ENVIRONMENT

#undef WITH_EVENTS
#define WITH_EVENTS 0

#undef WITH_SMP
#define WITH_SMP 0

#undef WITH_TARGET_BYTE_ORDER 
#define WITH_TARGET_BYTE_ORDER WITH_HOST_BYTE_ORDER

#endif




#if 0
/* Finally, the expansion rules below are extreemly agressive.  Only
   consider them if your build machine is VERY VERY VERY VERY VERY
   well configured */

#undef WITH_IDECODE_EXPAND_SEMANTICS
#define WITH_IDECODE_EXPAND_SEMANTICS 1

#undef WITH_IDECODE_OPCODE_RULES
#define WITH_IDECODE_OPCODE_RULES { \
  { 1,  0,  5,  0,  5, 0, 0,                0, 0x00000000, 0x00000000, 0 }, \
  { 1, 21, 31, 32, -1, 0, "OE,LR,AA,Rc,LK", 0, 0x00000000, 0x00000000, 0 }, \
  { 1,  6, 15,  6, 15, 0, "BO,BI",          0, 0xfc000000, 0x40000000, 0 }, \
  { 1, 11, 15, 11, 15, 0, "RA",             0, 0xfc000000, 0x38000000, 0 }, \
  { 1, 11, 15, 11, 15, 0, "RA",             0, 0xfc000000, 0x3c000000, 0 }, \
  { 1, 11, 20, 11, 20, 0, "spr",            0, 0xfc000000, 0x7c000000, 0 }, \
  { 0 } \
}
#endif


#endif /* _CONFIG_H */