[newlib-cygwin] Fixed semihosting for ARM when heapinfo not provided by debugger.

Corinna Vinschen corinna@sourceware.org
Thu Apr 21 07:51:00 GMT 2016


https://sourceware.org/git/gitweb.cgi?p=newlib-cygwin.git;h=5c9403eaf40951f8a4f55ed65f661b485ff44be7

commit 5c9403eaf40951f8a4f55ed65f661b485ff44be7
Author: David Hoover <spm2@dangerous.li>
Date:   Thu Apr 21 07:12:24 2016 +0200

    Fixed semihosting for ARM when heapinfo not provided by debugger.

Diff:
---
 libgloss/arm/crt0.S | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/libgloss/arm/crt0.S b/libgloss/arm/crt0.S
index 7c662f9..35c306b 100644
--- a/libgloss/arm/crt0.S
+++ b/libgloss/arm/crt0.S
@@ -125,9 +125,11 @@
 
 	/* Set __heap_limit.  */
 	ldr     r1, [r0, #4]
+	cmp     r1, #0
+	beq     .LC33
 	ldr     r2, =__heap_limit
 	str     r1, [r2]
-
+.LC33:
 	ldr     r1, [r0, #0]
 	cmp     r1, #0
 	bne     .LC32



More information about the Newlib-cvs mailing list