Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1076)

Unified Diff: sim/cr16/simops.c

Issue 124383005: GDB 7.6.50 (Closed) Base URL: http://git.chromium.org/native_client/nacl-gdb.git@upstream
Patch Set: Created 6 years, 11 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « sim/cr16/interp.c ('k') | sim/cris/ChangeLog » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: sim/cr16/simops.c
diff --git a/sim/cr16/simops.c b/sim/cr16/simops.c
index f8fee8a0d234ed6c281a7e37f98e4f4b95732148..fd922ed6fef30c0bb29899d590febb0503bd340c 100644
--- a/sim/cr16/simops.c
+++ b/sim/cr16/simops.c
@@ -1,5 +1,5 @@
/* Simulation code for the CR16 processor.
- Copyright (C) 2008-2012 Free Software Foundation, Inc.
+ Copyright (C) 2008-2013 Free Software Foundation, Inc.
Contributed by M Ranga Swami Reddy <MR.Swami.Reddy@nsc.com>
This file is part of GDB, the GNU debugger.
@@ -5059,6 +5059,8 @@ OP_14C_14 ()
void
OP_C_C ()
{
+ uint32 tmp;
+ uint16 a;
trace_input ("excp", OP_CONSTANT4, OP_VOID, OP_VOID);
switch (OP[0])
{
@@ -5465,9 +5467,24 @@ OP_C_C ()
#endif
default:
- cr16_callback->error (cr16_callback, "Unknown syscall %d", FUNC);
+ a = OP[0];
+ switch (a)
+ {
+ case TRAP_BREAKPOINT:
+ State.exception = SIGTRAP;
+ tmp = (PC);
+ JMP(tmp);
+ trace_output_void ();
+ break;
+ case SIGTRAP: /* supervisor call ? */
+ State.exception = SIG_CR16_EXIT;
+ trace_output_void ();
+ break;
+ default:
+ cr16_callback->error (cr16_callback, "Unknown syscall %d", FUNC);
+ break;
+ }
}
-
if ((uint16) result == (uint16) -1)
RETERR (cr16_callback->get_errno(cr16_callback));
else
« no previous file with comments | « sim/cr16/interp.c ('k') | sim/cris/ChangeLog » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698