This is the mail archive of the newlib@sourceware.org mailing list for the newlib project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [patch] libgloss/m68k: Fix semihosting. (Part 2)


Patch checked in.

-- Jeff J.

Kazu Hirata wrote:
Hi,

Attached is a patch to fix semihosting.

The same description applies as

http://sources.redhat.com/ml/newlib/2006/msg01039.html

This patch should be applied in addition to the above patch.

Tested by running "Hello, world". OK to apply?

Kazu Hirata

libgloss/
2006-12-26  Kazu Hirata  <kazu@codesourcery.com>

	Merge from newlib-csl-20060320-branch:
	2006-12-22  Nathan Sidwell  <nathan@codesourcery.com>

* m68k/cf-crt0.S (__start): Adjust semihosting.

Index: cf-crt0.S
===================================================================
RCS file: /cvs/src/src/libgloss/m68k/cf-crt0.S,v
retrieving revision 1.2
diff -u -d -p -r1.2 cf-crt0.S
--- cf-crt0.S 11 Dec 2006 19:58:01 -0000 1.2
+++ cf-crt0.S 26 Dec 2006 13:28:52 -0000
@@ -29,17 +29,14 @@ __start:
#if HOSTED
/* INIT_SIM syscall. Allows changing sp & d1. */
move.l IMM(1),d0
- .align 4
- /* The halt sequence must be 'nop; halt' and aligned to a 4 byte
- boundary. */
+ /* The semihosting sequence is 'nop; halt;sentinel' aligned to
+ a 4 byte boundary. The sentinel is an ill formed instruction
+ (movec %sp,0). The debugger will adjust the pc, so it is never
+ executed. */
+ .balignw 4,0x4e71
nop
halt
-
- /* 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
#endif
move.l d1,sp@-


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]