1 /* Simulation code for the CR16 processor.
2 Copyright (C) 2008-2015 Free Software Foundation, Inc.
3 Contributed by M Ranga Swami Reddy <MR.Swami.Reddy@nsc.com>
5 This file is part of GDB, the GNU debugger.
7 This program is free software; you can redistribute it and/or modify
8 it under the terms of the GNU General Public License as published by
9 the Free Software Foundation; either version 3, or (at your option)
12 This program is distributed in the hope that it will be useful,
13 but WITHOUT ANY WARRANTY; without even the implied warranty of
14 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15 GNU General Public License for more details.
17 You should have received a copy of the GNU General Public License
18 along with this program. If not, see <http://www.gnu.org/licenses/>. */
26 #include "gdb/callback.h"
27 #include "gdb/remote-sim.h"
30 #include "sim-options.h"
32 #include "gdb/sim-cr16.h"
33 #include "gdb/signals.h"
34 #include "opcode/cr16.h"
38 host_callback
*cr16_callback
;
43 static struct hash_entry
*lookup_hash (SIM_DESC
, SIM_CPU
*, uint64 ins
, int size
);
44 static void get_operands (operand_desc
*s
, uint64 mcode
, int isize
, int nops
);
50 struct hash_entry
*next
;
58 struct hash_entry hash_table
[MAX_HASH
+1];
61 hash(unsigned long long insn
, int format
)
63 unsigned int i
= 4, tmp
;
66 while ((insn
>> i
) != 0) i
+=4;
68 return ((insn
>> (i
-4)) & 0xf); /* Use last 4 bits as hask key. */
70 return ((insn
& 0xF)); /* Use last 4 bits as hask key. */
74 INLINE
static struct hash_entry
*
75 lookup_hash (SIM_DESC sd
, SIM_CPU
*cpu
, uint64 ins
, int size
)
80 h
= &hash_table
[hash(ins
,1)];
83 mask
= (((1 << (32 - h
->mask
)) -1) << h
->mask
);
85 /* Adjuest mask for branch with 2 word instructions. */
86 if ((h
->ops
->mnimonic
!= NULL
) &&
87 ((streq(h
->ops
->mnimonic
,"b") && h
->size
== 2)))
91 while ((ins
& mask
) != (BIN(h
->opcode
, h
->mask
)))
95 State
.exception
= SIGILL
;
96 State
.pc_changed
= 1; /* Don't increment the PC. */
101 mask
= (((1 << (32 - h
->mask
)) -1) << h
->mask
);
102 /* Adjuest mask for branch with 2 word instructions. */
103 if ((streq(h
->ops
->mnimonic
,"b")) && h
->size
== 2)
111 get_operands (operand_desc
*s
, uint64 ins
, int isize
, int nops
)
113 uint32 i
, opn
= 0, start_bit
= 0, op_type
= 0;
114 int32 op_size
= 0, mask
= 0;
116 if (isize
== 1) /* Trunkcate the extra 16 bits of INS. */
119 for (i
=0; i
< 4; ++i
,++opn
)
121 if (s
[opn
].op_type
== dummy
) break;
123 op_type
= s
[opn
].op_type
;
124 start_bit
= s
[opn
].shift
;
125 op_size
= cr16_optab
[op_type
].bit_size
;
129 case imm3
: case imm4
: case imm5
: case imm6
:
132 OP
[i
] = ((ins
>> 4) & ((1 << op_size
) -1));
134 OP
[i
] = ((ins
>> (32 - start_bit
)) & ((1 << op_size
) -1));
136 if (OP
[i
] & ((long)1 << (op_size
-1)))
139 OP
[i
] = ~(OP
[i
]) + 1;
141 OP
[i
] = (unsigned long int)(OP
[i
] & (((long)1 << op_size
) -1));
145 case uimm3
: case uimm3_1
: case uimm4_1
:
149 OP
[i
] = ((ins
>> 4) & ((1 << op_size
) -1)); break;
151 OP
[i
] = ((ins
>> (32 - start_bit
)) & ((1 << op_size
) -1));break;
152 default: /* for case 3. */
153 OP
[i
] = ((ins
>> (16 + start_bit
)) & ((1 << op_size
) -1)); break;
163 OP
[i
] = ((ins
>> 4) & ((1 << op_size
) -1));
165 OP
[i
] = (ins
& ((1 << op_size
) -1));
168 OP
[i
] = ((ins
>> start_bit
) & ((1 << op_size
) -1));
171 OP
[i
] = ((ins
>> (start_bit
+ 16)) & ((1 << op_size
) -1));
174 OP
[i
] = ((ins
>> start_bit
) & ((1 << op_size
) -1));
179 case imm16
: case uimm16
:
180 OP
[i
] = ins
& 0xFFFF;
183 case uimm20
: case imm20
:
184 OP
[i
] = ins
& (((long)1 << op_size
) - 1);
187 case imm32
: case uimm32
:
188 OP
[i
] = ins
& 0xFFFFFFFF;
191 case uimm5
: break; /*NOT USED. */
192 OP
[i
] = ins
& ((1 << op_size
) - 1); break;
195 OP
[i
] = (ins
>> 4) & ((1 << 4) - 1);
196 OP
[i
] = (OP
[i
] * 2) + 2;
197 if (OP
[i
] & ((long)1 << 5))
200 OP
[i
] = ~(OP
[i
]) + 1;
201 OP
[i
] = (unsigned long int)(OP
[i
] & 0x1F);
206 OP
[i
] = ((((ins
>> 8) & 0xf) << 4) | (ins
& 0xf));
208 if (OP
[i
] & ((long)1 << 8))
211 OP
[i
] = ~(OP
[i
]) + 1;
212 OP
[i
] = (unsigned long int)(OP
[i
] & 0xFF);
217 OP
[i
] = (ins
& 0xFFFF);
220 OP
[i
] = (OP
[i
] & 0xFFFE);
222 OP
[i
] = ~(OP
[i
]) + 1;
223 OP
[i
] = (unsigned long int)(OP
[i
] & 0xFFFF);
229 OP
[i
] = (ins
& 0xFFFFFF);
231 OP
[i
] = (ins
& 0xFFFF) | (((ins
>> 24) & 0xf) << 16) |
232 (((ins
>> 16) & 0xf) << 20);
236 OP
[i
] = (OP
[i
] & 0xFFFFFE);
238 OP
[i
] = ~(OP
[i
]) + 1;
239 OP
[i
] = (unsigned long int)(OP
[i
] & 0xFFFFFF);
245 OP
[i
] = (ins
) & 0xFFFFF;
247 OP
[i
] = (ins
>> start_bit
) & 0xFFFFF;
251 OP
[i
] = ((ins
& 0xFFFF) | (((ins
>> 16) & 0xf) << 20)
252 | (((ins
>> 24) & 0xf) << 16));
254 OP
[i
] = (ins
>> 16) & 0xFFFFFF;
258 case rbase
: break; /* NOT USED. */
259 case rbase_disps20
: case rbase_dispe20
:
260 case rpbase_disps20
: case rpindex_disps20
:
261 OP
[i
] = ((((ins
>> 24)&0xf) << 16)|((ins
) & 0xFFFF));
262 OP
[++i
] = (ins
>> 16) & 0xF; /* get 4 bit for reg. */
265 OP
[i
] = 0; /* 4 bit disp const. */
266 OP
[++i
] = (ins
) & 0xF; /* get 4 bit for reg. */
269 OP
[i
] = ((ins
>> 8) & 0xF) * 2; /* 4 bit disp const. */
270 OP
[++i
] = (ins
) & 0xF; /* get 4 bit for reg. */
273 OP
[i
] = ((ins
>> 8) & 0xF); /* 4 bit disp const. */
274 OP
[++i
] = (ins
) & 0xF; /* get 4 bit for reg. */
277 OP
[i
] = (ins
) & 0xFFFF;
278 OP
[++i
] = (ins
>> 16) & 0xF; /* get 4 bit for reg. */
282 OP
[++i
] = (ins
>> 4) & 0xF; /* get 4 bit for reg. */
283 OP
[++i
] = (ins
>> 8) & 0x1; /* get 1 bit for index-reg. */
285 case rpindex_disps14
:
286 OP
[i
] = (ins
) & 0x3FFF;
287 OP
[++i
] = (ins
>> 14) & 0x1; /* get 1 bit for index-reg. */
288 OP
[++i
] = (ins
>> 16) & 0xF; /* get 4 bit for reg. */
291 OP
[i
] = (ins
) & 0xFFFFF;
292 OP
[++i
] = (ins
>> 24) & 0x1; /* get 1 bit for index-reg. */
293 OP
[++i
] = (ins
>> 20) & 0xF; /* get 4 bit for reg. */
295 case regr
: case regp
: case pregr
: case pregrp
:
299 if (start_bit
== 20) OP
[i
] = (ins
>> 4) & 0xF;
300 else if (start_bit
== 16) OP
[i
] = ins
& 0xF;
302 case 2: OP
[i
] = (ins
>> start_bit
) & 0xF; break;
303 case 3: OP
[i
] = (ins
>> (start_bit
+ 16)) & 0xF; break;
308 if (isize
== 1) OP
[i
] = (ins
>> 4) & 0xF;
309 else if (isize
== 2) OP
[i
] = (ins
>> start_bit
) & 0xF;
310 else OP
[i
] = (ins
>> (start_bit
+ 16)) & 0xF;
316 /* For ESC on uimm4_1 operand. */
317 if (op_type
== uimm4_1
)
321 /* For increment by 1. */
322 if ((op_type
== pregr
) || (op_type
== pregrp
))
325 /* FIXME: for tracing, update values that need to be updated each
326 instruction decode cycle */
327 State
.trace
.psw
= PSR
;
331 do_run (SIM_DESC sd
, SIM_CPU
*cpu
, uint64 mcode
)
333 host_callback
*cr16_callback
= STATE_CALLBACK (sd
);
334 struct simops
*s
= Simops
;
335 struct hash_entry
*h
;
338 if ((cr16_debug
& DEBUG_INSTRUCTION
) != 0)
339 (*cr16_callback
->printf_filtered
) (cr16_callback
, "do_long 0x%x\n", mcode
);
342 h
= lookup_hash (sd
, cpu
, mcode
, 1);
344 if ((h
== NULL
) || (h
->opcode
== 0))
348 mcode
= (mcode
<< 16) | RW (PC
+ 4);
350 /* Re-set OP list. */
351 OP
[0] = OP
[1] = OP
[2] = OP
[3] = sign_flag
= 0;
353 /* for push/pop/pushrtn with RA instructions. */
354 if ((h
->format
& REG_LIST
) && (mcode
& 0x800000))
355 OP
[2] = 1; /* Set 1 for RA operand. */
357 /* numops == 0 means, no operands. */
358 if (((h
->ops
) != NULL
) && (((h
->ops
)->numops
) != 0))
359 get_operands ((h
->ops
)->operands
, mcode
, h
->size
, (h
->ops
)->numops
);
361 //State.ins_type = h->flags;
363 (h
->ops
->func
) (sd
, cpu
);
369 cr16_pc_get (sim_cpu
*cpu
)
375 cr16_pc_set (sim_cpu
*cpu
, sim_cia pc
)
377 SIM_DESC sd
= CPU_STATE (cpu
);
382 free_state (SIM_DESC sd
)
384 if (STATE_MODULES (sd
) != NULL
)
385 sim_module_uninstall (sd
);
386 sim_cpu_free_all (sd
);
390 static int cr16_reg_fetch (SIM_CPU
*, int, unsigned char *, int);
391 static int cr16_reg_store (SIM_CPU
*, int, unsigned char *, int);
394 sim_open (SIM_OPEN_KIND kind
, struct host_callback_struct
*cb
, struct bfd
*abfd
, char **argv
)
397 struct hash_entry
*h
;
398 static int init_p
= 0;
401 SIM_DESC sd
= sim_state_alloc (kind
, cb
);
402 SIM_ASSERT (STATE_MAGIC (sd
) == SIM_MAGIC_NUMBER
);
404 /* The cpu data is kept in a separately allocated chunk of memory. */
405 if (sim_cpu_alloc_all (sd
, 1, /*cgen_cpu_max_extra_bytes ()*/0) != SIM_RC_OK
)
411 if (sim_pre_argv_init (sd
, argv
[0]) != SIM_RC_OK
)
417 /* getopt will print the error message so we just have to exit if this fails.
418 FIXME: Hmmm... in the case of gdb we need getopt to call
420 if (sim_parse_args (sd
, argv
) != SIM_RC_OK
)
426 /* Check for/establish the a reference program image. */
427 if (sim_analyze_program (sd
,
428 (STATE_PROG_ARGV (sd
) != NULL
429 ? *STATE_PROG_ARGV (sd
)
430 : NULL
), abfd
) != SIM_RC_OK
)
436 /* Configure/verify the target byte order and other runtime
437 configuration options. */
438 if (sim_config (sd
) != SIM_RC_OK
)
440 sim_module_uninstall (sd
);
444 if (sim_post_argv_init (sd
) != SIM_RC_OK
)
446 /* Uninstall the modules to avoid memory leaks,
447 file descriptor leaks, etc. */
448 sim_module_uninstall (sd
);
452 /* CPU specific initialization. */
453 for (i
= 0; i
< MAX_NR_PROCESSORS
; ++i
)
455 SIM_CPU
*cpu
= STATE_CPU (sd
, i
);
457 CPU_REG_FETCH (cpu
) = cr16_reg_fetch
;
458 CPU_REG_STORE (cpu
) = cr16_reg_store
;
459 CPU_PC_FETCH (cpu
) = cr16_pc_get
;
460 CPU_PC_STORE (cpu
) = cr16_pc_set
;
463 /* The CR16 has an interrupt controller at 0xFC00, but we don't currently
464 handle that. Revisit if anyone ever implements operating mode. */
465 /* cr16 memory: There are three separate cr16 memory regions IMEM,
466 UMEM and DMEM. The IMEM and DMEM are further broken down into
467 blocks (very like VM pages). This might not match the hardware,
468 but it matches what the toolchain currently expects. Ugh. */
469 sim_do_commandf (sd
, "memory-size %#x", 20 * 1024 * 1024);
473 /* put all the opcodes in the hash table. */
476 for (s
= Simops
; s
->func
; s
++)
481 h
= &hash_table
[hash(s
->opcode
, 0)];
485 if (((s
->opcode
<< 1) >> 4) != 0)
486 h
= &hash_table
[hash((s
->opcode
<< 1) >> 4, 0)];
488 h
= &hash_table
[hash((s
->opcode
<< 1), 0)];
492 if ((s
->opcode
>> 4) != 0)
493 h
= &hash_table
[hash(s
->opcode
>> 4, 0)];
495 h
= &hash_table
[hash(s
->opcode
, 0)];
499 if (((s
->opcode
>> 1) >> 4) != 0)
500 h
= &hash_table
[hash((s
->opcode
>>1) >> 4, 0)];
502 h
= &hash_table
[hash((s
->opcode
>> 1), 0)];
506 if ((s
->opcode
>> 8) != 0)
507 h
= &hash_table
[hash(s
->opcode
>> 8, 0)];
508 else if ((s
->opcode
>> 4) != 0)
509 h
= &hash_table
[hash(s
->opcode
>> 4, 0)];
511 h
= &hash_table
[hash(s
->opcode
, 0)];
515 if ((s
->opcode
>> 8) != 0)
516 h
= &hash_table
[hash(s
->opcode
>> 8, 0)];
517 else if ((s
->opcode
>> 4) != 0)
518 h
= &hash_table
[hash(s
->opcode
>> 4, 0)];
520 h
= &hash_table
[hash(s
->opcode
, 0)];
524 if (((s
->opcode
>> 1) >> 8) != 0)
525 h
= &hash_table
[hash((s
->opcode
>>1) >> 8, 0)];
526 else if (((s
->opcode
>> 1) >> 4) != 0)
527 h
= &hash_table
[hash((s
->opcode
>>1) >> 4, 0)];
529 h
= &hash_table
[hash((s
->opcode
>>1), 0)];
533 if ((s
->opcode
>> 0xc) != 0)
534 h
= &hash_table
[hash(s
->opcode
>> 12, 0)];
535 else if ((s
->opcode
>> 8) != 0)
536 h
= &hash_table
[hash(s
->opcode
>> 8, 0)];
537 else if ((s
->opcode
>> 4) != 0)
538 h
= &hash_table
[hash(s
->opcode
>> 4, 0)];
540 h
= &hash_table
[hash(s
->opcode
, 0)];
544 if ((s
->opcode
>> 16) != 0)
545 h
= &hash_table
[hash(s
->opcode
>> 16, 0)];
546 else if ((s
->opcode
>> 12) != 0)
547 h
= &hash_table
[hash(s
->opcode
>> 12, 0)];
548 else if ((s
->opcode
>> 8) != 0)
549 h
= &hash_table
[hash(s
->opcode
>> 8, 0)];
550 else if ((s
->opcode
>> 4) != 0)
551 h
= &hash_table
[hash(s
->opcode
>> 4, 0)];
553 h
= &hash_table
[hash(s
->opcode
, 0)];
559 /* go to the last entry in the chain. */
565 h
->next
= (struct hash_entry
*) calloc(1,sizeof(struct hash_entry
));
567 perror ("malloc failure");
573 h
->opcode
= s
->opcode
;
574 h
->format
= s
->format
;
582 static int stop_simulator
= 0;
585 sim_stop (SIM_DESC sd
)
592 /* Run (or resume) the program. */
594 sim_resume (SIM_DESC sd
, int step
, int siggnal
)
596 SIM_CPU
*cpu
= STATE_CPU (sd
, 0);
597 uint32 curr_ins_size
= 0;
601 // (*cr16_callback->printf_filtered) (cr16_callback, "sim_resume (%d,%d) PC=0x%x\n",step,siggnal,PC);
618 JMP (AE_VECTOR_START
);
624 SET_HW_PSR ((PSR
& (PSR_C_BIT
)));
625 JMP (RIE_VECTOR_START
);
637 State
.pc_changed
= 0;
639 curr_ins_size
= do_run (sd
, cpu
, mcode
);
642 (*cr16_callback
->printf_filtered
) (cr16_callback
, "INS: PC=0x%X, mcode=0x%X\n",PC
,mcode
);
645 if (!State
.pc_changed
)
647 if (curr_ins_size
== 0)
649 State
.exception
= SIG_CR16_EXIT
; /* exit trap */
653 SET_PC (PC
+ (curr_ins_size
* 2)); /* For word instructions. */
657 /* Check for a breakpoint trap on this instruction. This
658 overrides any pending branches or loops */
659 if (PSR_DB
&& PC
== DBS
)
663 SET_PC (SDBT_VECTOR_START
);
667 /* Writeback all the DATA / PC changes */
670 while ( !State
.exception
&& !stop_simulator
);
672 if (step
&& !State
.exception
)
673 State
.exception
= SIGTRAP
;
677 sim_create_inferior (SIM_DESC sd
, struct bfd
*abfd
, char **argv
, char **env
)
679 bfd_vma start_address
;
681 /* reset all state information */
682 memset (&State
, 0, sizeof (State
));
684 /* There was a hack here to copy the values of argc and argv into r0
685 and r1. The values were also saved into some high memory that
686 won't be overwritten by the stack (0x7C00). The reason for doing
687 this was to allow the 'run' program to accept arguments. Without
688 the hack, this is not possible anymore. If the simulator is run
689 from the debugger, arguments cannot be passed in, so this makes
694 start_address
= bfd_get_start_address (abfd
);
699 (*cr16_callback
->printf_filtered
) (cr16_callback
, "sim_create_inferior: PC=0x%lx\n", (long) start_address
);
702 SIM_CPU
*cpu
= STATE_CPU (sd
, 0);
703 SET_CREG (PC_CR
, start_address
);
711 sim_stop_reason (SIM_DESC sd
, enum sim_stop
*reason
, int *sigrc
)
713 /* (*cr16_callback->printf_filtered) (cr16_callback, "sim_stop_reason: PC=0x%x\n",PC<<2); */
715 switch (State
.exception
)
717 case SIG_CR16_STOP
: /* stop instruction */
718 *reason
= sim_stopped
;
722 case SIG_CR16_EXIT
: /* exit trap */
723 *reason
= sim_exited
;
728 *reason
= sim_stopped
;
729 *sigrc
= GDB_SIGNAL_BUS
;
732 // case SIG_CR16_IAD:
733 // *reason = sim_stopped;
734 // *sigrc = GDB_SIGNAL_IAD;
737 default: /* some signal */
738 *reason
= sim_stopped
;
739 if (stop_simulator
&& !State
.exception
)
740 *sigrc
= GDB_SIGNAL_INT
;
742 *sigrc
= State
.exception
;
750 cr16_extract_unsigned_integer (unsigned char *addr
, int len
)
754 unsigned char * startaddr
= (unsigned char *)addr
;
755 unsigned char * endaddr
= startaddr
+ len
;
759 for (p
= endaddr
; p
> startaddr
;)
760 retval
= (retval
<< 8) | *--p
;
766 cr16_store_unsigned_integer (unsigned char *addr
, int len
, uint32 val
)
769 unsigned char *startaddr
= addr
;
770 unsigned char *endaddr
= startaddr
+ len
;
772 for (p
= startaddr
; p
< endaddr
;)
780 cr16_reg_fetch (SIM_CPU
*cpu
, int rn
, unsigned char *memory
, int length
)
783 switch ((enum sim_cr16_regs
) rn
)
785 case SIM_CR16_R0_REGNUM
:
786 case SIM_CR16_R1_REGNUM
:
787 case SIM_CR16_R2_REGNUM
:
788 case SIM_CR16_R3_REGNUM
:
789 case SIM_CR16_R4_REGNUM
:
790 case SIM_CR16_R5_REGNUM
:
791 case SIM_CR16_R6_REGNUM
:
792 case SIM_CR16_R7_REGNUM
:
793 case SIM_CR16_R8_REGNUM
:
794 case SIM_CR16_R9_REGNUM
:
795 case SIM_CR16_R10_REGNUM
:
796 case SIM_CR16_R11_REGNUM
:
797 cr16_store_unsigned_integer (memory
, 2, GPR (rn
- SIM_CR16_R0_REGNUM
));
800 case SIM_CR16_R12_REGNUM
:
801 case SIM_CR16_R13_REGNUM
:
802 case SIM_CR16_R14_REGNUM
:
803 case SIM_CR16_R15_REGNUM
:
804 cr16_store_unsigned_integer (memory
, 4, GPR (rn
- SIM_CR16_R0_REGNUM
));
807 case SIM_CR16_PC_REGNUM
:
808 case SIM_CR16_ISP_REGNUM
:
809 case SIM_CR16_USP_REGNUM
:
810 case SIM_CR16_INTBASE_REGNUM
:
811 case SIM_CR16_PSR_REGNUM
:
812 case SIM_CR16_CFG_REGNUM
:
813 case SIM_CR16_DBS_REGNUM
:
814 case SIM_CR16_DCR_REGNUM
:
815 case SIM_CR16_DSR_REGNUM
:
816 case SIM_CR16_CAR0_REGNUM
:
817 case SIM_CR16_CAR1_REGNUM
:
818 cr16_store_unsigned_integer (memory
, 4, CREG (rn
- SIM_CR16_PC_REGNUM
));
829 cr16_reg_store (SIM_CPU
*cpu
, int rn
, unsigned char *memory
, int length
)
831 SIM_DESC sd
= CPU_STATE (cpu
);
833 switch ((enum sim_cr16_regs
) rn
)
835 case SIM_CR16_R0_REGNUM
:
836 case SIM_CR16_R1_REGNUM
:
837 case SIM_CR16_R2_REGNUM
:
838 case SIM_CR16_R3_REGNUM
:
839 case SIM_CR16_R4_REGNUM
:
840 case SIM_CR16_R5_REGNUM
:
841 case SIM_CR16_R6_REGNUM
:
842 case SIM_CR16_R7_REGNUM
:
843 case SIM_CR16_R8_REGNUM
:
844 case SIM_CR16_R9_REGNUM
:
845 case SIM_CR16_R10_REGNUM
:
846 case SIM_CR16_R11_REGNUM
:
847 SET_GPR (rn
- SIM_CR16_R0_REGNUM
, cr16_extract_unsigned_integer (memory
, 2));
850 case SIM_CR16_R12_REGNUM
:
851 case SIM_CR16_R13_REGNUM
:
852 case SIM_CR16_R14_REGNUM
:
853 case SIM_CR16_R15_REGNUM
:
854 SET_GPR32 (rn
- SIM_CR16_R0_REGNUM
, cr16_extract_unsigned_integer (memory
, 2));
857 case SIM_CR16_PC_REGNUM
:
858 case SIM_CR16_ISP_REGNUM
:
859 case SIM_CR16_USP_REGNUM
:
860 case SIM_CR16_INTBASE_REGNUM
:
861 case SIM_CR16_PSR_REGNUM
:
862 case SIM_CR16_CFG_REGNUM
:
863 case SIM_CR16_DBS_REGNUM
:
864 case SIM_CR16_DCR_REGNUM
:
865 case SIM_CR16_DSR_REGNUM
:
866 case SIM_CR16_CAR0_REGNUM
:
867 case SIM_CR16_CAR1_REGNUM
:
868 SET_CREG (rn
- SIM_CR16_PC_REGNUM
, cr16_extract_unsigned_integer (memory
, 4));
This page took 0.05638 seconds and 4 git commands to generate.