This is the mail archive of the newlib-cvs@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]

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


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


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