From 9b75eb2c2119cf29d401cc9eb7735553df2da4b1 Mon Sep 17 00:00:00 2001 From: Nathan Sidwell Date: Fri, 29 Sep 2006 13:35:18 +0000 Subject: libgloss/ * m68k/bdm-semihost.S: Add more comments. Make instruction weirder. --- ChangeLog.csl | 5 +++++ libgloss/m68k/bdm-semihost.S | 15 +++++++++------ 2 files changed, 14 insertions(+), 6 deletions(-) diff --git a/ChangeLog.csl b/ChangeLog.csl index 1265310de..bd3266867 100644 --- a/ChangeLog.csl +++ b/ChangeLog.csl @@ -1,3 +1,8 @@ +2006-09-29 Nathan Sidwell + + libgloss/ + * m68k/bdm-semihost.S: Add more comments. Make instruction weirder. + 2006-09-17 Paul Brook newlib/ diff --git a/libgloss/m68k/bdm-semihost.S b/libgloss/m68k/bdm-semihost.S index 26336eb6a..60b812c28 100644 --- a/libgloss/m68k/bdm-semihost.S +++ b/libgloss/m68k/bdm-semihost.S @@ -15,7 +15,7 @@ */ /* Semihosting function. The debugger intercepts the halt, and - determines that it is followed by the magic movec pattern. */ + determines that it is followed by the sentinel pattern. */ .globl __bdm_semihost __bdm_semihost: @@ -23,13 +23,16 @@ __bdm_semihost: movel %fp@(8),%d0 movel %fp@(12),%d1 .align 4 + + /* The halt sequence must be 'nop; halt' and aligned to a 4 byte + boundary. */ nop halt - /* This sentinel instruction value must be aligned to a 4 byte - * boundary and be immediately after the halt instruction. The - * debugger will adjust the pc, so that it is never executed. */ - - .long 0x4e7b0000 + /* This sentinel instruction value must be immediately after + the halt instruction. The debugger will adjust the pc, so + that it is never executed. This instruction is + 'movec %sp,0'. */ + .long 0x4e7bf000 unlk %fp rts -- cgit v1.2.3