[Git][cmucl/cmucl][issue-97-define-ud2-inst] Update comments.

Raymond Toy (@rtoy) gitlab at common-lisp.net
Sat May 22 03:14:34 UTC 2021



Raymond Toy pushed to branch issue-97-define-ud2-inst at cmucl / cmucl


Commits:
5ceb821e by Raymond Toy at 2021-05-21T20:14:22-07:00
Update comments.

Move the function comment for arch_skip_instruction to arch.h, and
correct an old comment.

- - - - -


2 changed files:

- src/lisp/arch.h
- src/lisp/x86-arch.c


Changes:

=====================================
src/lisp/arch.h
=====================================
@@ -13,7 +13,14 @@
 
 extern char *arch_init(fpu_mode_t);
 
+/*
+ * Skip over the trap instructions for an error trap and also skip
+ * over anly following bytes used to encode information for an
+ * error-trap or cerror-trap.  The PC in the context is set to address
+ * just past the trap instruction and data bytes (if any).
+ */
 extern void arch_skip_instruction(os_context_t * scp);
+
 extern boolean arch_pseudo_atomic_atomic(os_context_t * scp);
 extern void arch_set_pseudo_atomic_interrupted(os_context_t * scp);
 extern os_vm_address_t arch_get_bad_addr(HANDLER_ARGS);


=====================================
src/lisp/x86-arch.c
=====================================
@@ -141,12 +141,9 @@ arch_init(fpu_mode_t mode)
 
 
 /*
- * Assuming we get here via an INT3 xxx instruction, the PC now
- * points to the interrupt code (lisp value) so we just move past
- * it. Skip the code, then if the code is an error-trap or
- * Cerror-trap then skip the data bytes that follow.
+ * Skip the UD1 instruction, and any data bytes associated with the
+ * trap.
  */
-
 void
 arch_skip_instruction(os_context_t * context)
 {
@@ -155,7 +152,7 @@ arch_skip_instruction(os_context_t * context)
     DPRINTF(debug_handlers,
             (stderr, "[arch_skip_inst at %lx>]\n", SC_PC(context)));
 
-    /* Get and skip the lisp error code. */
+    /* Get the address of the beginning of the UD1 instruction */
     char* pc = (char *) SC_PC(context);
     
     /*



View it on GitLab: https://gitlab.common-lisp.net/cmucl/cmucl/-/commit/5ceb821e0427a3703f45b990d8953efbea6cbcb1

-- 
View it on GitLab: https://gitlab.common-lisp.net/cmucl/cmucl/-/commit/5ceb821e0427a3703f45b990d8953efbea6cbcb1
You're receiving this email because of your account on gitlab.common-lisp.net.


-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://mailman.common-lisp.net/pipermail/cmucl-cvs/attachments/20210522/564bb44b/attachment-0001.html>


More information about the cmucl-cvs mailing list