]> git.ipfire.org Git - thirdparty/binutils-gdb.git/commitdiff
2003-06-19 Andrew Cagney <cagney@redhat.com>
authorAndrew Cagney <cagney@redhat.com>
Fri, 20 Jun 2003 03:59:33 +0000 (03:59 +0000)
committerAndrew Cagney <cagney@redhat.com>
Fri, 20 Jun 2003 03:59:33 +0000 (03:59 +0000)
* ld-insn.h: Update copyright.
(cache_fields): Define.
(insn_table_fields): Add insn_field_6 and insn_field_7.
(load_insn_table): Pass in the "cache_rules".
* ld-insn.c: Update copyright.
(load_insn_table): Add parameter "cache_rules".  Handle "cache",
"computed" and "scratch" fields.
(main): Pass "cache_rules" to load_insn_table.
* ld-cache.h: Update copyright.
(append_cache_table): Declare.
* ld-cache.c: Update copyright.
(append_cache_table): New function.
(load_cache_table): Call.
* gen-model.c: Include "ld-cache.h".
* gen-itable.c: Include "ld-cache.h".
* igen.c: Move #include "ld-cache.h" to earlier.  Update
copyright.
(main): Permit a NULL "cache_rules".  Pass address of
"cache_rules" to load_insn_table.
* Makefile.in (tmp-ld-insn): Add "ld-cache.o".
(tmp-igen): Do not include ppc-cache-rules.
(gen-itable.o, gen-model.o): Add "ld-cache.h".
* ppc-cache-rules: Delete file.
* ppc-instructions: Add cache rules.

sim/ppc/ChangeLog
sim/ppc/Makefile.in
sim/ppc/gen-itable.c
sim/ppc/gen-model.c
sim/ppc/igen.c
sim/ppc/ld-cache.c
sim/ppc/ld-cache.h
sim/ppc/ld-insn.c
sim/ppc/ld-insn.h
sim/ppc/ppc-cache-rules [deleted file]
sim/ppc/ppc-instructions

index cd2ab4e358d41e7719f80ad6762101548cd78686..0dd4306e1d9d8508c33378b19a7f695438b8d085 100644 (file)
@@ -1,3 +1,30 @@
+2003-06-19  Andrew Cagney  <cagney@redhat.com>
+
+       * ld-insn.h: Update copyright.
+       (cache_fields): Define.
+       (insn_table_fields): Add insn_field_6 and insn_field_7.
+       (load_insn_table): Pass in the "cache_rules".
+       * ld-insn.c: Update copyright.
+       (load_insn_table): Add parameter "cache_rules".  Handle "cache",
+       "computed" and "scratch" fields.
+       (main): Pass "cache_rules" to load_insn_table.
+       * ld-cache.h: Update copyright.
+       (append_cache_table): Declare.
+       * ld-cache.c: Update copyright.
+       (append_cache_table): New function.
+       (load_cache_table): Call.
+       * gen-model.c: Include "ld-cache.h".
+       * gen-itable.c: Include "ld-cache.h".
+       * igen.c: Move #include "ld-cache.h" to earlier.  Update
+       copyright.
+       (main): Permit a NULL "cache_rules".  Pass address of
+       "cache_rules" to load_insn_table.
+       * Makefile.in (tmp-ld-insn): Add "ld-cache.o".
+       (tmp-igen): Do not include ppc-cache-rules.
+       (gen-itable.o, gen-model.o): Add "ld-cache.h".
+       * ppc-cache-rules: Delete file.
+       * ppc-instructions: Add cache rules.
+
 2003-06-19  Andrew Cagney  <cagney@redhat.com>
 
        * Makefile.in (ICACHE_CFLAGS, SEMANTICS_CFLAGS): Delete.
index fdaab4df7dd3ad1012f14f2559efc92c47bab1d8..f8e4b86ff75d32c25a4b0db8a819032d107680b7 100644 (file)
@@ -460,10 +460,9 @@ tmp-dgen: dgen ppc-spr-table $(srcdir)/../../move-if-change
        touch tmp-dgen
 
 
-tmp-igen: igen ppc-instructions $(IGEN_OPCODE_RULES) ppc-cache-rules $(srcdir)/../../move-if-change tmp-ld-decode tmp-ld-cache tmp-ld-insn tmp-filter
+tmp-igen: igen ppc-instructions $(IGEN_OPCODE_RULES) $(srcdir)/../../move-if-change tmp-ld-decode tmp-ld-cache tmp-ld-insn tmp-filter
        ./igen  $(IGEN_FLAGS) \
                -o $(srcdir)/$(IGEN_OPCODE_RULES) \
-               -k $(srcdir)/ppc-cache-rules \
                -I $(srcdir) -i $(srcdir)/ppc-instructions \
                -n icache.h    -hc tmp-icache.h \
                -n icache.c    -c  tmp-icache.c \
@@ -534,12 +533,12 @@ tmp-ld-cache: ld-cache.o misc.o lf.o table.o filter_host.o
 ld-insn.o: ld-insn.c misc.h lf.h table.h ld-insn.h ld-decode.h igen.h
        $(CC_FOR_BUILD) $(BUILD_CFLAGS) -c $(srcdir)/ld-insn.c
 tmp-ld-insn: ld-insn.o misc.o lf.o table.o ld-decode.o filter_host.o filter.o
-       $(CC_FOR_BUILD) $(BUILD_CFLAGS) $(BUILD_LDFLAGS) -o tmp-ld-insn -DMAIN $(srcdir)/ld-insn.c misc.o lf.o table.o ld-decode.o filter_host.o filter.o $(BUILD_LIBS)
+       $(CC_FOR_BUILD) $(BUILD_CFLAGS) $(BUILD_LDFLAGS) -o tmp-ld-insn -DMAIN $(srcdir)/ld-insn.c ld-cache.o misc.o lf.o table.o ld-decode.o filter_host.o filter.o $(BUILD_LIBS)
 
-gen-model.o: gen-model.c misc.h lf.h table.h gen-model.h ld-decode.h igen.h ld-insn.h
+gen-model.o: gen-model.c misc.h lf.h table.h gen-model.h ld-decode.h igen.h ld-insn.h ld-cache.h
        $(CC_FOR_BUILD) $(BUILD_CFLAGS) -c $(srcdir)/gen-model.c
 
-gen-itable.o: gen-itable.c misc.h lf.h table.h gen-itable.h ld-decode.h igen.h ld-insn.h igen.h
+gen-itable.o: gen-itable.c misc.h lf.h table.h gen-itable.h ld-decode.h igen.h ld-insn.h igen.h ld-cache.h
        $(CC_FOR_BUILD) $(BUILD_CFLAGS) -c $(srcdir)/gen-itable.c
 
 gen-icache.o: gen-icache.c misc.h lf.h table.h gen-icache.h ld-decode.h igen.h ld-insn.h gen-semantics.h gen-idecode.h
index 132aa291e083caf8084b0ec0d208d2e2f1a46026..4897b98774cb5ea8a7682ea0d08fbcdff259354e 100644 (file)
@@ -26,6 +26,7 @@
 
 #include "filter.h"
 
+#include "ld-cache.h"
 #include "ld-decode.h"
 #include "ld-insn.h"
 
index 34c1b90f5cec0f84aabc9dc355115c4c569603e6..b4614312d698ac586dbf708831c72283120e618a 100644 (file)
@@ -25,6 +25,7 @@
 
 #include "filter.h"
 
+#include "ld-cache.h"
 #include "ld-decode.h"
 #include "ld-insn.h"
 
index 464ae87b85638e148d3505ae1ad3e5cf5c1a6a0f..cc096626f84edbe4f516e99c27ff3198b18fa3f9 100644 (file)
@@ -29,8 +29,8 @@
 
 #include "filter.h"
 
-#include "ld-decode.h"
 #include "ld-cache.h"
+#include "ld-decode.h"
 #include "ld-insn.h"
 
 #include "igen.h"
@@ -480,11 +480,12 @@ main(int argc,
       force_decode_gen_type(optarg);
       break;
     case 'i':
-      if (decode_rules == NULL || cache_rules == NULL) {
-       fprintf(stderr, "Must specify decode and cache tables\n");
+      if (decode_rules == NULL) {
+       fprintf(stderr, "Must specify decode tables\n");
        exit (1);
       }
-      instructions = load_insn_table(optarg, decode_rules, filters, includes);
+      instructions = load_insn_table(optarg, decode_rules, filters, includes,
+                                    &cache_rules);
       fprintf(stderr, "\texpanding ...\n");
       insn_table_expand_insns(instructions);
       break;
index 135013e5f237c5c648ca505547d185f4f1c26afe..ef16c6754370de2f0dd92b01e535054acbbeb612 100644 (file)
@@ -1,6 +1,6 @@
 /*  This file is part of the program psim.
 
-    Copyright (C) 1994-1997, Andrew Cagney <cagney@highland.com.au>
+    Copyright 1994, 1995, 1996, 1997, 2003 Andrew Cagney
 
     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
@@ -46,6 +46,24 @@ static const name_map cache_type_map[] = {
 };
 
 
+void
+append_cache_rule (cache_table **table, char *type, char *field_name,
+                  char *derived_name, char *type_def,
+                  char *expression, table_entry *file_entry)
+{
+  while ((*table) != NULL)
+    table = &(*table)->next;
+  (*table) = ZALLOC(cache_table);
+  (*table)->type = name2i(type, cache_type_map);
+  (*table)->field_name = field_name;
+  (*table)->derived_name = derived_name;
+  (*table)->type_def = (strlen(type_def) > 0 ? type_def : NULL);
+  (*table)->expression = (strlen(expression) > 0 ? expression : NULL);
+  (*table)->file_entry = file_entry;
+  (*table)->next = NULL;
+}
+
+
 cache_table *
 load_cache_table(char *file_name,
                 int hi_bit_nr)
@@ -55,19 +73,13 @@ load_cache_table(char *file_name,
   cache_table *table = NULL;
   cache_table **curr_rule = &table;
   while ((entry = table_entry_read(file)) != NULL) {
-    cache_table *new_rule = ZALLOC(cache_table);
-    new_rule->type = name2i(entry->fields[ca_type], cache_type_map);
-    new_rule->field_name = entry->fields[ca_field_name];
-    new_rule->derived_name = entry->fields[ca_derived_name];
-    new_rule->type_def = (strlen(entry->fields[ca_type_def])
-                         ? entry->fields[ca_type_def]
-                         : NULL);
-    new_rule->expression = (strlen(entry->fields[ca_expression]) > 0
-                           ? entry->fields[ca_expression]
-                           : NULL);
-    new_rule->file_entry = entry;
-    *curr_rule = new_rule;
-    curr_rule = &new_rule->next;
+    append_cache_rule (curr_rule, entry->fields[ca_type],
+                      entry->fields[ca_field_name],
+                      entry->fields[ca_derived_name],
+                      entry->fields[ca_type_def],
+                      entry->fields[ca_expression],
+                      entry);
+    curr_rule = &(*curr_rule)->next;
   }
   return table;
 }
index 72e39504380fb6ac6d5714bed19b9d2bc7114c1a..a3fd0a49b452b5dc90bf27800cd5c09041864300 100644 (file)
@@ -1,6 +1,6 @@
 /*  This file is part of the program psim.
 
-    Copyright (C) 1994-1997, Andrew Cagney <cagney@highland.com.au>
+    Copyright 1994, 1995, 1996, 1997, 2003, Andrew Cagney
 
     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
@@ -79,3 +79,13 @@ struct _cache_table {
 extern cache_table *load_cache_table
 (char *file_name,
  int hi_bit_nr);
+
+extern void append_cache_rule
+(cache_table **table,
+ char *type,
+ char *field_name,
+ char *derived_name,
+ char *type_def,
+ char *expression,
+ table_entry *file_entry);
+
index 28b6b5598979218317c99e23c5599059f0affbab..e3b1ba579c7b4ab53ca537ffc2a40823b5a17b6c 100644 (file)
@@ -1,6 +1,6 @@
 /*  This file is part of the program psim.
 
-    Copyright (C) 1994,1995,1996, Andrew Cagney <cagney@highland.com.au>
+    Copyright 1994, 1995, 1996, 2003 Andrew Cagney
 
     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
@@ -332,7 +332,8 @@ insn_table *
 load_insn_table(const char *file_name,
                decode_table *decode_rules,
                filter *filters,
-               table_include *includes)
+               table_include *includes,
+               cache_table **cache_rules)
 {
   table *file = table_open(file_name, nr_insn_table_fields, nr_insn_model_table_fields);
   insn_table *table = ZALLOC(insn_table);
@@ -344,6 +345,33 @@ load_insn_table(const char *file_name,
        || it_is("internal", file_entry->fields[insn_flags])) {
       insn_table_insert_function(table, file_entry);
     }
+    else if ((it_is("function", file_entry->fields[insn_form])
+             || it_is("internal", file_entry->fields[insn_form]))
+            && !is_filtered_out(file_entry->fields[insn_flags], filters)) {
+      /* Ok, this is evil.  Need to convert a new style function into
+         an old style function.  Construct an old style table and then
+         copy it back.  */
+      char *fields[nr_insn_table_fields];
+      memset (fields, 0, sizeof fields);
+      fields[insn_flags] = file_entry->fields[insn_form];
+      fields[function_type] = file_entry->fields[insn_name];
+      fields[function_name] = file_entry->fields[insn_comment];
+      fields[function_param] = file_entry->fields[insn_field_6];
+      memcpy (file_entry->fields, fields,
+             sizeof (fields[0]) * file_entry->nr_fields);
+      insn_table_insert_function(table, file_entry);
+#if 0
+      ":" "..."
+       ":" <filter-flags>
+       ":" <filter-models>
+       ":" <typedef>
+       ":" <name>
+       [ ":" <parameter-list> ]
+       <nl>
+       [ <function-model> ]
+       <code-block>
+#endif
+    }       
     else if (it_is("model", file_entry->fields[insn_flags])) {
       model_table_insert(table, file_entry);
     }
@@ -366,6 +394,18 @@ load_insn_table(const char *file_name,
              && !is_filtered_out(file_entry->fields[insn_flags], filters)) {
       parse_include_entry (file, file_entry, filters, includes);
     }
+    else if ((it_is("cache", file_entry->fields[insn_form])
+             || it_is("compute", file_entry->fields[insn_form])
+             || it_is("scratch", file_entry->fields[insn_form]))
+            && !is_filtered_out(file_entry->fields[insn_flags], filters)) {
+      append_cache_rule (cache_rules,
+                        file_entry->fields[insn_form], /* type */
+                        file_entry->fields[cache_name],
+                        file_entry->fields[cache_derived_name],
+                        file_entry->fields[cache_type_def],
+                        file_entry->fields[cache_expression],
+                        file_entry);
+    }
     else {
       insn_fields *fields;
       /* skip instructions that aren't relevant to the mode */
@@ -930,6 +970,7 @@ main(int argc, char **argv)
   filter *filters = NULL;
   decode_table *decode_rules = NULL;
   insn_table *instructions = NULL;
+  cache_table *cache_rules = NULL;
 
   if (argc != 5)
     error("Usage: insn <filter> <hi-bit-nr> <decode-table> <insn-table>\n");
@@ -938,7 +979,8 @@ main(int argc, char **argv)
   hi_bit_nr = a2i(argv[2]);
   ASSERT(hi_bit_nr < insn_bit_size);
   decode_rules = load_decode_table(argv[3], hi_bit_nr);
-  instructions = load_insn_table(argv[4], decode_rules, filters, NULL);
+  instructions = load_insn_table(argv[4], decode_rules, filters, NULL,
+                                &cache_rules);
   insn_table_expand_insns(instructions);
 
   dump_insn_table(instructions, 0, -1);
index 06bf838b70ebfca1754896434ec1745d9b08f383..4e1b7f76d19e2b7bad8370007ad7bd49d5be03e2 100644 (file)
@@ -1,6 +1,6 @@
 /*  This file is part of the program psim.
 
-    Copyright (C) 1994,1995,1996, Andrew Cagney <cagney@highland.com.au>
+    Copyright 1994, 1995, 1996, 2003 Andrew Cagney
 
     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
@@ -119,6 +119,8 @@ typedef enum {
   insn_mnemonic,
   insn_name,
   insn_comment,
+  insn_field_6,
+  insn_field_7,
   nr_insn_table_fields
 } insn_table_fields;
 
@@ -139,6 +141,13 @@ typedef enum {
   include_path = insn_name,
 } model_include_fields;
 
+typedef enum {
+  cache_type_def = insn_name,
+  cache_derived_name = insn_comment,
+  cache_name = insn_field_6,
+  cache_expression = insn_field_7,
+} cache_fields;
+
 typedef struct _insn insn;
 struct _insn {
   table_entry *file_entry;
@@ -189,7 +198,8 @@ extern insn_table *load_insn_table
 (const char *file_name,
  decode_table *decode_rules,
  filter *filters,
- table_include *includes);
+ table_include *includes,
+ cache_table **cache_rules);
 
 model *models;
 model *last_model;
diff --git a/sim/ppc/ppc-cache-rules b/sim/ppc/ppc-cache-rules
deleted file mode 100644 (file)
index 2b5f472..0000000
+++ /dev/null
@@ -1,65 +0,0 @@
-#
-#   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.
-#
-cache:RA:RA::
-cache:RA:rA:signed_word *:(cpu_registers(processor)->gpr + RA)
-cache:RA:RA_BITMASK:unsigned32:(1 << RA)
-compute:RA:RA_is_0:int:(RA == 0)
-cache:RT:RT::
-cache:RT:rT:signed_word *:(cpu_registers(processor)->gpr + RT)
-cache:RT:RT_BITMASK:unsigned32:(1 << RT)
-cache:RS:RS::
-cache:RS:rS:signed_word *:(cpu_registers(processor)->gpr + RS)
-cache:RS:RS_BITMASK:unsigned32:(1 << RS)
-cache:RB:RB::
-cache:RB:rB:signed_word *:(cpu_registers(processor)->gpr + RB)
-cache:RB:RB_BITMASK:unsigned32:(1 << RB)
-scratch:FRA:FRA::
-cache:FRA:frA:unsigned64 *:(cpu_registers(processor)->fpr + FRA)
-cache:FRA:FRA_BITMASK:unsigned32:(1 << FRA)
-scratch:FRB:FRB::
-cache:FRB:frB:unsigned64 *:(cpu_registers(processor)->fpr + FRB)
-cache:FRB:FRB_BITMASK:unsigned32:(1 << FRB)
-scratch:FRC:FRC::
-cache:FRC:frC:unsigned64 *:(cpu_registers(processor)->fpr + FRC)
-cache:FRC:FRC_BITMASK:unsigned32:(1 << FRC)
-scratch:FRS:FRS::
-cache:FRS:frS:unsigned64 *:(cpu_registers(processor)->fpr + FRS)
-cache:FRS:FRS_BITMASK:unsigned32:(1 << FRS)
-scratch:FRT:FRT::
-cache:FRT:frT:unsigned64 *:(cpu_registers(processor)->fpr + FRT)
-cache:FRT:FRT_BITMASK:unsigned32:(1 << FRT)
-cache:SI:EXTS_SI:unsigned_word:((signed_word)(signed16)instruction)
-scratch:BI:BI::
-cache:BI:BIT32_BI::BIT32(BI)
-cache:BF:BF::
-cache:BF:BF_BITMASK:unsigned32:(1 << BF)
-scratch:BA:BA::
-cache:BA:BIT32_BA::BIT32(BA)
-cache:BA:BA_BITMASK:unsigned32:(1 << BA)
-scratch:BB:BB::
-cache:BB:BIT32_BB::BIT32(BB)
-cache:BB:BB_BITMASK:unsigned32:(1 << BB)
-cache:BT:BT::
-cache:BT:BT_BITMASK:unsigned32:(1 << BT)
-cache:BD:EXTS_BD_0b00:unsigned_word:(((signed_word)(signed16)instruction) & ~3)
-cache:LI:EXTS_LI_0b00:unsigned_word:((((signed_word)(signed32)(instruction << 6)) >> 6) & ~0x3)
-cache:D:EXTS_D:unsigned_word:((signed_word)(signed16)(instruction))
-cache:DS:EXTS_DS_0b00:unsigned_word:(((signed_word)(signed16)instruction) & ~0x3)
-#compute:SPR:SPR_is_256:int:(SPR == 256)
index 6ba0090cac1bb362929aebbf7060955bd42fc10c..d08861046bb51883a64b196a02409ee9eedaf8ed 100644 (file)
@@ -1,7 +1,7 @@
 #
 #   This file is part of the program psim.
 #
-#   Copyright (C) 1994-1997, Andrew Cagney <cagney@highland.com.au>
+#   Copyright 1994, 1995, 1996, 1997, 2003 Andrew Cagney
 #
 #   --
 #
 #   along with this program; if not, write to the Free Software
 #   Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
 #
+
+:cache::::RA:RA:
+:cache:::signed_word *:rA:RA:(cpu_registers(processor)->gpr + RA)
+:cache:::unsigned32:RA_BITMASK:RA:(1 << RA)
+:compute:::int:RA_is_0:RA:(RA == 0)
+:cache::::RT:RT:
+:cache:::signed_word *:rT:RT:(cpu_registers(processor)->gpr + RT)
+:cache:::unsigned32:RT_BITMASK:RT:(1 << RT)
+:cache::::RS:RS:
+:cache:::signed_word *:rS:RS:(cpu_registers(processor)->gpr + RS)
+:cache:::unsigned32:RS_BITMASK:RS:(1 << RS)
+:cache::::RB:RB:
+:cache:::signed_word *:rB:RB:(cpu_registers(processor)->gpr + RB)
+:cache:::unsigned32:RB_BITMASK:RB:(1 << RB)
+:scratch::::FRA:FRA:
+:cache:::unsigned64 *:frA:FRA:(cpu_registers(processor)->fpr + FRA)
+:cache:::unsigned32:FRA_BITMASK:FRA:(1 << FRA)
+:scratch::::FRB:FRB:
+:cache:::unsigned64 *:frB:FRB:(cpu_registers(processor)->fpr + FRB)
+:cache:::unsigned32:FRB_BITMASK:FRB:(1 << FRB)
+:scratch::::FRC:FRC:
+:cache:::unsigned64 *:frC:FRC:(cpu_registers(processor)->fpr + FRC)
+:cache:::unsigned32:FRC_BITMASK:FRC:(1 << FRC)
+:scratch::::FRS:FRS:
+:cache:::unsigned64 *:frS:FRS:(cpu_registers(processor)->fpr + FRS)
+:cache:::unsigned32:FRS_BITMASK:FRS:(1 << FRS)
+:scratch::::FRT:FRT:
+:cache:::unsigned64 *:frT:FRT:(cpu_registers(processor)->fpr + FRT)
+:cache:::unsigned32:FRT_BITMASK:FRT:(1 << FRT)
+:cache:::unsigned_word:EXTS_SI:SI:((signed_word)(signed16)instruction)
+:scratch::::BI:BI:
+:cache::::BIT32_BI:BI:BIT32(BI)
+:cache::::BF:BF:
+:cache:::unsigned32:BF_BITMASK:BF:(1 << BF)
+:scratch::::BA:BA:
+:cache::::BIT32_BA:BA:BIT32(BA)
+:cache:::unsigned32:BA_BITMASK:BA:(1 << BA)
+:scratch::::BB:BB:
+:cache::::BIT32_BB:BB:BIT32(BB)
+:cache:::unsigned32:BB_BITMASK:BB:(1 << BB)
+:cache::::BT:BT:
+:cache:::unsigned32:BT_BITMASK:BT:(1 << BT)
+:cache:::unsigned_word:EXTS_BD_0b00:BD:(((signed_word)(signed16)instruction) & ~3)
+:cache:::unsigned_word:EXTS_LI_0b00:LI:((((signed_word)(signed32)(instruction << 6)) >> 6) & ~0x3)
+:cache:::unsigned_word:EXTS_D:D:((signed_word)(signed16)(instruction))
+:cache:::unsigned_word:EXTS_DS_0b00:DS:(((signed_word)(signed16)instruction) & ~0x3)
+#:compute:::int:SPR_is_256:SPR:(SPR == 256)
 \f
 # PowerPC models
 ::model:604:ppc604:  PPC_UNIT_BAD,   PPC_UNIT_BAD,   1,  1,  0